Bug Hunting Session
Bug 94835 - RTF file cannot be opened (crash)
Summary: RTF file cannot be opened (crash)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: All All
: medium critical
Assignee: Not Assigned
URL:
Whiteboard: target:5.1.0
Keywords: haveBacktrace, regression
Depends on:
Blocks: RTF
  Show dependency treegraph
 
Reported: 2015-10-06 18:34 UTC by Dženan Zukić
Modified: 2016-10-10 12:02 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
RTF file of a bank statement (personal information removed) (3.37 KB, application/msword)
2015-10-06 18:34 UTC, Dženan Zukić
Details
gdbtrace (3.14 KB, application/x-zip-compressed)
2015-10-07 16:57 UTC, raal
Details
A file which is not displayed properly (20.45 KB, application/rtf)
2015-11-03 00:47 UTC, Dženan Zukić
Details
A correct rendering of the file (57.85 KB, application/pdf)
2015-11-03 00:50 UTC, Dženan Zukić
Details
An incorrect rendering of the file by LibreOffice (27.38 KB, application/pdf)
2015-11-03 00:50 UTC, Dženan Zukić
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dženan Zukić 2015-10-06 18:34:39 UTC
Created attachment 119367 [details]
RTF file of a bank statement (personal information removed)

Trying to open the attached file produces an error dialog with following content:

General Error.
General input/output error.

The file can be opened by Wordpad but looks scrambled. MS Word opens it properly.
Comment 1 raal 2015-10-07 16:42:55 UTC
This file crashes Version: 5.1.0.0.alpha1+
Build ID: 83ef294dddf3b1ab5cd5f91a792a7d9413a08f1f
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2015-09-20_07:00:46
crash in LO 4.4.2, linux
Comment 2 raal 2015-10-07 16:57:41 UTC
Created attachment 119398 [details]
gdbtrace
Comment 3 Julien Nabet 2015-10-07 17:32:01 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this, here's the relevant part with enable-dbgutil:
#4  0x00002aaad65b3fd1 in com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>::operator->() const (this=0x2dcc3d0)
    at /home/julien/compile-libreoffice/libreoffice/include/com/sun/star/uno/Reference.h:402
#5  0x00002aaad65983f9 in writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword, int) (this=0x2bfedd0, nKeyword=writerfilter::rtftok::RTF_DPPTY, nParam=1232) at /home/julien/compile-libreoffice/libreoffice/writerfilter/source/rtftok/rtfdocumentimpl.cxx:4664
#6  0x00002aaad660906f in writerfilter::rtftok::RTFTokenizer::dispatchKeyword(rtl::OString&, bool, int) (this=0x2c05cc0, rKeyword="dppty", bParam=true, nParam=1232)
    at /home/julien/compile-libreoffice/libreoffice/writerfilter/source/rtftok/rtftokenizer.cxx:336
#7  0x00002aaad66087ae in writerfilter::rtftok::RTFTokenizer::resolveKeyword() (this=0x2c05cc0)
    at /home/julien/compile-libreoffice/libreoffice/writerfilter/source/rtftok/rtftokenizer.cxx:269
Comment 4 Björn Michaelsen 2015-10-13 09:40:17 UTC
Already crashes in 4.4.5 -> not a regression in 5.0.x
Comment 5 Commit Notification 2015-10-29 11:26:02 UTC
Oliver Specht committed a patch related to this issue.
It has been pushed to "master":

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

tdf#94835: crash while loading RTF with \dppolygon token fixed

It will be available in 5.1.0.

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 Dženan Zukić 2015-11-03 00:47:20 UTC
Created attachment 120216 [details]
A file which is not displayed properly
Comment 7 Dženan Zukić 2015-11-03 00:50:11 UTC
Created attachment 120217 [details]
A correct rendering of the file
Comment 8 Dženan Zukić 2015-11-03 00:50:56 UTC
Created attachment 120218 [details]
An incorrect rendering of the file by LibreOffice
Comment 9 Dženan Zukić 2015-11-03 00:54:01 UTC
The crash is fixed in master. I tested this version:
http://dev-builds.libreoffice.org/daily/master/Win-x86@42/current/libo-master~2015-10-31_09.07.26_LibreOfficeDev_5.1.0.0.alpha1_Win_x64.msi

However the file is not displayed correctly. I attached a file with a bit more content, along with approximately correct conversion to PDF by https://online2pdf.com/text-to-pdf and an incorrect conversion to PDF by LibreOffice. Is this incorrect rendering a known issue?
Comment 10 raal 2015-11-03 07:14:10 UTC
(In reply to Dženan Zukić from comment #9)
> The crash is fixed in master. I tested this version:
> http://dev-builds.libreoffice.org/daily/master/Win-x86@42/current/libo-
> master~2015-10-31_09.07.26_LibreOfficeDev_5.1.0.0.alpha1_Win_x64.msi
> 
> However the file is not displayed correctly. I attached a file with a bit
> more content, along with approximately correct conversion to PDF by
> https://online2pdf.com/text-to-pdf and an incorrect conversion to PDF by
> LibreOffice. Is this incorrect rendering a known issue?

Please open new bug.
Comment 11 Timur 2016-02-08 17:03:13 UTC
Oliver, would you be so kind to backport this to 5.0? Thank you.