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 690925 - freeze or long loading on small ODF file
freeze or long loading on small ODF file
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: import/export OOo / OASIS
git master
Other Linux
: Normal normal
: ---
Assigned To: Andreas J. Guelzow
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2012-12-31 17:58 UTC by Andreas J. Guelzow
Modified: 2012-12-31 20:14 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Andreas J. Guelzow 2012-12-31 17:58:17 UTC
This is https://bugs.launchpad.net/ubuntu/+source/gnumeric/+bug/1023254, containing a small <10KB ODF file that Gnumeric either does not load or only after a long time.
Comment 1 Andreas J. Guelzow 2012-12-31 17:59:25 UTC
Note that during loading we observe:

** (/home/aguelzow/gnumeric/bin/gnumeric:14526): WARNING **: Strange size issue in internal_style_list
Comment 2 Andreas J. Guelzow 2012-12-31 18:02:24 UTC
We seem to get stuck in:

  • #0 g_unichar_isalnum
    from /lib/i386-linux-gnu/libglib-2.0.so.0
  • #1 expr_name_validate
    at expr-name.c line 107
  • #2 odf_fix_en_validate
    at openoffice-read.c line 1783
  • #3 odf_fix_en_collect
    at openoffice-read.c line 1813
  • #4 g_hash_table_foreach
    from /lib/i386-linux-gnu/libglib-2.0.so.0
  • #5 gnm_named_expr_collection_foreach
    at expr-name.c line 405

Comment 3 Andreas J. Guelzow 2012-12-31 18:12:47 UTC
The problem are named ranges such as:
<table:named-range table:name="CRSE_HIST$srt12$0" table:base-cell-address="$Sheet1.$B$2" table:cell-range-address="$Sheet1.$E$2"/>

Gnumeric does not accept this table name. We try to fix it by repeatedly appending '_', but this does not create an acceptable name.
Comment 4 Andreas J. Guelzow 2012-12-31 18:55:43 UTC
We are now loading that file. Internally we are building now the correct translation table for sheet names.

We still have problems though:

** (gnumeric:24456): WARNING **: Strange size issue in internal_style_list

(gnumeric:24456): GLib-CRITICAL **: g_hash_table_foreach: assertion `version == hash_table->version' failed


Also as we execute:

	workbook_foreach_name (state->pos.wb, FALSE,
			       (GHFunc)odf_fix_en_apply, fen->orig2fixed);

we stop the translation with the above GLib-CRITICAL after applying the first fix. I would guess we are modifying the hash while we are transversing it.
Comment 5 Andreas J. Guelzow 2012-12-31 20:10:05 UTC
Note that ODF 1.2 part 2, section 5.11 states:

Expressions should limit the names of their identifiers to only ([UNICODE]) letters, underscores,
and digits, not including patterns that look like cell references or the words True or False.
Identifier ::= ( LetterXML
(LetterXML | DigitXML | '_' | CombiningCharXML)* )
- ( [A-Za-z]+[0-9]+ )
- ([Tt][Rr][Uu][Ee]) - ([Ff][Aa][Ll][Ss][Ee])

A file that uses only names satisfying the 'should' requirement are opened by Gnumeric without any problem. The file in question is in fact invalid since the name CRSE_HIST$srt12$0 is not a valid identifier.
Comment 6 Andreas J. Guelzow 2012-12-31 20:14:37 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.