Bug 121555 - GTK3: Crash displaying menus with new elements
Summary: GTK3: Crash displaying menus with new elements
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.3 all versions
Hardware: All All
: high major
Assignee: Caolán McNamara
URL:
Whiteboard: target:6.3.0 target:6.2.0.1 target:6.1.5
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks: GTK3
  Show dependency treegraph
 
Reported: 2018-11-20 16:01 UTC by Xisco Faulí
Modified: 2018-12-20 11:11 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
screencast showing the crash (4.35 MB, video/mp4)
2018-11-20 16:04 UTC, Xisco Faulí
Details
bt with debug symbols (6.77 KB, text/plain)
2018-11-20 20:13 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2018-11-20 16:01:32 UTC
Steps to reproduce:
1. Open Writer
2. Go to Tools - Customize
3. Insert - Insert Submenu - type a name
4. Close the Customize dialog
5. Click on any menu
-> CRASH

( if it doesn't crash, repeat step 3 to 5 )

Reproduced in

Version: 6.2.0.0.beta1+
Build ID: c13f4d0a2ff503cdebbc789e1711f90e7b5fe379
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded
Comment 1 Xisco Faulí 2018-11-20 16:04:25 UTC
Created attachment 146841 [details]
screencast showing the crash
Comment 2 Xisco Faulí 2018-11-20 16:12:52 UTC
I believe it was introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=c450705d51a4fe67d1e9391b2f78235b79766cfe

author	Caolán McNamara <caolanm@redhat.com>	2016-06-07 13:16:26 +0100
committer	Caolán McNamara <caolanm@redhat.com>	2016-06-07 13:18:37 +0100
commit	c450705d51a4fe67d1e9391b2f78235b79766cfe (patch)
tree	274a4d9226e2bae532e67b35161589809eb90dea
parent	b5ad72bbfca85946e352b56d9d2ee5eb71cd2132 (diff)
gtk3: wrongly activating the parent menu and not the desired child

Bisected with: bibisect-linux-64-5.3

Adding Cc: to Caolán McNamara
Comment 3 Drew Jensen 2018-11-20 16:42:01 UTC
Confirmed using Ubuntu 18.04 with LO 
Version: 6.3.0.0.alpha0+
Build ID: 8a02a1d329c43df6de383a7b0cf8ac14247b18c9
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2018-11-17_20:48:16

BTW Had to do steps 3-5 twice. A Crash report was sent. 

The first sub menu added included some actual menu items (just zoom commands) and I let that go for a few minutes as I did a couple of things without a crash.

Then, as a second pass and with the same session, added a sub menu to a different top level menu but did not add any items to the sub menu. The crash was instant when I opened a menu after closing the dialog.
Comment 4 Julien Nabet 2018-11-20 20:13:01 UTC
Created attachment 146849 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I could reproduce this.
Comment 5 Xavier Van Wijmeersch 2018-11-26 14:48:58 UTC
can not reproduce with, even after a second attempt for steps 3 to 5

Version: 6.3.0.0.alpha0+
Build ID: 74d6476a045ff2cad36deac51228712d992fb98b
CPU threads: 8; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: nl-BE (en_US.UTF-8); UI-Language: en-US
Calc: threaded

gtk3-3.24.1
Comment 6 Commit Notification 2018-12-19 21:08:34 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#121555 sometime crash on menu hierarchy change

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 7 Caolán McNamara 2018-12-19 21:12:48 UTC
that seems to fix it, backports to 6-2 and 6-1 in gerrit
Comment 8 Commit Notification 2018-12-19 23:13:40 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

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

Resolves: tdf#121555 sometime crash on menu hierarchy change

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 9 Xisco Faulí 2018-12-20 11:02:55 UTC
I've tried ~10 times and I couldn't reproduce the crash anymore

Version: 6.3.0.0.alpha0+
Build ID: 1b7bcaa714f0af45c6a9660d1f0940cb7931ba0f
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Caolán, Thanks for fixing this!!
Comment 10 Commit Notification 2018-12-20 11:11:30 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

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

Resolves: tdf#121555 sometime crash on menu hierarchy change

It will be available in 6.1.5.

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.