Bug 106724 - CRASH: FILEOPEN: Cannot open docx file with citation in comment
Summary: CRASH: FILEOPEN: Cannot open docx file with citation in comment
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4 all versions
Hardware: All All
: highest critical
Assignee: Caolán McNamara
QA Contact:
URL:
Whiteboard: target:5.4.0 target:5.2.7 target:5.3.3
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2017-03-23 16:44 UTC by syxton
Modified: 2017-07-10 15:35 UTC (History)
2 users (show)

See Also:
Crash report or crash signature: ["rtl_uString_assign"]


Attachments
Working file with comments and references (17.70 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-03-23 16:44 UTC, syxton
Details
Same file but with a citation in the comment (17.86 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-03-23 16:45 UTC, syxton
Details
gdb backtrace (232.58 KB, text/x-log)
2017-03-24 10:06 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description syxton 2017-03-23 16:44:35 UTC
Created attachment 132104 [details]
Working file with comments and references

See the attached files.  If a citation is made in the main body of the text, the file will open in Writer.  If the citation is made in the text of a comment in Word, the file will fail to open in Writer.
Comment 1 syxton 2017-03-23 16:45:32 UTC
Created attachment 132105 [details]
Same file but with a citation in the comment
Comment 2 syxton 2017-03-23 16:48:48 UTC
We found this issue because we are running a Moodle server that uses a python script called unoconv to run LibreOffice headless for conversion related duties.

We are running 5.0.6.2-3.el7 on our servers.

As my tests, I am running 5.1.4-0ubuntu1
Comment 3 Xisco Faulí 2017-03-24 10:01:32 UTC
Regression introduced by:

author	Miklos Vajna <vmiklos@collabora.co.uk>	2014-07-16 08:46:38 (GMT)
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2014-07-16 09:29:35 (GMT)
commit	b2bc4ea8ddae6b01f344469d988e21fed3143c42 (patch)
tree	2a9adbab7706d1b79d78b173a8724cfcbb921340
parent	1fcbc55b284463a3613849caa43c2e9c82aced1c (diff)
DOCX import: handle SDT around citation field
There were two problems here:

1) Citation field was around a run, but was exported as around the
paragraph.

2) The SDT properties were discarded, as they were inserted into a
character context that was thrown away. To fix this, add a (character
properties) context to the field state, so when it's inserted, it can
have the requested properties.

Bisected with bibisect-44max.

Adding Cc: to Miklos Vajna
Comment 4 Xisco Faulí 2017-03-24 10:06:49 UTC
Created attachment 132118 [details]
gdb backtrace
Comment 5 Caolán McNamara 2017-03-24 12:59:46 UTC
I think that commit just brought existing broken into use
Comment 6 Commit Notification 2017-03-24 13:19:46 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#106724 crash when Title property doesn't already exist

It will be available in 5.4.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 7 Caolán McNamara 2017-03-24 13:57:01 UTC
fixed in master, backports for 5-3 and 5-2 in gerrit
Comment 8 Commit Notification 2017-03-27 12:06:08 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=944dcced10c10015fb5c97ba467119425c463b11&h=libreoffice-5-2

Resolves: tdf#106724 crash when Title property doesn't already exist

It will be available in 5.2.7.

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 9 Commit Notification 2017-03-27 12:06:15 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1255360bffebef0f0521b00c4e5af57e6fe09e6b&h=libreoffice-5-3

Resolves: tdf#106724 crash when Title property doesn't already exist

It will be available in 5.3.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.