gtk-Fehlermeldungen
Günther Montag <[email protected]>
| Newsgroups | gmane.linux.hams.hfterm.devel,gmane.linux.suse.programming |
|---|---|
| Message-ID | <[email protected]> |
Liebe Freunde!
In meinem gtk-1.2- Programm (Ein Terminal für
Amateurfunk-Digimode) funktionieren die unten zitierte
Funktion und einige andere, ähnliche, gut.
Aber die Fehlermeldungen
gefallen mir nicht und ich möchte sie ergründen und
beseitigen - weiß jemand Rat?
################################################
Funktion:
void display_status(const char *fmt, ...){
GtkText *txt;
unsigned int len;
va_list args;
char display[256];
if (!fmt || !(len = strlen(fmt)))
return;
memset (display, 0, sizeof(display));
txt=GTK_TEXT(gtk_object_get_data(GTK_OBJECT(wmain),"textstatus"));
// to prevent stack overflow while running loooooong
while (gtk_text_get_length(txt) > MAXMON)
{
gtk_text_freeze(txt);
gtk_text_set_point (txt, 0);
gtk_text_forward_delete (txt, MAXMON / 2);
gtk_text_set_point (txt, gtk_text_get_length(txt));
gtk_text_thaw(txt);
}
va_start(args, fmt);
vsnprintf(display, sizeof(display), fmt, args);
va_end(args);
gtk_text_insert(txt, NULL, NULL, NULL, display,
strlen(display));
gtk_text_insert(txt, NULL, NULL, NULL, "\n", 2);
}
#############################################
Fehler:
Gtk-WARNING **: invalid cast from (NULL) pointer to
`GtkObject'
Gtk-CRITICAL **: file gtkobject.c: line 1079
(gtk_object_get_data): assertion `object != NULL' failed.
Gtk-WARNING **: invalid cast from (NULL) pointer to
`GtkText'
Gtk-CRITICAL **: file gtktext.c: line 905
(gtk_text_get_length): assertion `text != NULL' failed.
Gtk-CRITICAL **: file gtktext.c: line 953 (gtk_text_insert):
assertion `text != NULL' failed.
Gtk-CRITICAL **: file gtktext.c: line 953 (gtk_text_insert):
assertion `text != NULL' failed.
Gtk-WARNING **: invalid cast from (NULL) pointer to
`GtkObject'
###############################################
Danke !!!!
--
Günther Montag
[email protected]
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl