Re: GTK warning

2009-02-21 Thread Dov Grobgeld
The message means exactly what it sais, that you try to reduce the ref count
of an object that doesn't exist. If it is a C-program the way to trace this
is to rerun the program with the flag g-fatal-warnings in which case the
program will exit such that if you run the program in a debugger, the error
will be caught and you can examine the stack and the reason for the error.

But since the example you give is in Python this probably means that there
is an error in the python binding. You should try to create a minimum
example that triggers the problem and try to create a bug report.

Regards,
Dov

2009/2/21 Jeffrey Barish jeff_bar...@earthlink.net

 I hate the warning messages that GTK provides because they rarely help me
 find the problem.  What does this one mean?

 /myprogram.py:118: Warning: g_object_unref: assertion `object-ref_count 
 0' failed
  self['myimage'].set_from_pixbuf(mypb)

 What object is producing the warning?  I suppose it must be myimage.  What
 am I supposed to do?  If I exit the program and run it again, 9 times out
 of 10 I don't get the warning.
 --
 Jeffrey Barish

 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: GTK warning

2009-02-21 Thread Jeffrey Barish
Dov Grobgeld wrote:
 2009/2/21 Jeffrey Barish jeff_bar...@earthlink.net
 
 I hate the warning messages that GTK provides because they rarely help me
 find the problem.  What does this one mean?

 /myprogram.py:118: Warning: g_object_unref: assertion `object-ref_count
  0' failed
  self['myimage'].set_from_pixbuf(mypb)

 What object is producing the warning?  I suppose it must be myimage. 
 What am I supposed to do?  If I exit the program and run it again, 9
 times out of 10 I don't get the warning.

 The message means exactly what it sais, that you try to reduce the ref
 count of an object that doesn't exist.

Of course.  My complaint is that the message doesn't tell me which object. 
It refers me to a specific line in which it isn't obvious that any object
is being unreferenced.  That line sets the pixbuf, which, if anything,
would increase the ref count of something.  If the dereference occurs
somewhere else, then the warning shouldn't refer me to this line of code.

 But since the example you give is in Python this probably means that there
 is an error in the python binding. You should try to create a minimum
 example that triggers the problem and try to create a bug report.

If there were an error in the Python binding, then I would expect the
warning to be consistent.  For that matter, it should be consistent if the
error were in my code or in GTK.

I'm running my program with --g-fatal-warnings at the end of the command
line.  I don't know whether that flag does anything in PyGTK, though.
-- 
Jeffrey Barish

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list