Bug 111760 - Crash when closing the save dialog after the main window (gtk3)
Summary: Crash when closing the save dialog after the main window (gtk3)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.3.0.0.alpha0+
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:6.0.0 target:5.4.2
Keywords: bibisected, bisected, regression
Depends on:
Blocks: GTK3
  Show dependency treegraph
 
Reported: 2017-08-13 06:12 UTC by Dante
Modified: 2017-08-30 07:13 UTC (History)
4 users (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 Dante 2017-08-13 06:12:40 UTC
Description:
-

Steps to Reproduce:
1. Launch Writer/Calc/Draw/Math/Impress
2. Make any changes in the new document
3. Click Close
4. When prompted, click Save
5. Close the main window
6. Close the save dialog (or click Cancel)

Actual Results:  
A 'LibreOffice 5.4 document recovery' dialog appears:

"Due to an unexpected error, LibreOffice crashed. All the files you were working on will now be saved. The next time LibreOffice is launched, your files will be recovered automatically.
The following files will now be recovered:
<empty list>"

After closing, LibreOffice (itself, not the specific application) starts.

Expected Results:
The main window should not be closable while the save dialog is still open.


Reproducible: Sometimes

User Profile Reset: No

Additional Info:
Most consistently reproduced in Writer


User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36
Comment 1 Jean-Baptiste Faure 2017-08-13 12:01:30 UTC
Reproducible with LO 5.4.0 provided by Ubuntu PPA and with LO 5.4.2.0.0+ and current master, both built at home under Ubuntu 16.04 x86-64.

Setting as NEW.

Best regards. JBF
Comment 2 Xisco Faulí 2017-08-14 10:19:08 UTC
how do you close the main window? I can't do it from the UI on Ubuntu...
Comment 3 Xisco Faulí 2017-08-14 10:25:01 UTC
(In reply to Xisco Faulí from comment #2)
> how do you close the main window? I can't do it from the UI on Ubuntu...

Ok, I can do it from the ubuntu's sidebar. Right click, close
Comment 4 Xisco Faulí 2017-08-14 10:37:47 UTC
Regression introduced by:

author	Caolán McNamara <caolanm@redhat.com>	2016-06-08 10:50:42 (GMT)
committer	Caolán McNamara <caolanm@redhat.com>	2016-06-08 10:52:44 (GMT)
commit c80d34ad551efe858c47445b13370aa8223357c7 (patch)
tree d7f0615be18e1998bf4f720545292d4dfd767065
parent 44819f98aa39cbc8e5d9d07e112fa051077322eb (diff)
gtk3: use window groups so modal dialog are modal to their toplevel frame only
so e.g. launching help from a modal dialog gives a new toplevel window
which is not blocked by the modal dialog on the other window.

likesize can go from one blocked e.g. writer window to calc and type away in
there happily

Bisected with bibisect-linux-64-5.3

Adding Cc: to Caolán McNamara
Comment 5 Caolán McNamara 2017-08-16 08:46:26 UTC
So, there is one main window open, one open file dialog, and its somehow possible to close the main window ?
Comment 6 Xisco Faulí 2017-08-16 09:35:13 UTC
(In reply to Caolán McNamara from comment #5)
> So, there is one main window open, one open file dialog, and its somehow
> possible to close the main window ?

Exactly. On Ubuntu, I can do it from the unity sidebar.
Comment 7 Jean-Baptiste Faure 2017-08-16 09:50:51 UTC
(In reply to Caolán McNamara from comment #5)
> So, there is one main window open, one open file dialog, and its somehow
> possible to close the main window ?

Yes, under Ubuntu 16.04, I can close the StartCenter (step 5) from menu File > Quit LibreOffice

Best regards. JBF
Comment 8 Jean-Baptiste Faure 2017-08-16 09:55:21 UTC
(In reply to Caolán McNamara from comment #5)
> So, there is one main window open, one open file dialog, and its somehow
> possible to close the main window ?

Yes, under Ubuntu 16.04, I can close the main window (step 5) from menu File > Quit LibreOffice, even if the system file picker dialog is open in front of it. If I use LibreOffice file picker it is not possible.

Best regards. JBF
Comment 9 Caolán McNamara 2017-08-16 16:26:43 UTC
ah unity menu integration, that should be equivalent to opening two writer windows, have save file dialog open for one, and then switch to the other and use file->exit in the other.

I have a fix which should close the dialogs on shutdown, but an intermittent crash persists, so needs more investigation I guess
Comment 10 Jean-Baptiste Faure 2017-08-25 11:33:01 UTC
I just saw this commit for the master by Armin Le Grand:

Allow non-modal Dialogs during FileImport/Load
https://gerrit.libreoffice.org/gitweb?p=core.git;a=commitdiff;h=db6b703d391838c481fd090065f6d329edcd4efa

Does this commit will allow to do what is considered as a bug here?

Best regards. JBF
Comment 11 Armin Le Grand 2017-08-25 17:26:04 UTC
Bonjour Jean-Baptiste,

need to check deeper, but at least there is a mechanism now that would allow to fix that task.

Regrads, Armin (alg)
Comment 12 Commit Notification 2017-08-29 10:51:50 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6748074004a173876cfd54bff67e24865ba41acb

Resolves: tdf#111760 cancel file dialog on terminate

It will be available in 6.0.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 13 Caolán McNamara 2017-08-29 10:52:32 UTC
backport to 5-4 in gerrit
Comment 14 Commit Notification 2017-08-29 15:22:30 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8a110242b90273aaf54c87057f7739ae910fcdb3&h=libreoffice-5-4

Resolves: tdf#111760 cancel file dialog on terminate

It will be available in 5.4.2.

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 15 Jean-Baptiste Faure 2017-08-30 05:00:42 UTC
Verified fixed in LO 5.4.2.0.0+ built at home under Ubuntu 16.04 x86-64.
Menu File > Quit LibreOffice close the file picker.

Thank you very much.
Best regards. JBF
Comment 16 Jean-Baptiste Faure 2017-08-30 07:13:54 UTC
(In reply to Jean-Baptiste Faure from comment #15)
> Verified fixed in LO 5.4.2.0.0+ built at home under Ubuntu 16.04 x86-64.
> Menu File > Quit LibreOffice close the file picker.

Hmmm, if I launch LO in the terminal, it says that LO crashed and shows the recovery dialog. Is it expected?

Best regards. JBF