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 555933 - Segfault on loading .gnumeric from ~0.57
Segfault on loading .gnumeric from ~0.57
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: import/export other
git master
Other All
: Normal critical
: ---
Assigned To: Morten Welinder
Jody Goldberg
: 563277 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-10-11 18:02 UTC by Geoffrey Leach
Modified: 2008-12-06 14:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
the worksheet creating the problem (1.75 KB, application/x-gnumeric)
2008-10-11 23:20 UTC, Geoffrey Leach
Details
File in modern .gnumeric (2.46 KB, application/x-gnumeric)
2008-10-12 19:44 UTC, Morten Welinder
Details

Description Geoffrey Leach 2008-10-11 18:02:21 UTC
Reading file:///home/geoff/Gnumeric/generator.gnumeric

** (gnumeric:4668): WARNING **: WorkbookView unknown arg 'Workbook::show_horizontal_scrollbar'

** (gnumeric:4668): WARNING **: WorkbookView unknown arg 'Workbook::show_vertical_scrollbar'

** (gnumeric:4668): WARNING **: WorkbookView unknown arg 'Workbook::show_notebook_tabs'
Unexpected element 'gmr:PrintUnit' in state : 
	Workbook -> Sheets -> Sheet -> PrintInformation
Unexpected element 'gmr:PrintUnit' in state : 
	Workbook -> Sheets -> Sheet -> PrintInformation
Unexpected element 'gmr:PrintUnit' in state : 
	Workbook -> Sheets -> Sheet -> PrintInformation
Unexpected element 'gmr:PrintUnit' in state : 
	Workbook -> Sheets -> Sheet -> PrintInformation
Unexpected element 'gmr:PrintUnit' in state : 
	Workbook -> Sheets -> Sheet -> PrintInformation
Unexpected element 'gmr:PrintUnit' in state : 
	Workbook -> Sheets -> Sheet -> PrintInformation
Segmentation fault

File is available. I'd attach it if there was a hook.
Comment 1 Morten Welinder 2008-10-11 18:44:34 UTC
Please attach the file (which, for no good reason, you can only do
after the initial report is made)

http://bugzilla.gnome.org/attachment.cgi?bugid=555933&action=enter
Comment 2 Geoffrey Leach 2008-10-11 23:20:12 UTC
Created attachment 120417 [details]
the worksheet creating the problem
Comment 3 Morten Welinder 2008-10-12 02:36:19 UTC
An interesting file from a quite old Gnumeric.  We should have been able
to handle it, but clearly do not.

What version generated this?


Jody: why the version conditional in xml_sax_style_region_start?  This is
what trips up here.

        <gmr:StyleRegion startCol="0" startRow="0" endCol="0" endRow="0">
          <gmr:Style HAlign="64"/>
        </gmr:StyleRegion>
Comment 4 Geoffrey Leach 2008-10-12 16:43:14 UTC
I can't say which version created the file, but I can say this. The last modification date is 2004-04-16 and you can assume that the gnumeric installed was the one released for Fedora Core at this time. That is, I run the latest version of Fedora and keep all of the executables up to date.
Comment 5 Morten Welinder 2008-10-12 19:43:36 UTC
It's older.  It's much, much older.  The version marker says...

    <gmr:Workbook xmlns:gmr="http://www.gnome.org/gnumeric/v4">

which places it around v0.57, about 8 years ago.

See http://svn.gnome.org/viewvc/gnumeric/trunk/src/xml-io.c?r1=3898&r2=3904


Now that is all very interesting to us, but probably not to you.  :-)
I'll attach a rescued version so you can get on with you life.
Then we can take our time figuring this out.
Comment 6 Morten Welinder 2008-10-12 19:44:51 UTC
Created attachment 120461 [details]
File in modern .gnumeric
Comment 7 Geoffrey Leach 2008-10-12 22:35:23 UTC
Rescued file retrieved.  Many thanks.
Comment 8 Jody Goldberg 2008-10-15 08:27:42 UTC
morten : Likely copied from the old DOM code for ancient and unremembered reasons.  It's dangerous these days.

- conditional dropped
- stub added for the PrintUnit.
- ignoring the attributes.
Comment 9 Morten Welinder 2008-10-15 12:46:51 UTC
I looked into this further.  The problem is that xml-sax-read does not
apply the partial styles correctly.  xml-io did.  Back then, styles were
saved as overlays.  All fixed.

Jody: I do not see your "ignoring the attributes" patch.  Forgot to commit
something?
Comment 10 Morten Welinder 2008-12-06 14:46:44 UTC
*** Bug 563277 has been marked as a duplicate of this bug. ***