Bug 85562 - CRASH when inserting an input field
Summary: CRASH when inserting an input field
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.0.alpha1
Hardware: All All
: high critical
Assignee: Julien Nabet
URL:
Whiteboard: target:4.4.0
Keywords: haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2014-10-28 15:17 UTC by sophie
Modified: 2014-11-05 09:46 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Linux 4.4 master backtrace (5.63 KB, text/plain)
2014-10-28 15:23 UTC, Matthew Francis
Details
patch (1.19 KB, text/plain)
2014-10-29 22:38 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sophie 2014-10-28 15:17:12 UTC
Hi, step to reproduce:
- add some text to a writer document
- set the cursor in the text
- Ctrl+F2 or Insert > Field > Others
- choose Input field under Function tab
==> Writer crashes
When launching Writer again, the Field dialog is still open on the first tab.
Version: 4.4.0.0.alpha1+
Build ID: 7ef698355ad59c6fa263daa4ded124cf512e8926
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2014-10-27_09:37:25 Ubuntu 14.04 x64 - Sophie
Comment 1 Matthew Francis 2014-10-28 15:23:20 UTC
Created attachment 108574 [details]
Linux 4.4 master backtrace
Comment 2 Matthew Francis 2014-10-28 15:25:49 UTC
Confirmed on Linux / 4.4 master (I suspect this is platform independent but I don't have an OSX master build ready)

Looks like a fatal assert, which would trip on a dbgutil build but not a release build

-> NEW
Comment 3 Matthew Francis 2014-10-28 15:31:46 UTC
Same crash on OSX / 4.4 master, so setting platform to All
Comment 4 Julien Nabet 2014-10-29 22:38:49 UTC
Created attachment 108660 [details]
patch

On pc Debian x86-64 with master sources updated about 10 days ago, I could reproduce the problem.

The attached naive patch prevents from crashing.
However, perhaps it's more complicated than this.
Comment 5 Robinson Tryon (qubit) 2014-10-30 14:04:45 UTC
(In reply to sophie from comment #0)
> Hi, step to reproduce:
> - add some text to a writer document
> - set the cursor in the text
> - Ctrl+F2 or Insert > Field > Others

(For me, the labels are "Insert -> Fields -> More Fields")

> - choose Input field under Function tab

(For me, label is "Functions")

> ==> Writer crashes

NOREPRO

Testing with 4.4.0.0.alpha1 (Build ID: e73cb2cc40530caa75d588833c4b690e4f49f630) + Ubuntu 14.04

Hmm... I wonder if this just showed up in Master, as I'm not seeing it with this alpha1 build.
Comment 6 Buovjaga 2014-10-30 15:15:55 UTC
Confirmed on Win 7. Field dialog was still open when launching LO again after crash.

Version: 4.4.0.0.alpha1+
Build ID: 56019dcb79475606952a954fe732a3109441ffec
TinderBox: Win-x86@39, Branch:master, Time: 2014-10-30_07:27:11
Comment 7 Julien Nabet 2014-10-30 19:51:34 UTC
On pc Debian x86-64 with LO Debian package 4.3.3.1, I don't reproduce this
=> regression
Comment 8 Julien Nabet 2014-10-30 20:32:53 UTC
Looking at git history of the file sw/source/uibase/wrtsh/wrtsh2.cxx, it seems due or triggered by this:
http://cgit.freedesktop.org/libreoffice/core/commit/?id=bbd97fe57d9ec184ef6aee36bd57d6d7e53b4719

Michael: any thoughts?

(meanwhile I increase the importance since it's a crash + regression + impact all platforms)
Comment 9 Michael Stahl (allotropia) 2014-10-31 22:04:35 UTC
oops that was my fault, thanks Julien for tracking down the commit!

fixed on master
Comment 10 Commit Notification 2014-10-31 22:04:50 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

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

fdo#85562: sw: fix crash on insert of input field and set variable field

It will be available in 4.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 11 sophie 2014-11-05 09:46:44 UTC
Hi, tested it today with Version: 4.4.0.0.alpha1+
Build ID: b7d8a58ff2698ffc6e22943f64aa97c5ea253bd9
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2014-11-04_23:38:58
No crash, works as expected - Thanks a lot Julien and Michael :) set as Verified - Sophie