Bug Hunting Session
Bug 120261 - gtk3_kde5: Crash with file dialog when Java extension "WollMux" is installed
Summary: gtk3_kde5: Crash with file dialog when Java extension "WollMux" is installed
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
6.2.0.0.alpha0+
Hardware: All Linux (All)
: medium normal
Assignee: Michael Weghorn
URL:
Whiteboard: target:6.2.0 target:6.1.4
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-02 08:32 UTC by Michael Weghorn
Modified: 2018-10-11 08:05 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
GDB backtrace of the soffice process on crash (5.25 KB, text/plain)
2018-10-02 08:46 UTC, Michael Weghorn
Details
GDB backtrace of the lo_kde5filepicker process (4.35 KB, text/plain)
2018-10-02 08:49 UTC, Michael Weghorn
Details
older valgrind output (806.70 KB, text/x-log)
2018-10-02 10:36 UTC, Michael Weghorn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Weghorn 2018-10-02 08:32:50 UTC
With a current master build and the "gtk3_kde5" VCL plugin in use, crashes occur quite often when using the "Save as" dialog. It works fine when using other VCL plugins, e.g. the gtk3 one.

Version: 6.2.0.0.alpha0+
Build ID: 1a3846b70d7bb34ad4ce17eef1196fe42d74e41c
CPU threads: 4; OS: Linux 4.18; UI render: default; VCL: gtk3_kde5; 
Locale: en-GB (en_GB.UTF-8); Calc: threaded

Steps to reproduce:

1) set up the "WollMux" extension (including default configuration) as described at http://wollmux.org/ and restart LibreOffice Writer

2) start LibreOffice Writer using the gtk3_kde5 VCL plugin:
    SAL_USE_VCLPLUGIN=gtk3_kde5 ./instdir/program/soffice.bin --writer

3) open dialog to save file: "File" -> "Save as"

4) enter name and click "OK"

5) repeat steps 3 and 4 until the problem appears (it does not happen every time, roughly every second time when I had a look)

Result: LibreOffice crashes

Expected result: The file should just be saved.
Comment 1 Michael Weghorn 2018-10-02 08:34:17 UTC
I'm self-confirming this bug according to [1], since the initial bug report was done by another user in our organization's internal issue tracker and I can reproduce with current master.

[1] https://wiki.documentfoundation.org/QA/Guidelines_for_public_and_private_sector_deployments
Comment 2 Michael Weghorn 2018-10-02 08:46:36 UTC
Created attachment 145318 [details]
GDB backtrace of the soffice process on crash
Comment 3 Michael Weghorn 2018-10-02 08:49:53 UTC
Created attachment 145319 [details]
GDB backtrace of the lo_kde5filepicker process
Comment 4 Michael Weghorn 2018-10-02 10:36:43 UTC
Created attachment 145321 [details]
older valgrind output

I'm attaching the valgrind output I got with an older master build (~3 weeks old; shows e.g. the issue fixed with 2fdafe62ef3959ec34e05daf312088a8f0534d9a as well). 

Unfortunately, this crash is also one that appears much less often once run with valgrind or a debugger attached...

According to WollMux developers, the WollMux extension isn't doing anything functional-wise for the "Save as" event itself, just redirects it back to the LO event dispatcher.
Comment 5 Michael Weghorn 2018-10-02 10:37:48 UTC
(In reply to Michael Weghorn from comment #4)
> I'm attaching the valgrind output I got with an older master build (~3 weeks
> old; shows e.g. the issue fixed with
> 2fdafe62ef3959ec34e05daf312088a8f0534d9a as well). 
> 

The interesting part starts at line 11579.
Comment 6 Michael Weghorn 2018-10-02 14:47:10 UTC
In addition to the crash, there's also the following other situation where using WollMux in conjunction with the gtk3_kde5 VCL plugin causes issues with the event processing:

A) set up WollMux
B) start Writer
C) open a separate document in a second window
D) open the "Save as" Dialog for one of the two documents

Result:

* only the window for which the "Save as" dialog has been opened is greyed out so it's obvious that it's inactive
* When taking any action in the other window, this is not handled either, though (or rather, it's only handled after the "Save as" dialog is closed).

This is contrary to how it behaves without WollMux installed and to what is mentioned in commit ecb5fcff336c8b0e5ad2503f0880c439a6c323a5:

    [...]
    While the KDE dialog is shown, the GTK3 main window is disabled and
    close requests are ignored. The KDE dialog in turn also sets the LO
    window as transient parent. Together, this makes the illusion perfect
    and the KDE dialog behaves like a modal dialog. This works properly
    also with multiple LO main windows, and only individual windows will
    get blocked as one would expect.
    [...]

This one is 100 % reproducible and I plan to tackle both aspects by the same approach (so I'm not creating a separate issue for this at this point).
Comment 7 Commit Notification 2018-10-08 07:00:13 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3b36855e48f6ef3f4e52e998c52c531fe5191477

tdf#120261 gtk3_kde5: Read IPC cmds in own thread on kde5 side

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2018-10-08 07:01:31 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=788716cebad012513cc2798589b817b86cbf1bbc

tdf#120261 gtk3_kde5: Leave event handling on gtk3 side to gtk

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2018-10-11 08:05:52 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d6391f474a94becf3a30963356515c1a1d5c434e&h=libreoffice-6-1

tdf#120261 gtk3_kde5: Read IPC cmds in own thread on kde5 side

It will be available in 6.1.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2018-10-11 08:05:58 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c6cd5656e5b398502e55bc83c4bfc94180f72606&h=libreoffice-6-1

tdf#120261 gtk3_kde5: Leave event handling on gtk3 side to gtk

It will be available in 6.1.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.