GNOME Bugzilla – Bug 499680
Critical when closing new view with shared cursor position
Last modified: 2007-11-29 14:15:02 UTC
Version: r16203 OS: Ubuntu Gutsy Steps to reproduce: - Run Gnumeric from a terminal - View > New View - Check "Share cursor position" - Press OK - In the new view, select File > Close and notice the following console output: (gnumeric:5341): GLib-GObject-CRITICAL **: g_object_ref: assertion `object->ref_count > 0' failed (gnumeric:5341): GLib-GObject-CRITICAL **: g_object_notify_queue_thaw: assertion `object->ref_count > 0' failed (gnumeric:5341): GLib-GObject-CRITICAL **: g_object_unref: assertion `object->ref_count > 0' failed Backtrace: Breakpoint 2, 0xb721ba86 in g_logv () from /usr/lib/libglib-2.0.so.0 (gdb) bt
+ Trace 179659
This is probably fairly bad. There are valgrind errors on closing the final view, but they are probably secondary.
Created attachment 99781 [details] [review] Patch Please review.
Looks good. If I understand correctly, the docs say that objects should be unrefed in dispose, memory freed in finalize. The validation_combo stuff could be a candidate for dispose, but let's leave it alone for now.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report. It's a little more complicated than that. Ref-cycles should be broken at dispose time and user-visible effects of the object -- such as windows on screen -- should be taken care of at dispose time. Memory might be released as long as the object is left in a valid state. Add to that, that the rules have probably never been written out in detail and you have a mess, but a workable mess at least.