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 321678 - Excel graph import CRITICALs
Excel graph import CRITICALs
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: import/export MS Excel (tm)
git master
Other All
: Normal normal
: ---
Assigned To: Jean Bréfort
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2005-11-17 01:29 UTC by Nick Lamb
Modified: 2006-09-09 15:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Excel 4.x workbook which crashes Gnumeric (39.59 KB, application/octet-stream)
2005-11-17 01:30 UTC, Nick Lamb
Details

Description Nick Lamb 2005-11-17 01:29:07 UTC
Steps to reproduce:
1. Attempt to load attached file bounded4.xlw

2. Crash inside chart object from Excel

Stack trace:
0x00d09402 in __kernel_vsyscall ()
  • #0 __kernel_vsyscall
  • #1 __waitpid_nocancel
    from /lib/libc.so.6
  • #2 libgnomeui_module_info_get
    from /usr/lib/libgnomeui-2.so.0
  • #3 <signal handler called>
  • #4 gog_object_find_role_by_name
    at gog-object.c line 1622
  • #5 gog_object_add_by_name
    at gog-object.c line 1471
  • #6 xl_chart_import_reg_curve
    at ms-chart.c line 2770
  • #7 ms_excel_chart_read
    at ms-chart.c line 3093
  • #8 excel_read_sheet
    at ms-excel-read.c line 5755
  • #9 excel_read_BOF
    at ms-excel-read.c line 5968
  • #10 excel_read_workbook
    at ms-excel-read.c line 6034
  • #11 excel_file_open
    at boot.c line 158
  • #12 go_plugin_loader_module_func_file_open
    at go-plugin-loader-module.c line 239
  • #13 go_plugin_file_opener_open
    at go-plugin-service.c line 500
  • #14 go_file_opener_open
    at file.c line 289
  • #15 wb_view_new_from_input
    at workbook-view.c line 976
  • #16 wb_view_new_from_uri
    at workbook-view.c line 1027
  • #17 main
    at main-application.c line 410

Other information:
Please re-file if this is actually a chart crash, my guess is that the core
problem is in the Excel plugin.
Comment 1 Nick Lamb 2005-11-17 01:30:15 UTC
Created attachment 54845 [details]
Excel 4.x workbook which crashes Gnumeric
Comment 2 Morten Welinder 2005-11-17 02:32:58 UTC
Confirmed.  I get this before the crash:

(gnumeric:13092): GLib-GObject-WARNING **: value "0" of type `guint' is invalid
or out of range for property `dims' of type `guint'
Comment 3 Morten Welinder 2005-11-17 02:58:30 UTC
Goffice patched to at least not crash.

2005-11-16  Morten Welinder  <terra@gnome.org>

	* goffice/graph/gog-object.c (gog_object_add_by_name): Add
	pre-condition.
	(*): Fix preconditions.


Gnumeric complains loudly during load, though:

Excel 4.x workbook

** (gnumeric:18544): WARNING **: EXCEL : unknown widths for font 'Geneva', guessing

(gnumeric:18544): GLib-GObject-WARNING **: value "0" of type `guint' is invalid
or out of range for property `dims' of type `guint'

** (gnumeric:18544): CRITICAL **: gog_object_add_by_name: assertion
`IS_GOG_OBJECT (parent)' failed

(gnumeric:18544): GLib-GObject-WARNING **: value "0" of type `guint' is invalid
or out of range for property `dims' of type `guint'

** (gnumeric:18544): CRITICAL **: gog_object_add_by_name: assertion
`IS_GOG_OBJECT (parent)' failed

(gnumeric:18544): GLib-GObject-WARNING **: value "0" of type `guint' is invalid
or out of range for property `dims' of type `guint'

** (gnumeric:18544): CRITICAL **: gog_object_add_by_name: assertion
`IS_GOG_OBJECT (parent)' failed

(gnumeric:18544): GLib-GObject-WARNING **: value "0" of type `guint' is invalid
or out of range for property `dims' of type `guint'

** (gnumeric:18544): CRITICAL **: gog_object_add_by_name: assertion
`IS_GOG_OBJECT (parent)' failed
Leaking string [Database] with ref_count=1.

** (gnumeric:18544): WARNING **: Leaked 1 nodes from string pool.

** (gnumeric:18544): CRITICAL **: go_font_free: assertion `font->ref_count == 1'
failed

** (gnumeric:18544): WARNING **: Missing calls to go_font_cache_unregister

Comment 4 Jean Bréfort 2005-11-17 06:56:21 UTC
It is not a goffice problem. There is no chart_group record in this file (xl4!)
or they are in the unknown (1004) records.
This removes the crash:
@@ -3085,11 +3113,11 @@
      if (series != NULL) {
              Sheet *sheet = ms_container_sheet (state.container.parent);
              GnmExpr const *expr;
              GOData        *data;

-             if (series->chart_group < 0) {
+             if (series->chart_group < 0 && BC_R(ver)(&state) >= MS_BIFF_V5) {
                      /* might be a error bar series or a regression curve */
                      if (series->err_type == 0)
                              xl_chart_import_reg_curve (&state, series);
                      else
                              xl_chart_import_error_bar (&state, series);

But I can't find the graph in the imported file, and on exit, I have:

Leaking string [Database] with ref_count=1.

** (gnumeric:16871): WARNING **: Leaked 1 nodes from string pool.

** (gnumeric:16871): CRITICAL **: go_font_free: assertion `font->ref_count == 1'
failed

** (gnumeric:16871): WARNING **: Missing calls to go_font_cache_unregister
Comment 5 Jody Goldberg 2005-11-18 13:13:46 UTC
looks reasonable.
Please commit to both branches
Comment 6 Jean Bréfort 2005-11-18 17:36:35 UTC
Commited