Re: What's the matter with my app?
- From: misa <misa socix com>
- To: January Weiner 3 <jweiner1 ix urz uni-heidelberg de>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: What's the matter with my app?
- Date: Thu, 12 Apr 2001 22:46:08 +0800
On Thu, 12 Apr 2001 16:09:26 +0200 (METDST)
January Weiner 3 <jweiner1 ix urz uni-heidelberg de> wrote:
I'm a student from China,I got a problem with my App,there is the error message:
"Gtk-CRITICAL **: file gtkstyle.c: line 615 (gtk_style_unref): assertion `style !
= NULL' failed."
I don't know much about styles, but usually, when you get something like
this, it means that you try to do something with an empty structure whereas
the gtk expects you to have a structure which is already created, with
memory reserved etc. If you need more help, you have to post a piece of
your code -- otherwise, how can anybody know what you are doing wrong?
It seems to me that you are trying to do gtk_style_unref() on an object
which is NULL. Did you create the style you are working with using
gtk_style_new() ?
j.
----)-\//-///-----------------------------------January-Weiner-3-------
"She turned me into a newt." "A newt???" "I got better."
Thanks very much!
I do no 'gtk_style_unref' in my code,The problem come out when I want destroy(gtk_widget_destroy) some
widget, but I don't know why the problem does not happen every time,sometimes it's OK:( .
There is some code in my app for create widget ,I think it maybe help your to debug:
GtkWidget *gapp_notebook_new(char *name)
{
GtkWidget *widget;
widget = gtk_notebook_new();
if(widget==NULL) /*create failed*/
return NULL;
gtk_widget_ref (widget);
gtk_object_set_data_full (GTK_OBJECT (gapp_main_window),name,widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_set_name(widget,name);
return widget;
}
then, when I destroy it,the problem come out :(
Waiting for your help and thanks again!
____________________________________________________
Misa Is Still Alive
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]