Bug 99699 - Writer crashes saving docx file after insertion of cross-reference
Summary: Writer crashes saving docx file after insertion of cross-reference
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.1.2.2 release
Hardware: All All
: medium major
Assignee: Michael Weghorn
URL:
Whiteboard: target:5.2.0 target:5.1.4
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2016-05-06 01:30 UTC by Gabriel
Modified: 2016-10-25 19:01 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Output from backtrace (3.61 KB, application/gzip)
2016-05-08 00:31 UTC, Gabriel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabriel 2016-05-06 01:30:28 UTC
Every time I edit a docx file and insert cross-reference to tables in the document, it crashes in the moment I try to save the file. If I do the same steps, but save in odt format, it does not crash. 

Steps:
1- Open existing docx file.
2- Insert cross-reference.
3- Click the save button.
4- Confirm docx format.
5- Crash. Work may be lost.

I am using Libreoffice 5.1.2.2, OS: Ubuntu 16.04.
Comment 1 Buovjaga 2016-05-07 12:58:07 UTC
Could not reproduce.
Maybe you could attach a .docx that crashes for you.

You could also do this: https://wiki.documentfoundation.org/QA/BugReport/Debug_Information#GNU.2FLinux:_How_to_get_a_backtrace
Note: The debugging package for (older) Debian, Ubuntu or their derivatives is libreoffice-dbg, while for newer Debian, Ubuntu it is libreoffice-*-dbgsym

64-bit, KDE Plasma 5
Build ID: 5.1.2.2 Arch Linux build-1
CPU Threads: 8; OS Version: Linux 4.5; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8)

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided more information + document.
Comment 2 Gabriel 2016-05-08 00:31:29 UTC
Created attachment 124903 [details]
Output from backtrace
Comment 3 raal 2016-05-10 13:24:39 UTC
This seems to have begun at the below commit.
Adding Cc: to Michael Weghorn; Could you possibly take a look at this one? Thanks
 69850d49a13e25492b26ef2bccb80eae8f6294fc is the first bad commit
commit 69850d49a13e25492b26ef2bccb80eae8f6294fc
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Mon May 18 13:51:31 2015 -0500

    source a1fb4ac1991a8da2e527b64a0a01a88a8f2959e3

author	Michael Weghorn <m.weghorn@posteo.de>	2015-01-16 13:50:00 (GMT)
committer	Noel Grandin <noelgrandin@gmail.com>	2015-01-19 06:17:58 (GMT)
commit a1fb4ac1991a8da2e527b64a0a01a88a8f2959e3 (patch)
tree 3afabf8fb5bb88d77f72f095e32ff23d38d3f42c
parent d1aecd4353bd6ac3961a30df67de78f4b8f0a66b (diff)
fdo#39440 sw: reduce scope of local variables
Comment 4 Michael Weghorn 2016-05-10 18:43:31 UTC
(In reply to raal from comment #3)
> This seems to have begun at the below commit.
> Adding Cc: to Michael Weghorn; Could you possibly take a look at this one?
> Thanks
> 

Thank you very much for bisecting this! I will have a look at it.
Comment 5 Commit Notification 2016-05-14 17:34:06 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

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

tdf#99699 Do nullptr check BEFORE calling method

It will be available in 5.2.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 Michael Weghorn 2016-05-14 22:17:29 UTC
This is now fixed on the "master" branch.
Pending review for LibreOffice 5.1: https://gerrit.libreoffice.org/#/c/25001/
Comment 7 Commit Notification 2016-05-15 09:48:17 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d19b0fd3525aefd1c7d1b8b6564c77ffffede4e2&h=libreoffice-5-1

tdf#99699 Do nullptr check BEFORE calling method

It will be available in 5.1.4.

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.