Bug Hunting Session
Bug 78900 - FILEOPEN: Writer crash when open this file .rtf
Summary: FILEOPEN: Writer crash when open this file .rtf
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1.2.3 release
Hardware: Other Windows (All)
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: BSA target:4.3.0 target:4.2.5
Keywords: regression
Depends on:
Blocks:
 
Reported: 2014-05-19 10:44 UTC by ggentilotti
Modified: 2014-05-26 14:44 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
The rtf file then generete the error (7.92 KB, application/rtf)
2014-05-19 10:44 UTC, ggentilotti
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ggentilotti 2014-05-19 10:44:31 UTC
Created attachment 99318 [details]
The rtf file then generete the error

Problem description: 

Steps to reproduce:
1. Open the file .rtf attached
2. Writer 4.2.2.1 crash with the "i/o general error"
3. ....

Current behavior:

Expected behavior:

              
Operating System: Windows 8
Version: 4.2.2.1 release
Comment 1 tommy27 2014-05-19 11:11:32 UTC
tested under Win7x64

"i/o general error" confirmed under Win7x64 using LibO 4.2.4.2 and older releases up to 4.1.2.3 while I can load the file and see text with LibO 4.1.1.2

hence it's a regression between 4.1.1 and 4.1.2

interestingly WordPad and Apache OpenOffice 4.1 load the file as an empty sheet with no text...
Comment 2 Caolán McNamara 2014-05-25 16:56:34 UTC
a size of 0 is set on a writer textbox which throws illegalargument due to that, and the exception halts the import of the rtf
Comment 3 Miklos Vajna 2014-05-26 13:18:41 UTC
Root cause is that the \dpx, \dpy, \dpxsize and \dpysize (old-style RTF shapes) RTF control words don't respect the parser stack and have effect outside their own scope, it turns out, so I need to add an exception for this in the tokenizer.
Comment 4 Commit Notification 2014-05-26 13:41:33 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=21c11ffe254612ac46aa891addacb0024d5b93f0

fdo#78900 RTF import: allow \dpxsize inside \dptxbxtext



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 5 Commit Notification 2014-05-26 13:44:11 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c9196ba88cc6262b88cbf8bd1e7af9ae78a3cc5b&h=libreoffice-4-3

fdo#78900 RTF import: allow \dpxsize inside \dptxbxtext


It will be available in LibreOffice 4.3.

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 6 Miklos Vajna 2014-05-26 13:49:40 UTC
-4-2 review: https://gerrit.libreoffice.org/9488
Comment 7 Commit Notification 2014-05-26 14:44:48 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=dba6c0414cdbf744fb99c47dd1a04ba1a6ee3f71&h=libreoffice-4-2

fdo#78900 RTF import: allow \dpxsize inside \dptxbxtext


It will be available in LibreOffice 4.2.5.

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.