After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 137030 - signal_timeout() causes a critical warning
signal_timeout() causes a critical warning
Status: RESOLVED FIXED
Product: glibmm
Classification: Bindings
Component: main loop
2.4.x
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2004-03-13 00:45 UTC by Murray Cumming
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.5/2.6


Attachments
timeout_test_case.cc (1.74 KB, text/plain)
2004-03-13 00:46 UTC, Murray Cumming
Details

Description Murray Cumming 2004-03-13 00:45:13 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
Comment 1 Murray Cumming 2004-03-13 00:46:31 UTC
Created attachment 25586 [details]
timeout_test_case.cc
Comment 2 Andris Pavenis 2004-03-17 13:22:42 UTC
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(). 
 
 
 
 
Comment 3 Martin Schulze 2004-03-20 14:23:18 UTC
> 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?
Comment 4 Martin Schulze 2004-03-20 14:39:06 UTC
Should be fixed in cvs. Please confirm and close the bug.
Comment 5 Murray Cumming 2004-03-20 19:13:08 UTC
Yes, that fixes it. Thanks, Martin, and well done.
Comment 6 Andris Pavenis 2004-03-22 10:55:58 UTC
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