[Upstream] Can't open XML files larger than 1.1 MB

Bug #951153 reported by Julian Alarcon
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
LibreOffice
Fix Released
Medium
libreoffice (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

1) lsb_release -rd
Description: Ubuntu precise (development branch)
Release: 12.04

2) apt-cache policy libreoffice-writer
libreoffice-writer:
  Installed: 1:3.5.0-2ubuntu1
  Candidate: 1:3.5.0-2ubuntu1
  Version table:
 *** 1:3.5.0-2ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main i386 Packages
        100 /var/lib/dpkg/status

3) What is expected to happen in Writer via the Terminal:

cd ~/Desktop && wget https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/951153/+attachment/2845961/+files/11111111111111111111.xml && lowriter --nologo 11111111111111111111.xml

is the file opens successfully.

4) What happens instead is a window pops up:
LibreOffice 3.5
General input/output error.

The file was verified a valid one via:
http://www.w3schools.com/dom/dom_validate.asp
http://www.xmlvalidation.com

WORKAROUND: Use AbiWord.

apt-cache policy abiword
abiword:
  Installed: 2.9.2+svn20120213-1
  Candidate: 2.9.2+svn20120213-1
  Version table:
 *** 2.9.2+svn20120213-1 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/universe i386 Packages
        100 /var/lib/dpkg/status

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: libreoffice (not installed)
ProcVersionSignature: Ubuntu 3.2.0-18.28-generic 3.2.9
Uname: Linux 3.2.0-18-generic x86_64
ApportVersion: 1.94.1-0ubuntu1
Architecture: amd64
Date: Fri Mar 9 16:18:43 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120306)
ProcEnviron:
 LANGUAGE=es_CO:es
 TERM=xterm
 LANG=es_CO.UTF-8
 SHELL=/bin/bash
SourcePackage: libreoffice
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
In , Ruslanf78 (ruslanf78) wrote :

Problem description:
Not open xml file size more 1.1 mb
Steps to reproduce:
1. Open xml file size 1.4, 3.3 mb
2. ....
3. ....

Current behavior:
Not open xml file size more 1.1 mb
Expected behavior:
Should open
Platform (if different from the browser):
Ubuntu 11.10, Firefox/9.0.1

Browser: Mozilla/5.0 (Ubuntu; X11; Linux i686; rv:9.0.1) Gecko/20100101 Firefox/9.0.1

Revision history for this message
In , Reisi007 (reisi007) wrote :

Please attach such a .xml file for proper testing...

Revision history for this message
In , Ruslanf78 (ruslanf78) wrote :

Created attachment 56116
It is report from oracle sistem

Revision history for this message
In , Ruslanf78 (ruslanf78) wrote :

This problem arises in 3.4.4 and in 3.4.5. In 3.3 opens not bad, Openoffice 3.3 opens well.

Revision history for this message
In , Ruslanf78 (ruslanf78) wrote :

Created attachment 56733
File for test

Hello, file for test

Revision history for this message
In , Ruslanf78 (ruslanf78) wrote :

Created attachment 56734
File for test

Hello, i put it in arhiv.

Revision history for this message
In , Pedlino (pedlino) wrote :

I can confirm that the attached XML file opens correctly in LibreOffice 3.3.4 but not with 3.4.5 or 3.5.0 under Windows XP Pro x86 SP3

It opens as a blank document in 3.4.5 and doesn't open at all under 3.5.0: it just reports a "General Error. General input/output error."

Revision history for this message
In , Ruslanf78 (ruslanf78) wrote :

Hello! Have you been able to test the opening MS Exell XML file and solve the problem? In the final version 3.5 this problem persists.
(In reply to comment #1)
> Please attach such a .xml file for proper testing...

Revision history for this message
In , Ruslanf78 (ruslanf78) wrote :

Hello! When you solve this problem, since I needed to work? Because of this I have to work in Openoffice 3.3

(In reply to comment #6)
> I can confirm that the attached XML file opens correctly in LibreOffice 3.3.4
> but not with 3.4.5 or 3.5.0 under Windows XP Pro x86 SP3
>
> It opens as a blank document in 3.4.5 and doesn't open at all under 3.5.0: it
> just reports a "General Error. General input/output error."

Revision history for this message
In , Reisi007 (reisi007) wrote :

I can confirm this issue with LibO 3,5 final.
I will set the Importance to high, might help.....
OS: Win7 x64 SP 1

Revision history for this message
In , Pedlino (pedlino) wrote :

Hi Ruslan

> Hello! When you solve this problem, since I needed to work? Because of this I
> have to work in Openoffice 3.3

I am not a developer. I just help in triaging and checking reported bugs. Posting additional comments without new information will not increase the chance that it is fixed ;)

I suggest that you use LibreOffice version 3.3.4 instead.

Revision history for this message
In , Pedlino (pedlino) wrote :

Additional information: the problem seems indeed to be related to the file size.

Breaking the table in two (i.e. not changing headers and keeping first 1000 lines and not changing headers and keeping bottom 1000 lines) results in two files with ~700kB.

Both open correctly in LO 3.5.0 (although quite slowly) so this seems to prove that there is no problem in the file structure but only on it's length.

Revision history for this message
In , Lohmaier (lohmaier) wrote :

reassigning.

Revision history for this message
In , Sumuthu (sumuthu) wrote :

Something sure is broken...takes a lot of time in xslt, while it loads real quick on 3.3

CC'ing kohei and petr in case they have some info there?

Revision history for this message
In , Sumuthu (sumuthu) wrote :

ah...forgot to cc eike...cc'ing now..

Revision history for this message
In , Lohmaier (lohmaier) wrote :

Created attachment 57452
console output when trying to open the file (only appears at the end, after canceling and waiting)

The essence is this:

runtime error: file file:///opt/libreoffice3.5/share/xslt/common/measure_conversion.xsl line 145 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).

Revision history for this message
In , Ruslanf78 (ruslanf78) wrote :

Hi, what do I need to do?

(In reply to comment #15)
> Created attachment 57452 [details]
> console output when trying to open the file (only appears at the end, after
> canceling and waiting)
>
> The essence is this:
>
> runtime error: file
> file:///opt/libreoffice3.5/share/xslt/common/measure_conversion.xsl line 145
> 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).

Revision history for this message
In , Björn Michaelsen (bjoern-michaelsen) wrote :

Regression does appear in oldest version of bibisect-3.5.tar.lzma and must be older.

Revision history for this message
In , Sumuthu (sumuthu) wrote :

@bjorn: it(the bug) is present even in 3.4, i guess (wrt the previous comments). But, I have tested 3.3 and the bug isn't there.

Revision history for this message
Julian Alarcon (julian-alarcon) wrote :
tags: added: regression-proposed
Revision history for this message
Adain Martinez (adainmm) wrote :

Was not able to duplicate the error on libre office gnome version 1:3.4.4-0ubuntu1 on oneiric 11.10.

Changed in libreoffice (Ubuntu):
status: New → Incomplete
Revision history for this message
Stefan Feltmann (stefan-feltmann) wrote :

Confirmed on libreoffice-gnome 1:3.5.0-1ubuntu4 on Precise 12.04.

Changed in libreoffice (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Jack Leigh (leighman) wrote :

The attached XML file is not well-formed so this is a different problem to the upstream bug.
On lines 11 and 12 the start and end <Code></code> tags don't match.
Please could you attach an XML file which is well formed and still cannot be opened.

Changed in libreoffice (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Jack Leigh (leighman) wrote :

* The file opens fine in 3.5 if the bad tags are fixed

Revision history for this message
Julian Alarcon (julian-alarcon) wrote : Re: Can't open XML files in Libreoffice 3.4 or 3.5 larger than 1.1 MB

Bug updated, the problem ocurrs with files largers than 1.1 MB.

Please test this file (11111111111111111111.xml)
Source: https://www.libreoffice.org/bugzilla/attachment.cgi?id=56734

summary: - Can't open XML files in Libreoffice 3.4 or 3.5
+ Can't open XML files in Libreoffice 3.4 or 3.5 larger than 1.1 MB
penalvch (penalvch)
description: updated
penalvch (penalvch)
description: updated
Changed in libreoffice (Ubuntu):
status: Incomplete → Confirmed
penalvch (penalvch)
Changed in libreoffice (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
summary: - Can't open XML files in Libreoffice 3.4 or 3.5 larger than 1.1 MB
+ [Upstream] Can't open XML files larger than 1.1 MB
penalvch (penalvch)
tags: added: regression-release
removed: regression-proposed
Changed in df-libreoffice:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
In , Markus Mohrhard (moggi) wrote :

I think it might be related to c76c986e17194b0f678ba81a9c49a31bcf206607 from Peter so I added him into CC.

Revision history for this message
In , Pjotr (pjotr) wrote :

We changed the default XSLT transformer from Savon9/Java to libxslt in LO 3.4. Apparently, libxslt's settings for maximum recursion depth differ from those in saxon.

I'll have a look into this later today. As a workaround, you might try to save the file to another format (Excel 97), and then open it in LO.

Revision history for this message
In , Sumuthu (sumuthu) wrote :

@markus: Thanks!
@peter: I have reassigned this bug to you...I guess you are the best person to solve this. Thank you so much! [ Don't hesitate to reassign it again, if my assumptions are wrong ;) ]

Revision history for this message
In , Pjotr (pjotr) wrote :

Hi, I'm currently stuck debugging this, because my Mac build crashed with a EXC_BAD_ACCESS before libxslt goes dumping it's call stack because the maximum recursion limit has been reached.

In theory, it would be possible to just raise that to a larger number (preferable one that matches the setting in saxon more closely), but I'll only be able to verify that when my linux build is in a debuggable state again.

I'll have a look at ways to limit recursion depth in the xslt templates and raise a hand if I get stuck.

Revision history for this message
In , Pjotr (pjotr) wrote :

Just a note about the current state of analysis:

the MS 2003 XML import filters heavily rely on recursion over all rows and columns of the imported file in some template rules. Saxon 8/9 for Java contain optimizations to handle tail recursion calls in template rules. libxml and Xalan don't optimize tail recursion and fail importing larger files sooner or later.

It would be possible to avoid the recursion by doing two transformation passes, but I won't get to working on this before end of april. As a quick hack it would be possible extend the maximum allowed recursion depth for libxslt in the import filter code. But that would only push the limit a little and not really solve the problem.

Revision history for this message
In , Markus Mohrhard (moggi) wrote :

*** Bug 51869 has been marked as a duplicate of this bug. ***

Changed in df-libreoffice:
status: Confirmed → In Progress
Revision history for this message
In , Markus Mohrhard (moggi) wrote :

*** Bug 38492 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Jbf-faure-9 (jbf-faure-9) wrote :

*** Bug 38492 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Pjotr (pjotr) wrote :

Fixed by those commits on master:

fix endless recursion with some characters in spreadsheetml headers/footers:

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8b950e8213c25212e6656a3e0da3ff6f470dcbfe

optimize font-decl template for libxslt (using exslt functions):
http://cgit.freedesktop.org/libreoffice/core/commit/?id=a2a10b59876951b6493419713e9054ceabd3d6cc

build and deliver internal libexslt. Use LIBEXSLT_LIBS is system xslt is used:
http://cgit.freedesktop.org/libreoffice/core/commit/?id=1c467763f4ca4bc1caaa3111f0ed85f388e6fe01

register exslt functions for libxslt filter:
http://cgit.freedesktop.org/libreoffice/core/commit/?id=eadb83f281b596e441a82798660f1a27c177b2c6

add for exslt:set:distinct template:
http://cgit.freedesktop.org/libreoffice/core/commit/?id=b5107faa150aab3c5480708219fc8d392a97f718

fix a problem when handling style named for conditional formatting:
http://cgit.freedesktop.org/libreoffice/core/commit/?id=9f29890d4e4fa916d46eeae081ef6e04eb1bfe81

fixed problem with template recursion in spreadsheetml import:
http://cgit.freedesktop.org/libreoffice/core/commit/?id=3420be984986bcff03d6d127b913fc07372fe89f

optimized handling of ConditionalFormatting elements:
http://cgit.freedesktop.org/libreoffice/core/commit/?id=8fdef3e8d8ead3903795df87cbf66256691542b1

Commits have not yet been backported to 3-6 and 3-5 branches, to which they should also be applied.

Revision history for this message
In , Dtardon (dtardon) wrote :
Changed in df-libreoffice:
status: In Progress → Fix Released
Revision history for this message
In , Libreoffice-z (libreoffice-z) wrote :

Can someone please add target info if the complete fix is already available for a version before 3.7.0?

Test Document 2012-02-07 20:41 UTC still crashes with 3.6.3.1, so it seems fix is not available for 3.6? But here we have a conglomerate of problems, "Can't open" is not a very clear description ...

Revision history for this message
In , Ruslanf78 (ruslanf78) wrote :

Hi all, Would it fixed in LibO 3.7?

Revision history for this message
In , Caolanm (caolanm) wrote :

yes, it works in 3.7/4.0

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libreoffice - 1:4.0.0~beta2-0ubuntu2

---------------
libreoffice (1:4.0.0~beta2-0ubuntu2) raring; urgency=low

  * Build using the internal libmspub for a first build.
 -- Matthias Klose <email address hidden> Tue, 19 Feb 2013 00:05:26 +0100

Changed in libreoffice (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
In , Fajon24183 (fajon24183) wrote :

Developing some resiliency and healing whatever open wounds you may have will make it much easier to work on your marriage. https://tutuappx.com/ https://vidmate.onl/

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.