Bug 120454 - kde5: Sporadic crash when right-clicking items in toolbar
Summary: kde5: Sporadic crash when right-clicking items in toolbar
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
6.2.0.0.alpha0+
Hardware: All Linux (All)
: high major
Assignee: Katarina Behrens (Inactive)
URL:
Whiteboard: target:6.3.0 target:6.2.0.1
Keywords:
Depends on:
Blocks: KDE, KF5 Toolbars
  Show dependency treegraph
 
Reported: 2018-10-09 11:03 UTC by Michael Weghorn
Modified: 2018-12-21 12:42 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
GDB backtrace (2.73 KB, text/plain)
2018-10-09 11:04 UTC, Michael Weghorn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Weghorn 2018-10-09 11:03:19 UTC
version: master build as of commit 260701270abc7997996625449cd3d40f8b4f7f49
VCL: kde5 on X11 (the gtk3 VCL plugin e.g. works fine)
platform: Debian testing, Plasma 5 desktop

Steps to reproduce:

1) start LibreOffice Writer
2) right click on some toolbar item, e.g. "Export to PDF"
3) context menu opens -> close using Esc
4) right click on another toolbar item, e.g. "Print"
5) repeat steps 3 and 4 until bug occurs

Result: LO crashes (often, this happens already when right-clicking the       "Export to PDF" for the first time, but sometimes it takes a few times until the issue appears)
Comment 1 Michael Weghorn 2018-10-09 11:04:05 UTC
Created attachment 145520 [details]
GDB backtrace
Comment 2 Xisco Faulí 2018-11-19 12:13:20 UTC
Still reproduced in

Version: 6.2.0.0.beta1
Build ID: d1b41307be3f8c19fe6f1938cf056e7ff1eb1d18
CPU threads: 1; OS: Linux 4.15; UI render: default; VCL: kde5; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded

increasing severity...
Comment 3 Xisco Faulí 2018-11-19 12:33:42 UTC
it also crashes in Math if using the right-click on the Elements menu ( left size of the window )
Comment 4 Xisco Faulí 2018-11-29 14:24:39 UTC
@Vera, is this issue still reproducible with the latest master ?
Comment 5 Vera Blagoveschenskaya 2018-11-29 14:40:27 UTC
(In reply to Xisco Faulí from comment #4)
> @Vera, is this issue still reproducible with the latest master ?

Can not reproduce for
Version: 6.3.0.0.alpha0+
Build ID: b15b1a2a90fa4c239ff8a6a33e73ff50ea422abf
CPU threads: 1; OS: Linux 4.14; UI render: default; VCL: kde5; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2018-11-28_06:21:05
Locale: ru-RU (ru_RU.UTF-8); UI-Language: en-US
Calc: threaded

Probably this issue was fixed with another bug.

2Xisco
Please Verify this bug if you can't reproduce it too.
Comment 6 Katarina Behrens (Inactive) 2018-11-29 14:45:12 UTC
But I can :( 

w/ self-made master build as of today, following @michaelweghorn's steps from initial comment. No need to click-and-close repeatedly, it crashes reliably 1st time
Comment 7 Katarina Behrens (Inactive) 2018-12-10 09:32:37 UTC
Peeps can someone confirm the following:

If the user right-clicks on toolbar with mouse cursor INSIDE the tooltip (of the nearest toolbar button or other control), crash happens repeatably every time

(ofc the tooltip should disappear once mouse cursor comes close to it so it shouldn't even be possible to right-click, but this ain't happening afaics)
Comment 8 Michael Weghorn 2018-12-10 09:53:28 UTC
(In reply to Katarina Behrens (CIB) from comment #7)
> Peeps can someone confirm the following:
> 
> If the user right-clicks on toolbar with mouse cursor INSIDE the tooltip (of
> the nearest toolbar button or other control), crash happens repeatably every
> time
> 
Good catch, I can confirm.

> (ofc the tooltip should disappear once mouse cursor comes close to it so it
> shouldn't even be possible to right-click, but this ain't happening afaics)
When using the "gen" VCL plugin, the tooltip is never "on top" of the item currently selected, so the described behaviour does not happen there at all. Maybe that's the way it should also work in kde5 (i.e. opening the tooltip at the "correct" location in the first place).
Comment 9 Katarina Behrens (Inactive) 2018-12-10 12:21:17 UTC
Ime the positioning of tooltips gets somehow better if one uses out-of-the-window menubar (either the one invoked from window decoration or the global menubar)

So I suspect something goes wrong w/ the calculation of tooltip positions IF the menu bar is inside the window i.e. the tooltips should appear exactly 1 height of menu bar lower
Comment 10 Commit Notification 2018-12-12 09:13:12 UTC
Katarina Behrens committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/e4e28359d688992deb8be5fbfdb3bcae855a7fe2%5E%21

tdf#120454: Implement native rendering of tooltips

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Katarina Behrens (Inactive) 2018-12-12 12:24:50 UTC
Resolved but as usual pls test zis :)
Comment 12 Michael Weghorn 2018-12-12 12:37:07 UTC
Fix verified with a current master build as of commit 3911bf8364dae4c855ad37237c114f9007f70657 (plus https://gerrit.libreoffice.org/#/c/65020/ on top)
Comment 13 Commit Notification 2018-12-14 16:37:59 UTC
Katarina Behrens committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/077fc6cff20130587017bcc001721e9a158335d1%5E%21

tdf#120454: Implement native rendering of tooltips

It will be available in 6.2.0.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 14 Xisco Faulí 2018-12-21 12:42:35 UTC
Verified in

Version: 6.2.0.1
Build ID: 0412ee99e862f384c1106d0841a950c4cfaa9df1
CPU threads: 1; OS: Linux 4.15; UI render: default; VCL: kde5; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded