Bug 120387 - EDITING Copy Chart Axis Title causes LibreOffice Calc crash
Summary: EDITING Copy Chart Axis Title causes LibreOffice Calc crash
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha0+
Hardware: All All
: highest critical
Assignee: Not Assigned
URL:
Whiteboard: target:6.2.0 target:6.1.3
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2018-10-07 17:10 UTC by matthewnote
Modified: 2018-10-28 03:05 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
chart demo crash (14.88 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-10-08 17:43 UTC, Oliver Brinzing
Details
gdb backtrace (31.98 KB, text/x-log)
2018-10-08 20:44 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description matthewnote 2018-10-07 17:10:48 UTC
Description:
Charts (for example x,y scatter plots) are added to a spreadsheet usually by creating new.  It's often necessary to add appropriate axes titles later.  Sometimes a Chart already done has the full appropriate title text.  It's a reflex to open it for editing, click on the axis title box, highlight the text and click right on the mouse to copy for use elsewhere.  LibreOffice 6.0.6.2 crashes abruptly then offers a recovery of all work (including open Writer documents) and then does so perfectly.

Steps to Reproduce:
1.Creating two Charts on a sheet.
2.Added titles on x and y axes for the first.  Went back to the y axis title; double-clicked the y axis title box which turned 90° for convenience.  Highlighted the text using mouse/click left/drag.
3.Click mouse right for the usual 'copy' option and LibreOffice Calc crashes, closing all documents.

Actual Results:
LibreOffice offers recovery of all documents and does so.

Expected Results:
Copy and paste of Axis titles is of help when very many graphics are in use.



Reproducible: Always


User Profile Reset: Yes



Additional Info:
Typing out all titles for all axes for all graphics is the workaround and not too much work.  The crash is the surprise.  The Bionic Beaver with LibreOffice 6.0.6.2 is nigh unstoppable.  Three weeks use, ten hours per day and not one stoppage of any sort (until this particular bug).  Wonderful!

LO 6.0.6.2  build 1:6.0.6-0ubuntu0.18.04.1
Bionic Beaver on Shuttle KabyLake PC with two ultraHD monitors.
Comment 1 Oliver Brinzing 2018-10-08 17:43:09 UTC
Created attachment 145488 [details]
chart demo crash

reproducible with

Version: 6.1.2.1 (x64)
Build-ID: 65905a128db06ba48db947242809d14d3f9a93fe
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; 
Gebietsschema: de-DE (de_DE); Calc: 

Version: 6.2.0.0.alpha0+ (x64)
Build ID: 315e585f283e6e4a5f1ac11e7d17a638d04e82b0
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: de-DE (de_DE); Calc:

but not with:

Version: 5.4.7.2
Build-ID: c838ef25c16710f8838b1faec480ebba495259d0
CPU-Threads: 4; BS: Windows 6.2; UI-Render: Standard; 
Gebietsschema: de-DE (de_DE); Calc: single
Comment 2 Oliver Brinzing 2018-10-08 17:44:25 UTC
- double click title
- ctrl + A
- open context menu 
- crash
Comment 3 Xisco Faulí 2018-10-08 19:02:52 UTC
Reproduced in

Versión: 6.1.2.1
Id. de compilación: 65905a128db06ba48db947242809d14d3f9a93fe
Subprocs. CPU: 1; SO: Windows 6.1; Repres. IU: predet.; 
Configuración regional: es-ES (es_ES); Calc: group threaded

Interestingly, there's no crash report after the crash...
Comment 4 Xisco Faulí 2018-10-08 19:17:48 UTC
Regression introduced by:

author	Jan-Marek Glogowski <glogow@fbihome.de>	2017-08-15 08:05:51 +0200
committer	Jan-Marek Glogowski <glogow@fbihome.de>	2017-09-19 09:25:14 +0200
commit	3840aede596e6fc24f7ed7df9100fb028134aac6 (patch)
tree	74d1d5efa3b2ad5448181fc185faf226aed192e4
parent	10b49dfb3996f99dec8dd0d2ffae2aef4022f395 (diff)
Unify SolarMutex implementations

Bisected with: bibisect-linux64-6.0

Adding Cc: to Jan-Marek Glogowski
Comment 5 Jan-Marek Glogowski 2018-10-08 20:24:44 UTC
I don't know how many bugs this patch has unvailed.
This patch is not the bug, but a forced crash via std::abort().
Every developer should be able to fix it.

Someone tries to release a mutex he doesn't own, which is undefined behaviour and might eat your data, or crash, or ... anythung else - it's undefined. Better to panic and abort, before we really silently break something.

I'll probably have a look at the backtrace tomorrow and stick a SolarMutexGuard somewhere in there and hope (again) it's the last one. OTOH everyone can introduce new bugs of this kind, where the patch enforces an abort.

Should make it into 6.0.7 hopefully. Three patches to go.
Comment 6 Xisco Faulí 2018-10-08 20:44:34 UTC
Created attachment 145500 [details]
gdb backtrace
Comment 7 Jan-Marek Glogowski 2018-10-09 09:26:35 UTC
(In reply to Oliver Brinzing from comment #2)
> - double click title
> - ctrl + A
> - open context menu 

An important step is missing.
I thought I was getting crazy, as I had no crash :-)

- select copy

> - crash
Comment 8 Commit Notification 2018-10-09 12:11:18 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#120387 get lock to use ImpEditView::CutCopy

It will be available in 6.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 9 Xisco Faulí 2018-10-10 08:52:39 UTC
Verified in

Version: 6.2.0.0.alpha0+
Build ID: 87e3539d69626780c6d7531b725dd0d64c69e6d8
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: threaded

@Jan-Marek Glogowski, thanks for fixing this!
Comment 10 Commit Notification 2018-10-11 08:04:31 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=72a44569af5d69b3093d01e4d16448509a8ad807&h=libreoffice-6-1

tdf#120387 get lock to use ImpEditView::CutCopy

It will be available in 6.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.
Comment 11 Commit Notification 2018-10-26 20:14:59 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "libreoffice-6-1-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1b6ef95afda2106c10540e6f889bd3fc85408422&h=libreoffice-6-1-3

tdf#120387 get lock to use ImpEditView::CutCopy

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