Bug 100574 - Crash when selecting and applying border style from toolbar in a certain way
Summary: Crash when selecting and applying border style from toolbar in a certain way
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
5.2.0.0.beta2
Hardware: All All
: medium major
Assignee: Caolán McNamara
URL:
Whiteboard: target:5.3.0 target:5.2.0
Keywords: regression
Depends on:
Blocks:
 
Reported: 2016-06-24 02:39 UTC by Aron Budea
Modified: 2016-10-14 17:23 UTC (History)
4 users (show)

See Also:
Crash report or crash signature: ["FloatingWindow::ImplEndPopupMode(FloatWinPopupEndFlags,VclPtr<vcl::Window> const &)"]


Attachments
valgrind log (11.90 KB, text/plain)
2016-06-28 16:11 UTC, Caolán McNamara
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2016-06-24 02:39:58 UTC
1. Open Calc.
2. Open Border Style dropdown.
3. Click on "Border Style" text above the choices.
4. Click the Border Style dropdown button.
5. Select a style.

=> crash

Occurs in 5.2 beta2 & 5.2.0.1 in Windows 7 & Linux. Does not occur in 5.1.3.2 => regression.
Got a nice crash report as well: http://crashreport.libreoffice.org/stats/crash_details/6fbc322f-5671-4688-ac25-60979a2f945e
Comment 1 Aron Budea 2016-06-24 02:41:53 UTC
Also occurs in master build (Build ID: 909d87cc6187ecffa2704e67ffbe372fd2d90e49).
Comment 2 Buovjaga 2016-06-26 12:47:18 UTC
I don't get the crash.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.3.0.0.alpha0+
Build ID: ff25ea3d5ccf3a990767cbb1ef99037d3f84b072
CPU Threads: 8; OS Version: Linux 4.6; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8)
Built on June 26th 2016
Comment 3 Aron Budea 2016-06-26 16:14:45 UTC
JoNi also tested this, and couldn't reproduce in Linux with master build from Friday (24th). However in Windows 7 it's still reproducible with this daily build: libo-master~2016-06-24_23.12.13_LibreOfficeDev_5.3.0.0.alpha0_Win_x86.msi

The crash also occurred for me in Linux (Ubuntu 15.10) with 5.2.0.1.
I'd assume the issue is not fixed, but maybe depends on something else as well in Linux.
Comment 4 baffclan 2016-06-28 11:37:20 UTC
Reproduce with 5.2.0.1, 5.3.0.0.alpha0+.
OS: Windows 7 Pro x64

http://crashreport.libreoffice.org/stats/crash_details/ab460c3c-35b3-499f-b062-68d29e2f8faa
Version: 5.2.0.1 (x64)
Build ID: fcbcb4963bda8633ba72bd2108ca1e802aad557d
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
Locale: ja-JP (ja_JP)

http://crashreport.libreoffice.org/stats/crash_details/4f8234fb-128d-4e8f-9d85-fe2398615390
Version: 5.3.0.0.alpha0+ (x64)
Build ID: f536a83d51443d19dba58157cea28fb67a090e02
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2016-06-13_01:19:21
Locale: ja-JP (ja_JP)
Comment 5 Buovjaga 2016-06-28 11:43:24 UTC
NEW per comment 4
Comment 6 Caolán McNamara 2016-06-28 16:11:41 UTC
Created attachment 125968 [details]
valgrind log
Comment 7 Caolán McNamara 2016-06-28 20:24:31 UTC
Seems to be that when the second one is popped down it gives the focus to the old one, and the second one listens to losing the focus and disposes itself which leads to dereferencing deleted stuff.

So add a reference count to the places these tear offs call popdown so its still gets disposed but not deleted during the popdown and then protect against members being disposed with a enough checks to get back to safely
Comment 8 Commit Notification 2016-06-28 20:28: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=886637d355e77cd61d85279f145c06b07385fecd

Resolves: tdf#100574 Crash when selecting and applying border style...

It will be available in 5.3.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 Caolán McNamara 2016-06-28 20:29:28 UTC
https://gerrit.libreoffice.org/26751

There might be more of these around tearable floating window menu things. I checked the ones in the calc toolbar and they all seem ok now, but maybe theres others.
Comment 10 Commit Notification 2016-07-08 04:41:54 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=521175906ba9516242968390b71d43edd447d480&h=libreoffice-5-2

Resolves: tdf#100574 Crash when selecting and applying border style...

It will be available in 5.2.1.

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 2016-07-13 20:18:42 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-2-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=11220dbba7b06ac12645b40154f480823d8cb13a&h=libreoffice-5-2-0

Resolves: tdf#100574 Crash when selecting and applying border style...

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 12 Bob Anderson 2016-10-14 17:22:04 UTC
This bug is still a problem to users of Linux Mint 17.3 as the version of LibreOffice installed by Update Manager still seems to be before the fix:

LibreOffice Version: 5.0.3.2
Build ID: 1:5.0.3~rc2-0ubuntu1~trusty2
Locale: en-GB (en_GB.UTF-8)

For those still stuck with this pre-fixed version there is a viable work-around:

Do not use the Border Style dropdown but instead make your border formatting from the Format Menu, i.e.

Format > Cells > Border Tab