Bug 157452 - LibO crashes when opening print dialog on gtk4 VCL
Summary: LibO crashes when opening print dialog on gtk4 VCL
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
7.6.1.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: wantBacktrace
Depends on:
Blocks: Gtk4
  Show dependency treegraph
 
Reported: 2023-09-26 09:56 UTC by Callegar
Modified: 2023-11-07 00:24 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Callegar 2023-09-26 09:56:10 UTC
Description:
Working on a linux laptop, with the KDE desktop environment on a wayland session with an external screen attached set as primary display and laptop built-in screen used as a second screen (docked laptop configuration).

Using the gtk4 VCL because the default kf5 one (as well as the Qt ones) are not usable in the above described setup (because the two screens require different scaling — the laptop is HiDPI, the external display is not — and the kf5 VCL cannot handle this, but this is another issue).

In this setup, LibO with the gtk4 VCL has trouble in opening dialogs, the print dialog in particular. Almost always (but not really always) you get:

```
Error building template class 'GtkDialog' for an instance of type 'GtkDialog': .:0:0 Invalid property: GtkDialog.window-position
```

and then almost always (but not really always), libreoffice closes.

I say "almost always" twice because in rare occasions LibO can actually show the print dialogs and in some occasions when in cannot show the print dialog rather than closing it hangs and you need to kill the process.

Steps to Reproduce:
1. launch `SAL_USE_VCLPLUGIN=gtk4 libreoffice`
2. open a file
3. file->print

Actual Results:
LibO shuts down or hangs

Expected Results:
The print dialog appears


Reproducible: Sometimes


User Profile Reset: No

Additional Info:
[Information automatically included from LibreOffice]
Locale: en-US
Module: TextDocument
[Information guessed from browser]
OS: Linux (All)
OS is 64bit: yes
Comment 1 Stéphane Guillou (stragu) 2023-10-10 10:42:38 UTC
Callegar, are you able to get a backtrace for this crash?
Comment 2 Buovjaga 2023-10-10 10:51:07 UTC
I'm on an X11 session right now, but I see no problem after 5 openings of the print dialog with gtk4 UI.

Arch Linux 64-bit, X11
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 556b095dfb99c5db92328a63ffa30f07d8840db2
CPU threads: 8; OS: Linux 6.5; UI render: default; gtk4
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 10 October 2023
Comment 3 Caolán McNamara 2023-10-10 20:03:02 UTC
As an aside, using the gtk3 instead of gtk4 vclplug is likely to get better results.

The error is a bit odd, what's supposed to happen is that in:
vcl/unx/gtk4/convert3to4.cxx we remove any gtk3-style "window-position" properties in the .ui files when we runtime convert them to gtk4

and anyway

git grep window.position */uiconfig

doesn't have any hits in the vcl print dialog of

vcl/uiconfig/ui/printdialog.ui
Comment 4 Callegar 2023-11-06 14:04:15 UTC
Also getting the crash with Insert->image. Rather than giving me the file dialog, LibO crashes.

How to get a backtrace?
Comment 5 Stéphane Guillou (stragu) 2023-11-07 00:24:37 UTC
(In reply to Callegar from comment #4)
> How to get a backtrace?
1. Get a debug build from: https://dev-builds.libreoffice.org/daily/master/current.html
2. Check that it does crash with this build
3. Record a backtrace: https://wiki.documentfoundation.org/QA/BugReport/Debug_Information#GNU.2FLinux:_How_to_get_a_backtrace