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 124930 - Make xml probe more lenient, and display parse errors
Make xml probe more lenient, and display parse errors
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Main System
git master
Other All
: High normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
: 124932 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-10-18 22:17 UTC by danielm
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Gnumeric xml file that fails to open unless the type is deliberately set to "Gnumeric XML" (25.36 KB, application/octet-stream)
2003-10-22 23:01 UTC, danielm
Details

Description danielm 2003-10-18 22:17:31 UTC
File-Open and select a just saved .gnumeric file with the file type
"Automatically detected". The workbook is drawn with a single worksheet
(named the name of the file). The first cell shows .PLD+-. None of the
twelve worksheets are found!

File opens OK if "Gnumeric XML file format" is chosen as file type.
Comment 1 Morten Welinder 2003-10-19 14:12:35 UTC
What version is this?  And what libgsf version?
Comment 2 Jody Goldberg 2003-10-22 21:25:53 UTC
Please give us more information here.
Without it there is no way to debug this.
Comment 3 danielm 2003-10-22 23:01:10 UTC
Created attachment 20869 [details]
Gnumeric xml file that fails to open unless the type is deliberately set to "Gnumeric XML"
Comment 4 danielm 2003-10-22 23:05:09 UTC
Sorry for the delay, I've had to pull the "old" environment out of the
backup disk.

The file was probably created around Jan '02 and variously modified.
The last modification would have been with gnumeric-1.0.5-3 on an
RH7.3 system before being transferred and accessed with gnumeric2
1.1.20-36 after the SuSE upgrade. File is attached, hope it helps.

Gnumeric about box reports 1.1.20, installed from the DVD RPMs:-
gnumeric2-1.1.20-36
libgsf-1.8.1-93

Comment 5 Jody Goldberg 2003-10-23 02:46:25 UTC
Hmm I can see why its acting strangely.  The file contains some
corrupt strings.  Somewhere along the line the format strings that
were saved with bogus random content.  libxml2 is refusing to load the
file because it is invalid.  I suspect that what you're really doing
when you force the type is to use the SAX based importer that will
allow you get slightly further.

A couple of points.
1) You can fix the file manually by gunziping it and  editing the xml
directly.  Look for any string with [Red] in it.  Those all seem to be
followed by random crap.  delete that and you should have the file back.

2) Gnumeric should be alot more lenient about probing, and check only
the header, not the xml validity of the entire file.

3) Gnumeric should warn about why it is failing to read the xml
Comment 6 Jody Goldberg 2003-10-24 13:34:38 UTC
*** Bug 124932 has been marked as a duplicate of this bug. ***
Comment 7 Jody Goldberg 2003-10-27 19:48:30 UTC
This is handled alot more smoothly now.  The probe routine is faster
and smarter, so the file is recognized as gnumeric.  The parse
routines have at least started on displaying xml parse problems.  It
needs work to should be basicly functional.