Bug 160043 - Calc crashes on Gnome Wayland when saving document while closing other windows
Summary: Calc crashes on Gnome Wayland when saving document while closing other windows
Status: NEEDINFO
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
24.8.0.0 alpha0+ Master
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-05 07:29 UTC by Kevin Suo
Modified: 2024-03-23 01:35 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Doc1.ods (1.65 MB, application/vnd.oasis.opendocument.spreadsheet)
2024-03-05 07:29 UTC, Kevin Suo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Suo 2024-03-05 07:29:54 UTC
Created attachment 192957 [details]
Doc1.ods

Steps To Reproduce:

1. On Fedora 39 Gnome 45.4, install and activate the Dash to Dock Gnome extension.

2. In Dash to Dock Settings > Behavior > Click Action, use "Focus, minimize or show previews", OK.

3. Open the attached ods file (I name it as "Doc1" below) in a LibreOffice debug build.

(debug build is needed here because on a release build the following saving process would be too fast for you to do the other steps. If you do want to use a release build, you may need to duplicate 10 copies of the sheet in the test doc, to make the file large enough to slow down the saving process)

4. Click the toolbar icon to create 2 new Calc empty documents (I name them Doc2 and Doc3).

5. Ctrl+S to trigger the saving of Doc1.

6. While Doc1 is in the process of saving, click the LibreOffice Calc icon in Dash To Dock, you get Doc1, Doc2 and Doc3 as Previews. Click Doc2 and then click the "X (i.e. close button)" on the top-right of the window manager. Do the same for Doc3. (Now the two windows are not responding because they are waiting for Doc1 to finish saving, fine)

7. Click the Dash to Dock icon to switch to Doc2 window, then switch to Doc3 window.

8. Wait.

> Crash. All Doc1, Doc2 and Doc3 are closed.
It is expected that only Doc2 and Doc3 are closed. Doc1 should remain open.

Actually it seems not a crash when I do this in gdb. Gdb bt gives no backtrace. The terminal gives the following message which may be relevant:
Gdk-Message: 14:52:24.450: Lost connection to Wayland compositor.

It is noted that it does not crash if I use "Minimize or show previews" in Dock Settings > Behavior > Click Action. So the "Focus" here makes a difference.

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 9574a62add8e4901405e12117e75c86c2d2c2f21
CPU threads: 8; OS: Linux 6.7; UI render: default; VCL: gtk3
Locale: zh-CN (zh_CN.UTF-8); UI: en-US
Calc: threaded

## Hardware Information:
- **Hardware Model:**                    Lenovo ThinkPad X1 Carbon Gen 8
- **Memory:**                            16.0 GiB
- **CPU:**                               Intel® Core™ i5-10210U × 8
- ** Graphic:**                          Intel® UHD Graphics (CML GT2)

## Software Information:
- **OS:**                                Fedora Linux 39 (Workstation Edition)
- **OS Type:**                           64 bit
- **GNOME Version:**                     45.4
- **Window System:**                     Wayland
- **Kernel:**                            Linux 6.7.6-200.fc39.x86_64
Comment 1 Kevin Suo 2024-03-05 07:31:47 UTC
Caolán: I add you to cc. Maybe you are interested in this one.
Comment 2 Caolán McNamara 2024-03-05 09:49:05 UTC
didn't crash for me, but by default the "new spreadsheet" seemed to be launched from the default system libreoffice and not the running dbgutil first one so probably didnt' replicate the original problem
Comment 3 Stéphane Guillou (stragu) 2024-03-23 01:35:06 UTC
Kevin, can you replicate this with an app other than LO?

I can't test as my GNOME version is too old. Also, according to the comments on the extension website, it does not work anymore with GNOME 46.