Bug 154072 - crash / no effect when clicking some dropdown buttons when toolbar overflows
Summary: crash / no effect when clicking some dropdown buttons when toolbar overflows
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.4.4.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
: 154079 156158 (view as bug list)
Depends on:
Blocks: Wayland GTK3 Notebookbar-Tabbed Toolbars-Overflow
  Show dependency treegraph
 
Reported: 2023-03-08 15:11 UTC by Stéphane Guillou (stragu)
Modified: 2024-01-28 13:01 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
gdb backtrace with LO 7.6 alpha1+ debug, "no stack" (35.81 KB, text/x-log)
2023-06-13 21:41 UTC, Stéphane Guillou (stragu)
Details
wayland debug log (482.78 KB, text/plain)
2023-06-13 22:03 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Guillou (stragu) 2023-03-08 15:11:19 UTC
Steps:
1. Open Calc
2. Resize window horizontally in order to hide some dropdown buttons. For a reproducible case, resize to hide buttons up to (and including) the "Format as currency" button.
3. Click on "Borders" button

Result:
Crash

Note:
- Which button crashes or doesn't seems to depend on how many buttons are hidden in the overflow.
- Many buttons don't work either even if they don't crash when clicked.

In console, could be relevant:

Gdk-Message: 16:10:03.472: Error 71 (Protocol error) dispatching to Wayland display.

Similar area to bug 150380 but this was introduced in 7.4 (not 7.0) and is GTK-only.

Repro in 7.4.5, 7.5.1 and recent master build:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 288c0920a8475f9f2c537212e04aa7649192ad8c
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Does not affect win, kf5 or gen VCLs.

Bibisected with linux-64-7.4 repository to first bad commit db06645f56612acb71bcf98ce24e904d5051db8b which points to the fix for bug 152155:

commit b534ee2e972711af2dbaadf2190813054adda902
author	Caolán McNamara <caolanm@redhat.com>	Tue Nov 22 11:33:23 2022 +0000
committer	Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>	Thu Nov 24 08:28:04 2022 +0100
tree 22b8216e13cf610adec917366c39ba0a339427e4
parent 588c40b3a16008bfcfe6bb75e009faecaefccb7d
Resolves: tdf#152155 use gtk's knowledge of relative widget positions
rather than effectively emulate it poorly
Change-Id: If1c215892645d83937d97158a2d3f8ddac10364e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143104

Caolán and Noel, can you please have a look?
Comment 1 Martin Sourada 2023-03-08 19:22:23 UTC
I cannot reproduce the crash, but the dropdown buttons (e.g. border, color, currency) do nothing (just close the expanded panel) when they’re hidden. In 7.3 it works as expected, in 7.4 and 7.5 it's broken.

Version: 7.5.0.1 (X86_64) / LibreOffice Community
Build ID: 77cd3d7ad4445740a0c6cf977992dafd8ebad8df
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: cs-CZ
Calc: threaded
Comment 2 Stéphane Guillou (stragu) 2023-03-08 21:22:25 UTC
*** Bug 154079 has been marked as a duplicate of this bug. ***
Comment 3 Stéphane Guillou (stragu) 2023-03-08 21:23:18 UTC
Confirmed via duplicate bug 154079.
Seems to be Wayland-related?
Comment 4 Buovjaga 2023-04-08 09:32:42 UTC
Clicked all the hidden split buttons, but no crash on Wayland + gtk3

However, I can't repro even with the blamed 288c0920a8475f9f2c537212e04aa7649192ad8c

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 79e60bb93f69370f23010adb078b5a5de5a1e7b2
CPU threads: 8; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Comment 5 Stéphane Guillou (stragu) 2023-04-09 07:20:57 UTC
Martin and Buovjaga, can you please try again with this modified step 3:

1. Open Calc
2. Resize window horizontally in order to hide the buttons up to (and including) the "Format as currency" button.
3. Click on the arrow next to "Border Color"

I could still reproduce with a recent master build, but could not get it to crash with a debug build, and crash reporter does not pop up in any version tested.

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ad5756f0529a80fbb537979bcfd9de7a83a69805
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 6 Buovjaga 2023-04-23 09:26:21 UTC
(In reply to Stéphane Guillou (stragu) from comment #5)
> Martin and Buovjaga, can you please try again with this modified step 3:
> 
> 1. Open Calc
> 2. Resize window horizontally in order to hide the buttons up to (and
> including) the "Format as currency" button.
> 3. Click on the arrow next to "Border Color"
> 
> I could still reproduce with a recent master build, but could not get it to
> crash with a debug build, and crash reporter does not pop up in any version
> tested.

Works fine in a non-debug build under Wayland

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 5cd9de202765e243e41416802f3e4486b8a96f16
CPU threads: 8; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: CL threaded
Comment 7 Stéphane Guillou (stragu) 2023-06-13 21:41:25 UTC
Created attachment 187898 [details]
gdb backtrace with LO 7.6 alpha1+ debug, "no stack"

I could crash a debug build using the steps in comment 3, but couldn't collect a trace.

Version: 7.6.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 7e3ddf1e5aae5e4e956495e3d86a8cbf6e251b5e
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

In the console I see:

Gdk-Message: 23:37:44.155: Error 71 (Protocol error) dispatching to Wayland display.
Comment 8 Stéphane Guillou (stragu) 2023-06-13 22:03:42 UTC
Created attachment 187899 [details]
wayland debug log

In a wayland debug log collected with:

WAYLAND_DEBUG=1 libreofficedev7.6 >& lo-wayland-log.txt

I can see:

[3812106.409] wl_display@1.error(xdg_wm_base@24, 3, "Invalid popup parent window")

This validation seems to have been added to mutter with:

https://mail.gnome.org/archives/commits-list/2020-August/msg10980.html

The commit message says it is a client error:

"Calling `get_popup` on an unmapped window is a client bug, thus post a protocol error when this happens."
Comment 9 Stéphane Guillou (stragu) 2023-07-04 22:49:05 UTC
*** Bug 156158 has been marked as a duplicate of this bug. ***
Comment 10 Stéphane Guillou (stragu) 2024-01-28 00:10:07 UTC
I just ran into another way to crash it, here with the tabbed UI:

Steps:
1. Open Draw with Tabbed UI
3. Reduce window size so the Line / Area controls in the Home tabs overflow
3. From the overflow, click the Line Style dropdown

Results:
- if you click on the down arrow, nothing happens.
- if you click on the line preview, crash. No crash reporter.

In console, same message:

Gdk-Message: 09:53:12.267: Error 71 (Protocol error) dispatching to Wayland display.

Started at same commit.

Maybe these steps are more consistent and also crash for you, Buovjaga?
Comment 11 Buovjaga 2024-01-28 13:01:43 UTC
(In reply to Stéphane Guillou (stragu) from comment #10)
> I just ran into another way to crash it, here with the tabbed UI:
> 
> Steps:
> 1. Open Draw with Tabbed UI
> 3. Reduce window size so the Line / Area controls in the Home tabs overflow
> 3. From the overflow, click the Line Style dropdown
> 
> Results:
> - if you click on the down arrow, nothing happens.
> - if you click on the line preview, crash. No crash reporter.
> 
> In console, same message:
> 
> Gdk-Message: 09:53:12.267: Error 71 (Protocol error) dispatching to Wayland
> display.
> 
> Started at same commit.
> 
> Maybe these steps are more consistent and also crash for you, Buovjaga?

No crash for me under Wayland. Clearly there is something different in our systems.

Version: 7.6.5.0.0+ (X86_64) / LibreOffice Community
Build ID: 30ee116ee498160a366a5a618649f832ae371f7d
CPU threads: 8; OS: Linux 6.7; UI render: default; VCL: gtk3
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ef6083200a4f28e43198c7a0878da6f4b880725f
CPU threads: 8; OS: Linux 6.7; UI render: default; VCL: gtk3
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded