GNOME Bugzilla – Bug 137030
signal_timeout() causes a critical warning
Last modified: 2004-12-22 21:47:04 UTC
Someone noticed this in gtkmm/demos/pixbuf-demo. I have attached a simplified test case which just connects to signal_timeout(). It shows this critical warning when the window is closed: (lt-pixbuf-demo:11427): GLib-CRITICAL **: file gmain.c: line 997 (g_source_destroy): assertion `source != NULL' failed
Created attachment 25586 [details] timeout_test_case.cc
It's really also invalid memory access, that can cause SIGSEGV. So it happens for example in demos/gtk-demo/demo (run it, double click on item 'Images' in menu and close newly opened window, if still alive repeat previous 2 steps). In case of demo valgrind shows invalid free().
> It shows this > critical warning when the window is closed: > > (lt-pixbuf-demo:11427): GLib-CRITICAL **: file gmain.c: line 997 > (g_source_destroy): assertion `source != NULL' failed Running the test case as is; without the line //sigc::connection conn_timeout_; commented in, I guess?
Should be fixed in cvs. Please confirm and close the bug.
Yes, that fixes it. Thanks, Martin, and well done.
Have You run text example under Valgrind? At least valgrind-2.1.0 return messages about invalid free() for me (when exitting test example), but no more earlier critical message: ==5442== Invalid free() / delete / delete[] ==5442== at 0x400293F9: free (vg_replace_malloc.c:186) ==5442== by 0x40BE099B: (within /lib/libc-2.3.2.so) ==5442== by 0x40BE0708: __libc_freeres (in /lib/libc-2.3.2.so) ==5442== by 0x4016893C: vgPlain___libc_freeres_wrapper (vg_intercept.c:172) ==5442== by 0x40AFE68F: exit (in /lib/libc-2.3.2.so) ==5442== by 0x40AE893D: __libc_start_main (in /lib/libc-2.3.2.so) ==5442== by 0x804C2C0: (within /disk2/src/bugs/gtkmm/timeout_test_case) ==5442== Address 0x40AD27E8 is not stack'd, malloc'd or free'd ==5442== = I'm not getting similar error message when running test examples of today's CVS version of glibmm under the same version of valgrind. Andris