Bug 97331 - Crash conditional formatting, when scrolling on Icon set
Summary: Crash conditional formatting, when scrolling on Icon set
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.0.1.2 release
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:5.2.0 target:5.1.1 target:5.0.6
Keywords: haveBacktrace
Depends on:
Blocks:
 
Reported: 2016-01-22 23:41 UTC by Julien Nabet
Modified: 2016-10-25 19:12 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
bt with debug symbols (5.07 KB, text/plain)
2016-01-22 23:41 UTC, Julien Nabet
Details
Screenshot crash report. (11.00 KB, image/png)
2016-01-23 02:43 UTC, m_a_riosv
Details
Screenshot crash scrolling mouse wheel. (52.58 KB, image/png)
2016-01-23 13:15 UTC, m_a_riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Nabet 2016-01-22 23:41:12 UTC
Created attachment 122166 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I've got a crash when doing this:
- open Calc on a brand new file
- select some empty cells
- Menu Format/Conditional formatting/Icon Set...
=> conditional formatting dialog appears
- with mouse, hover "All Cells" or "Icon Set"
- scroll up/down several times to change options
- crash after some scrolls, it can be 2, 5, 10 but it'll finally crash
Comment 1 Julien Nabet 2016-01-23 00:12:45 UTC
Caolan: noticing http://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=641154c259334874bbbcb735f0064f3241f293ad, thought you might have some idea about the cause of the attached bt showing vcl part.
Comment 2 m_a_riosv 2016-01-23 02:43:20 UTC
Created attachment 122169 [details]
Screenshot crash report.

I'm not able to reproduce:
Win10x64
Version: 5.2.0.0.alpha0+ Build ID: c81eddbb20c84280aa64c712e34c829380b24527
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-01-22_04:19:03

But my appreciation is that after make a selection, the list box loses the focus.

I have found that:
Selecting other than 'All Cells', selecting an 'Apply Style' with mouse and after changing the selected style with the up-arrow goes to crash, attached MV C++ direct crash report.
Comment 3 Yan Pas 2016-01-23 09:40:41 UTC
LO crashes, so I guess this bug must be marked as CRITICAL
Comment 4 Julien Nabet 2016-01-23 10:54:48 UTC
Sorry I forgot to pinpoint something:
it crashes in acceptableWheelScrollTarget method so shouldReusePreviousMouseWindow must return true.
Reading this part:
   1320 //If the last event at the same absolute screen position was handled by a
   1321 //different window then reuse that window if the event occurs within 1/2 a
   1322 //second, i.e. so scrolling down something like the calc sidebar that contains
   1323 //widgets that respond to wheel events will continue to send the event to the
   1324 //scrolling widget in favour of the widget that happens to end up under the
   1325 //mouse.
   1326 static bool shouldReusePreviousMouseWindow(const SalWheelMouseEvent& rPrevEvt, const SalWheelMouseEvent& rEvt)
   1327 {
   1328     return (rEvt.mnX == rPrevEvt.mnX && rEvt.mnY == rPrevEvt.mnY && rEvt.mnTime-rPrevEvt.mnTime < 500/*ms*/);
   1329 }
it means you must scroll fast enough to reproduce the crash (less than 0.5s between each scroll)
Indeed, if I wait, let's say 1 sec for example, between each scroll, I got no crash.
Comment 5 m_a_riosv 2016-01-23 13:15:57 UTC
Created attachment 122172 [details]
Screenshot crash scrolling mouse wheel.

Same crash scrolling with the mouse wheel in the style list box.
Comment 6 Luke Picciau 2016-01-24 02:30:43 UTC
Was able to reproduce on Ubuntu

OS: Ubuntu 15.10
LO Version: 5.0.4.2
Build ID: 1:5.0.4~rc2-0ubuntu1~wily1
Locale: en-AU (en_AU.UTF-8)
Comment 7 Commit Notification 2016-01-26 14:49:18 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=5d29ed1801a07d4649e095c25935b50f5ad32eb4

Resolves: tdf#97331 use VclPtr instead of pointers to avoid crash

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 8 Commit Notification 2016-01-26 14:49:24 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

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

Resolves: tdf#97331 use VclPtr instead of pointers to avoid crash

It will be available in 5.1.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 9 Yan Pas 2016-01-26 14:54:36 UTC
Push fix to 5.0.6 or 5.0.5 please too
Comment 10 Commit Notification 2016-01-26 20:27:48 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=72c2f90a42dad97cf9bc1a20c15f9946348fe01b&h=libreoffice-5-0

Resolves: tdf#97331 use VclPtr instead of pointers to avoid crash

It will be available in 5.0.6.

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.