Bug 127946 - CRASH closing LibreOffice with the tip of the day dialog open (reintroduced)
Summary: CRASH closing LibreOffice with the tip of the day dialog open (reintroduced)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:6.4.0
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks: Tip-Of-The-Day
  Show dependency treegraph
 
Reported: 2019-10-03 11:34 UTC by Xisco Faulí
Modified: 2022-05-27 13:05 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
bt Windows (windbg) (42.55 KB, text/plain)
2019-10-03 14:36 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2019-10-03 11:34:50 UTC
Steps to reproduce:
1. Clean the user profile
2. Open Writer -> Tip of the day dialog is prompted
3. Close LibreOffice and the close the tip of the day

-> Crash

This issue was initially reported in bug 125131 and fixed towards master in https://cgit.freedesktop.org/libreoffice/core/commit/?id=2dff4a4f63fc84b8ce82215f46e1575ed8d535a3.
In LibreOffice 6.4, the tip of the day has been reworked for bug 127400 in https://git.libreoffice.org/core/commit/97bcd0e416b1fb725b5aaade811e80d46fdaf1e2 and the crash has been reintroduced

On the one hand, it's good the dialog isn't modal so users can try the tip of the day while reading it (bug 127533 ), on the other hand, it crashes :-(

BTW, while testing this, I find the dialog prompted while launching Writer isn't modal, while the one called from the menu is. why is it happening ?
Comment 1 Xisco Faulí 2019-10-03 11:36:26 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=97bcd0e416b1fb725b5aaade811e80d46fdaf1e2


author	Heiko Tietze <tietze.heiko@gmail.com>	2019-09-06 10:34:54 +0200
committer	Heiko Tietze <heiko.tietze@documentfoundation.org>	2019-09-23 07:51:01 +0200
commit 97bcd0e416b1fb725b5aaade811e80d46fdaf1e2 (patch)
tree 9d841bf31e56faf32c83e6f2518919af4c6b212d
parent c8e2675ebde04ab814fe0bc8f800a502280f4689 (diff)
Resolves tdf#127400 - Allow to show tip of the day again

Bisected with: bibisect-linux64-6.4

Adding Cc: to Heiko Tietze
Comment 2 Julien Nabet 2019-10-03 14:36:39 UTC
Created attachment 154736 [details]
bt Windows (windbg)

On Win10 with master sources updated today, I could reproduce this.
Comment 3 Heiko Tietze 2019-10-05 07:59:07 UTC
The dialog is modal to block LibreOffice. That was exactly the cause of bug 125131.

(In reply to Xisco Faulí from comment #0)
> BTW, while testing this, I find the dialog prompted while launching Writer
> isn't modal, while the one called from the menu is. why is it happening ?

Caolan, both are not called as UNO comands (GetDispatcher()->Execute(SID_TIPOFTHEDAY) in viewfrm.cxx and via menu handler). Any idea?
Comment 4 Caolán McNamara 2019-10-05 13:51:57 UTC
yeah, via menu there's an "internal" argument passed which contains the frame to use as parent for the dialog. We can add that argument in the direct dispatch and solve this that way. https://gerrit.libreoffice.org/#/c/80291/
Comment 5 Commit Notification 2019-10-05 17:18:06 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9be58fddb9c88d0fb058dcb7936a17c9d45d0237

Resolves: tdf#127946 pass in argument for dialog parent

It will be available in 6.4.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 6 Xisco Faulí 2019-10-07 07:34:00 UTC
Hi Caolán,
First off, thanks for fixing the crash.
Would it be possible to change the tip of the day dialog to non Modal? it would also allow users to test the tip while reading it ( bug 127533 )

Verified in

Version: 6.4.0.0.alpha0+
Build ID: 52cda5c5ae426761ccbdb4f20419098eab195303
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded
Comment 7 Caolán McNamara 2019-10-07 07:58:33 UTC
If someone else wants to do that then, if the dialog is changed to non-modal in the .ui then the code calling it needs to be changed to use a std::shared_ptr<weld::Dialog> and runAsync something like...
weld::DialogController::runAsync(xDialog, [](sal_Int32 /*nResult*/){});
and then it should work fine I think
Comment 8 Xisco Faulí 2019-10-07 08:05:26 UTC
(In reply to Caolán McNamara from comment #7)
> If someone else wants to do that then, if the dialog is changed to non-modal
> in the .ui then the code calling it needs to be changed to use a
> std::shared_ptr<weld::Dialog> and runAsync something like...
> weld::DialogController::runAsync(xDialog, [](sal_Int32 /*nResult*/){});
> and then it should work fine I think

ok, thanks. Turning bug 127533 into an easyhack then...