Bug 137556 - Crash if I try to open the Print dialog in GTK3 3.18 only
Summary: Crash if I try to open the Print dialog in GTK3 3.18 only
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
7.0.2.2 release
Hardware: x86-64 (AMD64) Linux (All)
: high critical
Assignee: Not Assigned
URL:
Whiteboard: target:7.1.0 target:7.0.4
Keywords: bibisected, bisected, regression
: 138004 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-10-17 12:39 UTC by Tom
Modified: 2020-11-07 05:29 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
LO7022 backtrace (11.89 KB, text/x-log)
2020-10-25 12:23 UTC, Tom
Details
Print dialog with opened printer pulldown menu (42.31 KB, image/png)
2020-11-06 22:16 UTC, Tom
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom 2020-10-17 12:39:40 UTC
Description:
Calling the print dialog in LO 7.0.2.2 Writer, Calc, Impress and Draw per Ctrl+P or menu File > Print causes LO to crash every time. Corresponding crash reports have been send. The problem also occurs in safe mode.

Steps to Reproduce:
1. Start LO 7.0.2.2
2. Open Writer, Calc, Impress or Draw
3. Press Ctrl+P or open the menu File > Print

Actual Results:
Crash

Expected Results:
The print dialog is supposed to be opened


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.0.2.2
Build ID: 8349ace3c3162073abd90d81fd06dcfb6b36b994
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: de-DE (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 Tom 2020-10-17 17:28:36 UTC
The same occurs, when I install and run the daily build

libreoffice-7-0~2020-10-16_15.00.26_LibreOfficeDev_7.0.3.0.0_Linux_x86-64_deb.tar.gz

Version: 7.0.3.0.0+
Build ID: 3f554879aa90a73940041e3a1217b97a15e18bc3
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: de-DE (en_US.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:libreoffice-7-0, Time: 2020-10-16_15:00:26
Calc: threaded

When the crash occurs, the following warning is written to the terminal that I used to start libreofficedev7.0:

(soffice:5972): Gtk-WARNING **: Attempting to add a widget with type GtkNotebook to a GtkWindow, but as a GtkBin subclass a GtkWindow can only contain one widget at a time; it already contains a widget of type GtkGrid
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
Comment 2 Timur 2020-10-19 08:04:09 UTC
1. What's your UI / toolbar?
2. Does it happen with all UI or some? 
3. A duplicate of bug 133378?
4. Please test with daily master 7.1+ (not daily build 7.0.3+ from Fresh series)
Comment 3 Timur 2020-10-19 08:11:12 UTC
Also, this is not generally reproducible, you need to find out what's specific at you.
Comment 4 Tom 2020-10-19 17:32:56 UTC
Hi Timur,

Thanks for your reply. Here are my answers:
1. What's your UI / toolbar?
GTK3 (as already included in my original post :-) / standard toolbar

2. Does it happen with all UI or some?
I can only test the UI available under linux, which are gtk3 and gen (as far as I know).
- GTK3 fails every time
- "SAL_USE_VCLPLUGIN=gen libreoffice7.0" never fails

3. A duplicate of bug 133378?
No. I am not running windows and the crash does not need any specific preparation to occur other than trying to open the print dialog under GTK3. I feels as if there is a GTK3 bug. So maybe this bug is better addressed by the UI folks?

BTW: I found out that I can still print, if I do not try to open the print dialog but select "Print directly", instead (another hint on an issue of the UI).

4. Please test with daily master 7.1+ (not daily build 7.0.3+ from Fresh series)
I already had the same idea before I fell back to the daily build 7.0.3+. Reason: master 7.1+ crashed repeatedly before the very first window was created. It crashed so early, that the crash was not caught by LO and no crash report was offered.

Regards
Tom
Comment 5 Tom 2020-10-19 17:58:48 UTC
I have now checked all primary menu items in an empty writer document that have "..." in their labels and indicate that they would open a dialog.

"Tools > Mail Merge Wizard ..." does not open any dialog, causes the error message below (under gtk3) and leaves LO in a non-operating state that can only be resolved by terminating the corresponding process. The non-operating mode happens both under "gtk3" and "gen".

(soffice:5258): Gtk-CRITICAL **: gtk_tree_view_scroll_to_cell: assertion 'tree_view->priv->tree != NULL' failed

BTW: I am running GTK3.18.9. One month ago, I had debugged an infinite gtk3 event loop (see bug 136512). At that time I could run master 7.1+ without an immediate crash.
Comment 6 Tom 2020-10-19 20:09:08 UTC
When I install and run 

master~2020-10-18_19.24.33_LibreOfficeDev_7.1.0.0.alpha0_Linux_x86-64_deb.tar.gz

I get the following warning and error messages under gtk3:

---
% libreofficedev7.1

** (soffice:4231): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-pTr0nCF40B: Connection refused

(soffice:4231): Gtk-WARNING **: Theme parsing error: <data>:1:107: 'min-height' is not a valid property name

(soffice:4231): Gtk-WARNING **: Theme parsing error: <data>:1:123: 'min-width' is not a valid property name
/usr/local/opt/libreofficedev7.1/program/soffice.bin: symbol lookup error: /usr/local/opt/libreofficedev7.1/program/libvclplug_gtk3lo.so: undefined symbol: gtk_widget_path_iter_set_object_name
---

Afterwards LO crashes. When I run it under "gen" there is no warning, no error and no crash. 

---
% SAL_USE_VCLPLUGIN=gen libreofficedev7.1
---

Regards
Tom
Comment 7 Tom 2020-10-24 07:48:13 UTC
This is most likely an issue of the gnome/gtk user interface rather than a printing issue. In order to reproduce it, please ensure to run Gnome 3.18 as specified in the System Requirements (https://www.libreoffice.org/get-help/system-requirements/):

    The software and hardware prerequisites for installing on Linux are as follows:

    Linux kernel version 3.10 or higher
    glibc2 version 2.17 or higher
    Pentium-compatible PC (Pentium III, Athlon or more-recent system recommended)
    256Mb RAM (512 MB RAM recommended)
    Up to 1.55 GB available hard disk space
    X Server with 1024x768 resolution (higher resolution recommended), with at least 256 colors
    Gnome 3.18 or higher, ...

Regards
Tom
Comment 8 Buovjaga 2020-10-24 16:42:16 UTC
I don't reproduce the crash.

Which Linux distribution are you using?

Do you reproduce the crash if you launch with --safe-mode ?

Master now requires GTK 3.20: https://git.libreoffice.org/core/commit/0c9ccc7dbf6deb4d012e0d1e6eb934e54e0f19bc

Arch Linux 64-bit
Version: 7.0.2.2
Build ID: 00(Build:2)
CPU threads: 8; OS: Linux 5.9; UI render: default; VCL: gtk3
Locale: fi-FI (fi_FI.UTF-8); Käyttöliittymä: fi-FI
7.0.2-2
Calc: threaded

Arch Linux 64-bit
Version: 7.1.0.0.alpha0+
Build ID: ccdb78773ac6c9d19140e8084f37cc2c7f06240e
CPU threads: 8; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 18 October 2020
Comment 9 Tom 2020-10-24 17:07:33 UTC
> Which Linux distribution are you using?

I am (still) running Linux Mint Mate 18.3. Please find the version information for my linux distribution included in one of the earlier posts.

> Do you reproduce the crash if you launch with --safe-mode?

Yes, definitely. I just sent another report of a crash that happened in safe mode.

> Master now requires GTK 3.20

Good to know. This means that I will have to run LO7.1 with the generic user interface.

Regards
Tom
Comment 10 QA Administrators 2020-10-25 04:17:19 UTC Comment hidden (obsolete)
Comment 11 Buovjaga 2020-10-25 06:16:44 UTC
As master is now incompatible with GTK 3.20, you can't use the daily debug build to get a trace. I wonder, if you could install debug packages from Mint's repository for 7.0.2: https://wiki.documentfoundation.org/QA/BugReport/Debug_Information#GNU.2FLinux
Perhaps Ubuntu's instructions apply.

Then you could run with

libreoffice --backtrace

and reproduce the crash.
Comment 12 Tom 2020-10-25 07:07:48 UTC
Thanks Buovjaga,

as far as I understand "installing the debug packages" implies to compile LO with the debug option. I have done this one month ago for the former master revision in order to trace an event loop. After that exercise, I had removed that master installation and the required gcc compiler. Repeating this exercise requires the installation (bootstrap compilation) of the necessary gcc compiler and the compilation of LO again, which took me one week to suceed working around the partition size limitations of my system, last time.

I am sorry, I do not have the time to repeat this exercise for a LO revision that will be the last to work on my system.

Regards
Tom
Comment 13 Buovjaga 2020-10-25 09:34:20 UTC
(In reply to Tom from comment #12)
> Thanks Buovjaga,
> 
> as far as I understand "installing the debug packages" implies to compile LO
> with the debug option.

No, this is not what it implies. It means exactly what I said: some Linux distributions, such as Ubuntu, offer pre-made debug packages, which users can install and get backtraces. I have no information on whether Mint can use Ubuntu's packages, though.
Comment 14 Tom 2020-10-25 12:23:52 UTC
Created attachment 166694 [details]
LO7022 backtrace

I read the link you provided and among others it suggested:

   Another option is to roll your own debug build using --enable-debug or
   --enable-symbols.

Anyway, I have run a 1st backtrace of LO7022 w/o additional dbg packages installed to see, what dbg packages might be needed.

Afterwards I have installed

   libglib2.0-0-dbg (2.48.2-0ubuntu4.6)
   libgtk-3-0-dbg (3.18.9-1ubuntu3.3)

The first because the gdb trace referes to libglib-2.0.so.0 and the second because I only run into problems when I use the gtk3 user interface.

Then I have run a 2nd backtrace:

1) /opt/libreoffice7.0/program/soffice --backtrace
2) Pressed Ctrl+N after the main window was displayed in order to open Writer
3) Pressed Ctrl+P after Writer window was displayed

Reveived an immediate crash that also terminated gdb. Please find attached the generated gdbtrace.log.

Hope this helps.

Regards
Tom
Comment 15 Timur 2020-10-26 07:37:03 UTC
I also reproduced in updated Mint 18.3 with GTK3 3.18 using LO 7.0.2.
No repro with old 7.0 alpha.
Comment 16 Timur 2020-10-26 09:13:05 UTC
commit 72e43fa49787d77facbb4e3b3abd0d2987b9cf8c
Date:   Thu Apr 23 23:12:43 2020 +0200

    source 26ada4335a5804735ae37cf9a89f8145e0931fd7
    previous source d4248915d7db69aa7bf31d9d6189b7375aca70ed

author	Heiko Tietze <tietze.heiko@gmail.com>	2020-04-23 13:40:29 +0200
committer	Heiko Tietze <heiko.tietze@documentfoundation.org>	2020-04-23 20:13:44 +0200
commit 26ada4335a5804735ae37cf9a89f8145e0931fd7 (patch)
tree 16378e4c45bdee614c2de04478061143d7598840
parent d4248915d7db69aa7bf31d9d6189b7375aca70ed (diff)
tdf#127782 - New Print dialog is too high
ScrollWindow behind the tab control
Comment 17 Buovjaga 2020-10-26 09:51:13 UTC
Adding Cc: to Heiko Tietze
Comment 18 Commit Notification 2020-10-29 09:09:41 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8beafb2849ab10e659d0c181ea1069cb9015d784

tdf#137556 max-content-height needs gtk >= 3.22

It will be available in 7.1.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 19 Heiko Tietze 2020-10-29 09:19:24 UTC
Fun for QA: there are a couple of tickets with the same topic.
Comment 20 Caolán McNamara 2020-10-29 11:00:59 UTC
That should solve the problem in master and the backport in gerrit for 7-0 should solve the problem there too when merged.
Comment 21 Timur 2020-10-29 12:58:09 UTC Comment hidden (obsolete)
Comment 22 Buovjaga 2020-10-29 13:34:04 UTC
(In reply to Timur from comment #21)
> I couldn't find duplicates.

Yep, Heiko showed me a query and I was unable to find any dupes as well. This was a very recent change after all.
Comment 23 Commit Notification 2020-10-29 14:03:58 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/538ceebc383c501d9f0200cadc6434da1bc97112

tdf#137556 max-content-height needs gtk >= 3.22

It will be available in 7.0.4.

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 24 Xisco Faulí 2020-11-05 09:58:13 UTC
*** Bug 138004 has been marked as a duplicate of this bug. ***
Comment 25 Tom 2020-11-06 22:16:48 UTC
Created attachment 167068 [details]
Print dialog with opened printer pulldown menu

Installed daily build:
libreoffice-7-0~2020-11-06_03.36.20_LibreOfficeDev_7.0.4.0.0_Linux_x86-64_deb.tar.gz

   Version: 7.0.4.0.0+
   Build ID: 23cb0b19060d0cdbc91f571f4797d1d07023048f
   CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3
   Locale: de-DE (en_US.UTF-8); UI: en-US
   TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:libreoffice-7-0, Time: 2020-11-06_03:36:20
   Calc: threaded

Tested print dialog in Writer, Calc, Impress or Draw.
Result: No crash. Excellent :-).

BTW: Just a note, maybe not worth to be mentioned. Some of those pulldown menus in the printer dialog are pretty short (see attached screenshot).

Thanks & Regards
Tom
Comment 26 Buovjaga 2020-11-07 05:29:58 UTC
(In reply to Tom from comment #25)
> BTW: Just a note, maybe not worth to be mentioned. Some of those pulldown
> menus in the printer dialog are pretty short (see attached screenshot).

Seems worthy of its own bug report, though.