Bug 52035 - xsltApplyXSLTTemplate: infinite template recursion saving .ods spreadsheets from Google Docs as MS 2003 xml
Summary: xsltApplyXSLTTemplate: infinite template recursion saving .ods spreadsheets f...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.6.0.0.beta3
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: XLSX MSO-XML2003
  Show dependency treegraph
 
Reported: 2012-07-13 04:45 UTC by Jim Avera
Modified: 2021-04-24 12:57 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
(please dont use this one) (deleted)
2012-07-13 04:45 UTC, Jim Avera
Details
typescript showing errors on terminal (2.84 KB, text/plain)
2012-07-13 04:47 UTC, Jim Avera
Details
Demo spreadsheet - Please use this one for testing instead of the original. (11.07 KB, application/vnd.oasis.opendocument.spreadsheet)
2012-09-12 00:25 UTC, Jim Avera
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Avera 2012-07-13 04:45:45 UTC
Created attachment 64161 [details]
(please dont use this one)

Certain spreadsheets can not be saved in Microsoft 2003 XML format (.xml),
many errors occur on the terminal, followed by a pop-up saying the file could not be saved.

The common denominator seems to be that the spreadsheet originated in Google Docs, exported to "Open office spreadsheet" (.ods) format.   This spreadsheet seems to operate normally in other respects.

I will attach a sample file exhibiting the problem, and a typescript showing all the error messages on the terminal.

You might be wondering *why* anybody would want to save in MS 2003 xml format.
In my case, I was trying to find merged cells, following the suggestion at
http://user.services.openoffice.org/en/forum/viewtopic.php?f=9&t=32085#p147003

The error messages begin with:

Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgiolibproxy.so
runtime error: file file:///opt/lodev3.6/share/xslt/export/spreadsheetml/table.xsl line 433 element param
xsltApplyXSLTTemplate: A potential infinite template recursion was detected.
You can adjust xsltMaxDepth (--maxdepth) in order to raise the maximum number of nested template calls and variables/params (currently set to 3000).
Templates:
#0 name optimized-row-repeating 
#1 name optimized-row-repeating 
#2 name optimized-row-repeating 
#3 name optimized-row-repeating 
#4 name optimized-row-repeating 
#5 name optimized-row-repeating 
#6 name optimized-row-repeating 
#7 name optimized-row-repeating 
#8 name optimized-row-repeating 
#9 name optimized-row-repeating 
#10 name optimized-row-repeating 
#11 name optimized-row-repeating 
#12 name optimized-row-repeating 
#13 name optimized-row-repeating 
#14 name optimized-row-repeating 
Variables:
#0
param thresholdmin   Object is a number : 256
...[snip]...
Comment 1 Jim Avera 2012-07-13 04:47:16 UTC
Created attachment 64162 [details]
typescript showing errors on terminal
Comment 2 Jim Avera 2012-07-13 04:47:58 UTC
Forgot to say, I was testing 3.6 beta 3
Comment 3 Valek Filippov 2012-07-14 14:18:42 UTC
Reproduced with 3.6rc1 on linux.
Comment 4 Markus Mohrhard 2012-07-18 03:26:34 UTC
most likely a dup of Bug 44969
Comment 5 Jim Avera 2012-09-12 00:25:23 UTC
Created attachment 67007 [details]
Demo spreadsheet - Please use this one for testing instead of the original.
Comment 6 Tollef Fog Heen 2012-09-13 08:30:15 UTC
The content of attachment 64161 [details] has been deleted by
    Tollef Fog Heen <tfheen@err.no>
who provided the following reason:

contains private data

The token used to delete this attachment was generated at 2012-09-13 08:30:05 UTC.
Comment 7 QA Administrators 2015-04-19 03:20:29 UTC Comment hidden (obsolete)
Comment 8 Jim Avera 2015-04-20 03:12:50 UTC
Bug is still there in 4.4.2.0.0+
Also confirmed the bug is in 3.6.7.2 
(3.3 did not support MS 2003 xml format)

STEPS TO REPRODUCE:

1. Download the attached test.ods demo file and open it
   (run LibreOffice from a terminal so you can see error messages)

2. File->SaveAs; select "Microsoft Excel 2003  XML (.xml)" format in the drop-down

3. Delete the ".ods" suffix from the defaulted file name

4. Click OK

RESULTS: Many error messages on the terminal, followed by a pop-up error

EXPECTED: The save to succeed.
Comment 9 QA Administrators 2016-09-20 09:32:34 UTC Comment hidden (obsolete)
Comment 10 Jim Avera 2016-09-21 21:41:34 UTC
Bug still there in 5.2.3.0.0+

To clarify, STEPS TO REPRODUCE:

1. Load attached Demo spreadsheet.
2. File->Save As in "Microsoft 2003 XML" format

RESULTS:
  Many errors on the terminal, followed by "save failed" pop-up
Comment 11 QA Administrators 2018-11-17 03:47:07 UTC Comment hidden (obsolete)
Comment 12 Roman Kuznetsov 2019-04-24 18:42:49 UTC
still repro in

Version: 6.2.1.2
Build ID: 7bcb35dc3024a62dea0caee87020152d1ee96e71
CPU threads: 4; OS: Linux 5.0; UI render: default; VCL: kde5; 
Locale: ru-RU (ru_RU.UTF-8); UI-Language: en-US
Calc: threaded
Comment 13 QA Administrators 2021-04-24 04:10:13 UTC Comment hidden (obsolete)
Comment 14 Michael Warner 2021-04-24 12:57:37 UTC
No repro in:
Version: 7.0.4.2 (x64)
Build ID: dcf040e67528d9187c66b2379df5ea4407429775
CPU threads: 6; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

There doesn't seem to be a Microsoft 2003 XML format any more. I tried saving with all of the formats that were available and wasn't able to reproduce this.