Bug 64256 - FILEOPEN: Crash or General Error when opening a docx/rtf file with graphics bullets
Summary: FILEOPEN: Crash or General Error when opening a docx/rtf file with graphics b...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1.0.0.alpha0+ Master
Hardware: All All
: low critical
Assignee: Miklos Vajna
URL:
Whiteboard: BSA target:4.1.0
Keywords: regression
Depends on:
Blocks:
 
Reported: 2013-05-05 23:37 UTC by msjasinski
Modified: 2013-05-07 10:22 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
sample docx file with bullets (you can do a similar one by yourself) (5.47 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2013-05-05 23:37 UTC, msjasinski
Details
another sample (7.08 KB, application/rtf)
2013-05-05 23:38 UTC, msjasinski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description msjasinski 2013-05-05 23:37:41 UTC
Created attachment 78892 [details]
sample docx file with bullets (you can do a similar one by yourself)

Problem description: 

It seems the newly introduced function (by Mr Vajna) works partially for extensions RTF, DOCX. I created such files in LOdev 4.1. They are saved but cannot be loaded. The files load correctly in MS Office 2003, so export works fine.

Steps to reproduce:
1. Open file (attached)

2. Dialog opens: General Error.
General input/output error.

3. File does not load.

Current behavior:
Can export, cannot import file.
Expected behavior:
Can export, can import file.
              
Operating System: Windows XP
Version: 4.1.0.0.alpha0+ Master
Comment 1 msjasinski 2013-05-05 23:38:48 UTC
Created attachment 78893 [details]
another sample
Comment 2 Szuhánszky Tamás 2013-05-06 07:38:42 UTC
Hi!

I can confirm this behavior, and the versions too.
Operating system: Windows 7 64 bit
Comment 3 Jorendc 2013-05-06 10:54:01 UTC
(In reply to comment #2)
> Hi!
> 
> I can confirm this behavior, and the versions too.
> Operating system: Windows 7 64 bit

Therefore I mark it as NEW.

The document crashes on Linux Mint 14 x64 with Version: 4.1.0.0.alpha0+
Build ID: c458ea6d15465d9dada06f259946f854e9e5ccf
Document opens correctly using 4.0.3.3

Is it possible to provide clear step-by-step how we can reproduce that document from scratch? When I create a simple bullet list, export it to docx it reopens correctly.

Thanks,
Joren
Comment 4 msjasinski 2013-05-06 12:09:38 UTC
For me it does not reopen correctly; that is the thing about it.
First I tested multiple file formats using the new "Save a copy" option.
Now I just created a bullet list and saved the file as DOCX - still cannot reopen.

So both attached sample files were created in LOdev 4.1.

Will check though on a different machine with Windows 7 starter.
Comment 5 msjasinski 2013-05-06 12:51:52 UTC
I redid the process on Win 7 Starter (without Java installed), LOdev 4.1 - to the same effect (my WinXP has Java, so I gather its presence is irrelevant).

As for step-by-step. Well, it's pretty obvious. Click Menu Format > Bullets and Numbering > Graphics > choose a desing of your choice > write a few lines > click SAVE (or Save a copy. Reopen file. That's it.
Comment 6 Jorendc 2013-05-06 13:54:28 UTC
(In reply to comment #0)
> It seems the newly introduced function (by Mr Vajna) works partially for
> extensions RTF, DOCX. 

You are sure about the author? As far I can see only Luboš  http://cgit.freedesktop.org/libreoffice/core/commit/?id=7dfc4da808bb26d38090f8afb0d742adabe8cedf committed a patch related to the bullet list.
But I did a 'git revert 7dfc4da808bb26d38090f8afb0d742adabe8cedf' and 'make writerfilter'. Still same behavior/crash.

(In reply to comment #5)
> As for step-by-step. Well, it's pretty obvious. Click Menu Format > Bullets
> and Numbering > Graphics > choose a desing of your choice > write a few
> lines > click SAVE (or Save a copy. Reopen file. That's it.

Thanks. With this steps I can reproduce this behavior. Although, LibreOffice totally crashes on Linux.

Tested using Linux Mint 14 x64 with LibreOffice Version: 4.1.0.0.alpha0+
Build ID: c458ea6d15465d9dada06f259946f854e9e5ccf

Kind regards,
Joren
Comment 7 msjasinski 2013-05-06 14:03:05 UTC
It may be deemed impolite to point to an author, but it was not my intention. It is a newly introduced feature in 4.1. Please look here:
https://wiki.documentfoundation.org/index.php?title=ReleaseNotes/4.1&diff=prev&oldid=66833

You may be right about Mr Luňák's patch - I don't know what it does. The problem occurred even before it though.
Thanks anyway.
Comment 8 Jorendc 2013-05-06 14:09:11 UTC
(In reply to comment #7)
> It may be deemed impolite to point to an author, but it was not my
> intention.
No, not in this case/way :-). In that case we can find more easily the expert in this domain.

> It is a newly introduced feature in 4.1. Please look here:
> https://wiki.documentfoundation.org/index.php?title=ReleaseNotes/4.
> 1&diff=prev&oldid=66833

Thanks for that! Wasn't aware of that.
 
> You may be right about Mr Luňák's patch - I don't know what it does. The
> problem occurred even before it though.
Yes, I reverted Lubos' patch, and it still crashes. So not related to that one :-).

@Miklos: any ideas :-)? Looks like it crashes on Linux and result in a general error on windows.

terminal output while trying to open a file with graphical bullet points:

warn:legacy.osl:4655:1:oox/source/vml/vmlshapecontext.cxx:283: ShapeTypeContext::ShapeTypeContext - missing shape identifier
warn:legacy.osl:4655:1:oox/source/vml/vmlshapecontainer.cxx:44: lclMapShapesById - missing shape identifier
warn:legacy.osl:4655:1:writerfilter/source/dmapper/DomainMapper.cxx:1506: PropertyMap has to be valid!
terminate called after throwing an instance of 'com::sun::star::xml::sax::SAXParseException'


Kind regards,
Joren
Comment 9 Jorendc 2013-05-06 14:23:25 UTC
No crash reproducible using Version 4.1.0.0.alpha0+ (Build ID: 9f0f289c51765c671cbc8ef317c81e6fa42c671). http://cgit.freedesktop.org/libreoffice/core/commit/?id=9f0f289c51765c671cbc8ef317c81e6fa42c671

So bug is introduced between 2013-02-03 00:24:54 (GMT) and 2013-05-06 (now).

Kind regards,
Joren
Comment 10 Miklos Vajna 2013-05-06 14:48:53 UTC
The problem is that when writerfilter handles the NS_ooxml::LN_CT_Lvl_lvlPicBulletId token, it imports the graphic bullet, then tries to save it, either by the GraphicURL or the Bitmap property. We handle the case when such a property is missing, but not when the property is there, just void.

I'll take care of this.
Comment 11 Commit Notification 2013-05-07 10:21:44 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=254c5c694bf2da98d5cf2693639251c6d4205920

fdo#64256 writerfilter: handle void GraphicURL in ListsManager::lcl_sprm



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 12 Miklos Vajna 2013-05-07 10:22:45 UTC
Fixed in master -- no backport as does not affect stable branches.