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 157997 - g_object_unref: assertion `object->ref_count > 0' failed
g_object_unref: assertion `object->ref_count > 0' failed
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: import/export MS Excel (tm)
git master
Other All
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2004-11-11 20:34 UTC by Morten Welinder
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
clean up image life cycle, and delay view creation for all sheet objects (11.26 KB, patch)
2004-11-14 06:39 UTC, Jody Goldberg
none Details | Review
don't set the sheet until after al the props are set. (10.06 KB, patch)
2004-11-15 05:38 UTC, Jody Goldberg
committed Details | Review

Description Morten Welinder 2004-11-11 20:34:07 UTC
wget http://www.grc.nasa.gov/WWW/AcousticalTest/Xls/Mnew1.xls
./gnumeric Mnew1.xls 
Reading file:///home/welinder/private/gnome/gnumeric/src/Mnew1.xls
Excel 95

(gnumeric:10493): GLib-GObject-CRITICAL **: g_object_unref: assertion
`object->ref_count > 0' failed

(gnumeric:10493): GLib-GObject-CRITICAL **: g_object_unref: assertion
`object->ref_count > 0' failed

(gnumeric:10493): GLib-GObject-CRITICAL **: g_object_unref: assertion
`object->ref_count > 0' failed

** (gnumeric:10493): WARNING **: failed to read prop #6

** (gnumeric:10493): WARNING **: GnomePrint: Requested Arial Narrow but using
Sans (Sans Regular 18.000000)

** (gnumeric:10493): WARNING **: Trying to fallback to 'Arial'
Comment 1 Morten Welinder 2004-11-11 20:41:15 UTC
Amazingly, there are no purify events.

(gdb) where
  • #0 g_log
    at gmessages.c line 507
  • #1 g_return_if_fail_warning
    at gmessages.c line 522
  • #2 g_object_unref
    at gobject.c line 1581
  • #3 sheet_object_clear_sheet
    at sheet-object.c line 371
  • #4 sheet_object_finalize
    at sheet-object.c line 157
  • #5 gnm_so_filled_finalize
    at gnm-so-filled.c line 519
  • #6 g_object_last_unref
    at gobject.c line 571
  • #7 g_object_unref
    at gobject.c line 1591
  • #8 ms_obj_delete
    at ms-obj.c line 324
  • #9 ms_container_finalize
    at ms-container.c line 64
  • #10 excel_sheet_destroy
    at ms-excel-read.c line 2648
  • #11 excel_workbook_destroy
    at ms-excel-read.c line 2830
  • #12 excel_read_workbook
    at ms-excel-read.c line 5960
  • #13 excel_file_open
    at boot.c line 188
  • #14 gnm_plugin_loader_module_func_file_open
    at plugin-loader-module.c line 315
  • #4 sheet_object_finalize
    at sheet-object.c line 157
$2 = {parent_object = {g_type_instance = {g_class = 0x4e93a0}, ref_count = 0,
qdata = 0x0}, sheet = 0x0, realized_list = 0x0, anchor = {cell_bound = {start =
{col = 0, row = 0}, end = {col = 0, row = 4}}, 
    offset = {0, 0, 0.98828125, 0.09375}, type =
{SO_ANCHOR_PERCENTAGE_FROM_COLROW_START, SO_ANCHOR_PERCENTAGE_FROM_COLROW_START,
SO_ANCHOR_PERCENTAGE_FROM_COLROW_START, SO_ANCHOR_PERCENTAGE_FROM_COLROW_START}, 
    direction = SO_DIR_DOWN_RIGHT}, flags = 196611}


Comment 2 Jody Goldberg 2004-11-14 04:55:27 UTC
I can reproduce.
Testing a patch now.
Comment 3 Jody Goldberg 2004-11-14 06:39:51 UTC
Created attachment 33754 [details] [review]
clean up image life cycle, and delay view creation for all sheet objects

This is really two patches.
1) to clean up the excel importer
2) a cheat to delay the creation of views until after we load blips.  It seems
like a decent performance win too.

Patch seems to work for the std test images, but does not load thes images in
this bugs test file.  That will require some tweaking to get the data from a
pixbuf -> SheetObjectImage.

Thoughts ?
Comment 4 Jody Goldberg 2004-11-14 06:40:42 UTC
release is close.
This needs review.
Comment 5 Morten Welinder 2004-11-14 14:32:24 UTC
A bit complicated for this point in time.  I'd say we just remove the offending
unref for now.
Comment 6 Jody Goldberg 2004-11-15 05:35:15 UTC
There were problems with the patch.
I'll attach an updated version for after the release, and do a variant of the
unref for now.  That seems safest.
Comment 7 Jody Goldberg 2004-11-15 05:36:31 UTC
Comment on attachment 33754 [details] [review]
clean up image life cycle, and delay view creation for all sheet objects

The delayed view creation would be a nice touch, but caused problems with
object creation.  The scg assumes that setting the sheet makes a view
available.
Comment 8 Jody Goldberg 2004-11-15 05:38:01 UTC
Created attachment 33790 [details] [review]
don't set the sheet until after al the props are set.

This seems reasonable, but causes a few problems with dependents wen setting
expressions.
Comment 9 Jody Goldberg 2004-12-17 15:43:14 UTC
Comment on attachment 33790 [details] [review]
don't set the sheet until after al the props are set.

applied to CVS for 1.4.2