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 499680 - Critical when closing new view with shared cursor position
Critical when closing new view with shared cursor position
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: GUI
git master
Other All
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2007-11-26 07:03 UTC by sum1
Modified: 2007-11-29 14:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (2.42 KB, patch)
2007-11-28 15:44 UTC, Morten Welinder
none Details | Review

Description sum1 2007-11-26 07:03:22 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
  • #0 g_logv
    from /usr/lib/libglib-2.0.so.0
  • #1 g_log
    from /usr/lib/libglib-2.0.so.0
  • #2 g_return_if_fail_warning
    from /usr/lib/libglib-2.0.so.0
  • #3 g_object_ref
    from /usr/lib/libgobject-2.0.so.0
  • #4 g_object_set_valist
    from /usr/lib/libgobject-2.0.so.0
  • #5 g_object_set
    from /usr/lib/libgobject-2.0.so.0
  • #6 wb_view_detach_control
    at workbook-view.c line 554
  • #7 wbc_finalize
    at workbook-control.c line 357
  • #8 wbc_gtk_finalize
    at wbc-gtk.c line 4012
  • #9 g_object_unref
    from /usr/lib/libgobject-2.0.so.0
  • #10 wbc_gtk_close
    at wbc-gtk.c line 1409
  • #11 cb_file_close
    at wbc-gtk-actions.c line 161
  • #12 g_cclosure_marshal_VOID__VOID
    from /usr/lib/libgobject-2.0.so.0
  • #13 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #14 ??
    from /usr/lib/libgobject-2.0.so.0
  • #15 ??
  • #16 ??

Comment 1 Morten Welinder 2007-11-26 18:39:20 UTC
This is probably fairly bad.  There are valgrind errors on closing the
final view, but they are probably secondary.
Comment 2 Morten Welinder 2007-11-28 15:44:04 UTC
Created attachment 99781 [details] [review]
Patch

Please review.
Comment 3 Jon Kåre Hellan 2007-11-29 08:54:12 UTC
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.
Comment 4 Morten Welinder 2007-11-29 14:15:02 UTC
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.