Bug 102286 - Crash in: SwWrtShell::CalcAndSetScal - in Writer paste table from Calc multiple times using autocaption (steps in comment 6)
Summary: Crash in: SwWrtShell::CalcAndSetScal - in Writer paste table from Calc multip...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2.0.0.alpha1
Hardware: All All
: highest critical
Assignee: Caolán McNamara
URL:
Whiteboard: target:5.4.0 target:5.2.7 target:5.3.3
Keywords:
Depends on:
Blocks: AutoCaption
  Show dependency treegraph
 
Reported: 2016-09-19 14:39 UTC by Timur
Modified: 2017-07-04 20:09 UTC (History)
3 users (show)

See Also:
Crash report or crash signature: ["SwWrtShell::CalcAndSetScale(svt::EmbeddedObjectRef &,SwRect const *,SwRect const *,bool)"]


Attachments
Test table to insert (6.83 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-10-10 06:56 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timur 2016-09-19 14:39:26 UTC
This bug was filed from the crash reporting server and is br-424acd7d-40bd-409a-93af-1105b8ca09e5.
=========================================
I was inserting Calc table into Writer, but I can't say exactly when the crash happened, on insert, undo etc. It was 5.2.1.2.
Comment 2 Timur 2016-09-19 14:43:18 UTC
I was changing Position options under Options -> LibreOffice Writer -> AutoCaption -> LibreOffice Spreadsheet for Bug 33338, but again I can't say exactly the state when the crash happened.
Comment 3 Timur 2016-09-19 16:17:45 UTC
Crash looks intermittent when position is set to Above, either on Calc table insert via Paste from Calc, or if table inserted via Insert-Object-New Spreadsheet.
Comment 5 Buovjaga 2016-10-09 11:09:27 UTC
Tried pasting Calc data a lot of times, but no crash (with position as Above).
Contrary to Julien, I do have the Spreadsheet option available in Options -> LibreOffice Writer -> AutoCaption.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.3.0.0.alpha0+
Build ID: ff2a399b61f34f7920e594e8cbb6c19045b24956
CPU Threads: 8; OS Version: Linux 4.7; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on October 7th 2016
Comment 6 Timur 2016-10-10 06:56:58 UTC
Created attachment 127908 [details]
Test table to insert

It's fairly easy for me to reproduce, with master or 5.2 like this one: http://crashreport.libreoffice.org/stats/crash_details/97717e74-8e14-4e33-a569-4b3474eb96d8

1. set  Options -> LibreOffice Writer -> AutoCaption -> LibreOffice Spreadsheet: Above
2. open Calc, like attached test table, and mark some cells, like A3:D6
3. Ctrl+V to paste table, enter, again  Ctrl+V to paste table, enter - until crash
(sometimes at once, sometimes after a few pastes)
Comment 7 Buovjaga 2016-10-10 10:53:47 UTC
(In reply to Timur from comment #6)
> Created attachment 127908 [details]
> Test table to insert
> 
> It's fairly easy for me to reproduce, with master or 5.2 like this one:
> http://crashreport.libreoffice.org/stats/crash_details/97717e74-8e14-4e33-
> a569-4b3474eb96d8
> 
> 1. set  Options -> LibreOffice Writer -> AutoCaption -> LibreOffice
> Spreadsheet: Above
> 2. open Calc, like attached test table, and mark some cells, like A3:D6
> 3. Ctrl+V to paste table, enter, again  Ctrl+V to paste table, enter - until
> crash
> (sometimes at once, sometimes after a few pastes)

Ah, now I can repro. Enter is important to press.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.3.0.0.alpha0+
Build ID: 65f2d6b1cc40b4b90f8987e8ea14d24b5f38f950
CPU Threads: 8; OS Version: Linux 4.7; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on October 10th 2016
Comment 8 Xisco Faulí 2017-02-27 19:15:39 UTC
Still reproducible in

Version: 5.4.0.0.alpha0+
Build ID: bd8c68c99cce51a3368d8ddfd6e11dccb72d8f49
CPU threads: 4; OS: Linux 4.8; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 9 Xisco Faulí 2017-02-27 19:28:46 UTC
Also reproduced in

Version: 5.2.0.0.alpha1+
Build ID: 5b168b3fa568e48e795234dc5fa454bf24c9805e
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; 
Locale: ca-ES (ca_ES.UTF-8)
Comment 10 Xisco Faulí 2017-02-28 12:11:55 UTC
'Above' autocaption position was enabled in commit a5fb58caa0f941caacb1fff78c22285bb7f63026. Before it, autocaption position was always 'below' so the crash can be reproduced in previous versions.
@Timur: Any other way the crash can be reproduced without using the position field?
Comment 11 Timur 2017-02-28 18:09:56 UTC
(In reply to Xisco Faulí from comment #10)
> @Timur: Any other way the crash can be reproduced without using the position
> field?
No idea. But there are enough crash reports, maybe there's some other way.
> 'Above' autocaption position was enabled in commit
> a5fb58caa0f941caacb1fff78c22285bb7f63026. Before it, autocaption position
> was always 'below' so the crash can be reproduced in previous versions.
I don't understand this, I didn't get that crash in lower version. If you do, please write steps, does autocaption need to be shown, is it Ctrl+V or Insert-Object, is is New with paste, or From file, is it linked.
Comment 12 Commit Notification 2017-04-07 17:38:14 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=5ce387c4812466e6752b434cf0f5a54f98c6a147

Resolves: tdf#102286 lets not crash on null pFrame

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 13 Timur 2017-04-10 08:11:34 UTC
I tested this one and doesn't seem to crash anymore. 
Please comment on backport to 5.3. It has enough time to go. Although this is not so frequently in use.
Comment 14 Commit Notification 2017-04-10 10:46:03 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=ed4b4cf298af859c354629e0f88ad87161385175&h=libreoffice-5-2

Resolves: tdf#102286 lets not crash on null pFrame

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 15 Commit Notification 2017-04-10 10:46:52 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=32f2370ac805513c4a968bd461d08f66958651d7&h=libreoffice-5-3

Resolves: tdf#102286 lets not crash on null pFrame

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.