FS#34878 - [libreoffice] writer crash on document with SVG image

Attached to Project: Arch Linux
Opened by Andrew Cowie (afcowie) - Monday, 22 April 2013, 07:39 GMT
Last edited by Gerardo Exequiel Pozzi (djgera) - Friday, 28 February 2014, 22:34 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andreas Radke (AndyRTR)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description:

libreoffice 4.0 is crashing when attempting to open (actually, when attempting to render on the screen) any of my documents that have a [previously existing] image (think the logo at the top of a letterhead). I happen to know that image is an SVG, created by Inkscape.

When run from the command line, the error reported is:

$ libreoffice -norestore Document.odt
terminate called after throwing an instance of 'rtl::MalformedUriException'
$

It is worth emphasizing that libreoffice 3.x on Ubuntu (which I just migrated from) opened these documents fine.

Manually unzipping the .odt file, editing the context.xml to remove the <draw> element with the picture, rezipping it results in a document that opens fine. Subsequently re-importing the same SVG logo image into the document worked fine.

Additional info:
* package version(s)

libreoffice-writer 4.0.2-3

Steps to reproduce:

I can attach a document reproducing the crash if that's of interest; I assume this is an upstream problem but it needed to be reported.

AfC
This task depends upon

Closed by  Gerardo Exequiel Pozzi (djgera)
Friday, 28 February 2014, 22:34 GMT
Reason for closing:  Upstream
Additional comments about closing:  https://bugs.freedesktop.org/show_bug.cg i?id=75582
Comment by Jan de Groot (JGC) - Monday, 22 April 2013, 08:18 GMT
Do you have libreoffice-draw installed?
Comment by Andrew Cowie (afcowie) - Monday, 22 April 2013, 08:35 GMT
Jan,

Yeah, I thought of that; it wasn't originally, but I installed it subsequently and no change.

AfC
Comment by Andrew Cowie (afcowie) - Monday, 22 April 2013, 08:46 GMT
As requested by buhman, here's a document that causes my libreoffice installation to crash when it attempts to open. I should note that another (longer) document that had its "cursor" on a subsequent page did _not_ crash until scrolled back to the page with the graphic on it.

Apologies for posting something that is at all corporate; most of the documents that are crashing for me are proposals and invoices; this document is just a one pager "introduction" is the same as the intro page on my website. Not my intention to shameless plug. I have a safe PDF version if you need it for comparison.

AfC
Comment by Andrew Cowie (afcowie) - Monday, 22 April 2013, 08:54 GMT
I just tested various offending documents on Ubuntu with libreoffice 3.6.2 and they work fine. I'm guessing this is a libreoffice 4.0 bug, and while I'm perfectly willing to find out that the documents in question were being tolerated by previous versions of OO, I'm somewhat skeptical that their no longer loading now is deliberate on the part of upstream; OO/LO _used_ to read them fine and other computers here with older LO work; they haven't suddenly become corrupt.

AfC
Comment by Andrew Cowie (afcowie) - Monday, 22 April 2013, 08:56 GMT Comment by Andrius (andrius4669) - Monday, 22 April 2013, 14:12 GMT
Confirmed.
then run from command line, there are lots (50) of lines:

Lookup Table Format4: specific interpretation needed!

and one line at the end:

terminate called after throwing an instance of 'rtl::MalformedUriException'
Comment by Pieter de Bruijn (PieterDeBruijn) - Wednesday, 01 May 2013, 09:43 GMT
It does not seem to be fixed in the new upcoming (upstream) 4.0.3RC1:
https://wiki.documentfoundation.org/Releases/4.0.3/RC1

Maybe someone can make an LibreOffice bugreport?
https://wiki.documentfoundation.org/BugReport
Comment by Linas (Linas) - Sunday, 26 May 2013, 22:15 GMT
It's easier to reproduce by inserting either of the two svgs and saving the file. Interestingly, they load and render fine, the rtl::MalformedUriException is only thrown when saving the document.

The problem are the images embedded from those files, concretely in the xlink:href.

In the logo image:
<image
y="0"
x="0"
id="image2449"
height="392"
width="306"
sodipodi:absref="/home/andrew/Desktop/logo.gif"
xlink:href="logo.gif" />

In the text image:
<image
xlink:href="/home/andrew/Sites/com/operationaldynamics/www/images/logo/type.gif"
sodipodi:absref="/home/andrew/Sites/com/operationaldynamics/www/images/logo/type.gif"
width="1743"
height="163"
id="image3612"
x="0"
y="0" />


Change to xlink:href="file:///home/andrew/Sites/com/operationaldynamics/www/images/logo/type.gif" and the crash is gone (although I suspect you will want to compeltely remove the <image> element, as it seems unwanted).


I am attaching a minimal testcase. Add this svg to a libreoffice file, and save the file. You will receive the rtl::MalformedUriException
Comment by Andrew Cowie (afcowie) - Monday, 27 May 2013, 06:31 GMT
The problem is these were perfectly legitimate documents created by Libre Office and that load fine on LO 3.x. Open Document Format is supposed to be stable and files no longer loading is not really cool. Meanwhile, to be clear, I can't *open* the files, and manually unzipping, editing, and rezipping .odt files to hunt down supposedly malformed elements is not much of a workaround.

AfC
Comment by Andreas Radke (AndyRTR) - Sunday, 07 July 2013, 11:34 GMT
Check for upstream issues.
Comment by Andreas Radke (AndyRTR) - Sunday, 01 September 2013, 09:30 GMT
Please check 4.1.1-2!
Comment by zless (roentgen) - Sunday, 01 September 2013, 11:31 GMT
Still crashing with

terminate called after throwing an instance of 'rtl::MalformedUriException'

Andrew Cowie have you filled/found a report upstream?
Comment by Andreas Radke (AndyRTR) - Wednesday, 23 October 2013, 18:04 GMT
if it's still crashing you should really report it upstream. OSS bugs usually won't get fixed automatically by magic random commits.
Comment by Stephan Bergmann (sberg) - Friday, 28 February 2014, 22:34 GMT
  • Field changed: Percent Complete (100% → 0%)
note upstream issue URL <https://bugs.freedesktop.org/show_bug.cgi?id=75582>

Loading...