Bug 151352 - CRASH: closing form while the tip of the day dialog is displayed
Summary: CRASH: closing form while the tip of the day dialog is displayed
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
7.2.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Matt K
URL:
Whiteboard: target:7.5.0 target:7.4.3 target:24.8...
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks: Tip-Of-The-Day Crash
  Show dependency treegraph
 
Reported: 2022-10-05 08:46 UTC by Xisco Faulí
Modified: 2024-01-31 09:59 UTC (History)
9 users (show)

See Also:
Crash report or crash signature: ["virtual thunk to (anonymous namespace)::GtkInstanceWindow::GetXWindow() [clone .lto_priv.0]"]


Attachments
bt with debug symbols (7.44 KB, text/plain)
2022-10-05 18:47 UTC, Julien Nabet
Details
bt with debug symbols (6.71 KB, text/plain)
2022-10-06 17:42 UTC, Julien Nabet
Details
bt with debug symbols (gen) (7.03 KB, text/plain)
2022-10-11 10:19 UTC, Julien Nabet
Details
bt with debug symbols (gtk3) (6.71 KB, text/plain)
2022-10-13 18:42 UTC, Julien Nabet
Details
screencast (4.64 MB, video/x-matroska)
2022-10-13 19:10 UTC, Julien Nabet
Details
bt with debug symbols (7.68 KB, text/plain)
2023-11-01 10:26 UTC, Julien Nabet
Details
bt (7.68 KB, text/plain)
2024-01-19 15:14 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2022-10-05 08:46:45 UTC
Steps to reproduce:
1. Clean the user profile
2. Open a database
3. Form - Create form in design view -> Tip of the day dialog is displayed
4. Close the form without closing the tip of the day
5. Click Ok on the tip of the day

-> LibreOffice crashes

Reproduced in

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: ca1fd7535770139044f7c1a9f7e59a082d710b6d
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: x11
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded
Comment 1 Xisco Faulí 2022-10-05 08:48:00 UTC
Regression introduced by:

author	Noel Grandin <noel.grandin@collabora.co.uk>	2021-05-29 08:34:28 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	2021-05-29 13:37:25 +0200
commit 8d485ec0cd35ee1ae7684f2b6ca96c0f0c6f9dac (patch)
tree 73b645a8b6c5976c29a83908ac3be49744ddcbb0
parent 30aa33e6a6b9fb230af96f619db27fcaf31ef914 (diff)
IsDisposed->isDisposed in vcl/../window

Bisected with: bibisect-linux64-7.2

Adding Cc: to Noel Grandin
Comment 3 Julien Nabet 2022-10-05 18:47:24 UTC
Created attachment 182845 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I could reproduce this.
I attached bt with some gdb trace.

Just wonder if we shouldn't prevent the main window from closing when there's the tip dialog.
I mean perhaps closing first tip dialog should be required to be able to close main window of the form.
Comment 4 Xisco Faulí 2022-10-06 08:09:29 UTC
(In reply to Julien Nabet from comment #3)
> Created attachment 182845 [details]
> bt with debug symbols
> 
> On pc Debian x86-64 with master sources updated today, I could reproduce
> this.
> I attached bt with some gdb trace.
> 
> Just wonder if we shouldn't prevent the main window from closing when
> there's the tip dialog.
> I mean perhaps closing first tip dialog should be required to be able to
> close main window of the form.

I think this was the original approach and later it was changed. The idea behind the change is that you can use LibreOffice and read the tip at the same time, so you can test what is described.
Comment 5 Noel Grandin 2022-10-06 08:32:50 UTC
fix here: https://gerrit.libreoffice.org/c/core/+/141001
Comment 6 Commit Notification 2022-10-06 10:24:16 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/81051d1fccffddf3e16d92bef0d0853a65afc8b8

tdf#151352 crash closing form while the tip of the day dialog is displayed

It will be available in 7.5.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 7 Commit Notification 2022-10-06 14:39:05 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

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

tdf#151352 crash closing form while the tip of the day dialog is displayed

It will be available in 7.4.3.

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 8 Julien Nabet 2022-10-06 17:42:02 UTC
Created attachment 182882 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today (+ gtk3 rendering) and brand new LO profile, I still reproduce a crash.
Comment 9 Julien Nabet 2022-10-06 17:43:57 UTC
I had forgotten to indicate the build id ( d6a5214c70b82df5cef3cbac87a255c7f56b6726) so it includes: 81051d1fccffddf3e16d92bef0d0853a65afc8b8
tdf#151352 crash closing form while the tip of the day dialog is displayed
Comment 10 Noel Grandin 2022-10-11 08:33:11 UTC
Weird, I can't repro this on current master, I wonder if someone else fixed it.
Comment 11 Julien Nabet 2022-10-11 10:19:07 UTC
Created attachment 182970 [details]
bt with debug symbols (gen)

I gave a new try, just in case, but I got the same crash with gtk3.

So I tested with gen rendering and in this case, I got a crash when confirming the closing of the form editor (so not afterwards, when closing tip dialog)
Perhaps it might help.
Comment 12 Xisco Faulí 2022-10-13 11:09:02 UTC
(In reply to Noel Grandin from comment #10)
> Weird, I can't repro this on current master, I wonder if someone else fixed
> it.

Hi Noel,
Are you tring with gen environment like 'rm -rf instdir/user/ && SAL_USE_VCLPLUGIN=gen instdir/program/soffice' ?

Still reproducible in

7.5.0.0.alpha0+ / LibreOffice Community
Build ID: 2e887e04c0008a4eb6cbf34050b6fa463a33599f
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: x11
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded

using the original steps
Comment 13 Commit Notification 2022-10-13 18:30:51 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3471299f1976499ab5f85fc6580b9633f4737399

tdf#151352 crash closing form while TOTD dialog is displayed

It will be available in 7.5.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 14 Noel Grandin 2022-10-13 18:42:30 UTC
Ah, thanks, I was testing with gtk, which behaves a little differently
Comment 15 Julien Nabet 2022-10-13 18:42:36 UTC
Created attachment 183019 [details]
bt with debug symbols (gtk3)

On pc Debian x86-64 with master sources updated today (including brand new Noel's patch), I don't reproduce this anymore with gen rendering.
The tip dialog is automatically closed when I close the form dialog.

However, I still reproduce the crash with gtk3 rendering.
Comment 16 Julien Nabet 2022-10-13 18:46:28 UTC
Noel: On pc Debian testing x86-64 updated today, it uses gtk3 version 3.24.34-3
Comment 17 Julien Nabet 2022-10-13 19:10:28 UTC
Created attachment 183020 [details]
screencast
Comment 18 Commit Notification 2022-10-19 06:33:49 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/3a5f9015b1d3dfe377ba978adb6939cea550617f

tdf#151352 crash closing form while TOTD dialog is displayed

It will be available in 7.4.3.

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 Timur 2023-10-31 16:03:34 UTC
Julien, did you test again after the last fix?
Comment 20 Timur 2023-10-31 16:08:42 UTC
If I am testing well, no crash. If not, please explain.
Comment 21 Julien Nabet 2023-11-01 10:26:36 UTC
Created attachment 190578 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I could still reproduce this.
Comment 22 Stéphane Guillou (stragu) 2024-01-18 22:19:30 UTC
For the gen VCL plugin, I can confirm that there's no crash anymore in 24.2 and a current trunk build: the TOTD dialog closes at the same time as the form editor. Thanks Noel!

For the gtk3 VCL plugin, I can still reproduce with comment 0 steps in 24.2:

Version: 24.2.0.2 (X86_64) / LibreOffice Community
Build ID: b1fd3a6f0759c6f806568e15c957f97194bbec8f
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

with crash report https://crashreport.libreoffice.org/stats/crash_details/6f341008-c705-4a86-8350-7cd7809fea76

However, no repro in current trunk build:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 8b393bba91111bd4f8988457f3a78b0306462bf2
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

So something might have fixed it since?

In any case, I have also checked what it looked like before Noel's  8d485ec0cd35ee1ae7684f2b6ca96c0f0c6f9dac (build [157f236d1084aba087e3dcd66d8cfac5e95a7a91] in linux-64-7.2 bibisect repo) and it turns out the gtk3 crash predates it.

It actually started when TOTD was mad non-modal with:

commit 7f032b2f16fad56beea1df826eb59c6f85c71268
author	Matt K Sat Apr 03 01:24:30 2021 -0500
committer	Heiko Tietze Tue May 18 09:02:22 2021 +0200
tdf#127533 Make Tip-of-the-Day dialog non-modal and allow multiple tips to open 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113782

(build [7f290d4dc4dc59f2eaa5de3d0948c13eeff2a3d5] in linux-64-7.2 bibisect repo)

Matt, can you please have a look?
Would be good to check what might have fixed it in current trunk (to see if we can get it into 24.2).
Comment 23 Matt K 2024-01-18 23:05:22 UTC
(In reply to Stéphane Guillou (stragu) from comment #22)
> In any case, I have also checked what it looked like before Noel's 
> 8d485ec0cd35ee1ae7684f2b6ca96c0f0c6f9dac (build
> [157f236d1084aba087e3dcd66d8cfac5e95a7a91] in linux-64-7.2 bibisect repo)
> and it turns out the gtk3 crash predates it.
> 
> It actually started when TOTD was mad non-modal with:
> 
> commit 7f032b2f16fad56beea1df826eb59c6f85c71268
> author	Matt K Sat Apr 03 01:24:30 2021 -0500
> committer	Heiko Tietze Tue May 18 09:02:22 2021 +0200
> tdf#127533 Make Tip-of-the-Day dialog non-modal and allow multiple tips to
> open 
> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113782
> 
> (build [7f290d4dc4dc59f2eaa5de3d0948c13eeff2a3d5] in linux-64-7.2 bibisect
> repo)
> 
> Matt, can you please have a look?
> Would be good to check what might have fixed it in current trunk (to see if
> we can get it into 24.2).

The only GTK3 crash I remember is tdf#142370 which was fixed by Caolan awhile ago.

I just tried to repro this on Windows and could not, the tip-of-the-day dialog disappears when closing the database form.  Tested with:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 9226cda52fd1c1a2bbca12bb4a761d49c9678833
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

Can't you bibisect or bisect to find out the cause?
Comment 24 Buovjaga 2024-01-19 06:22:15 UTC
I can't make it crash with gtk3 in oldest of linux-64-24.8 repo.
Comment 25 Xisco Faulí 2024-01-19 08:43:33 UTC
(In reply to Buovjaga from comment #24)
> I can't make it crash with gtk3 in oldest of linux-64-24.8 repo.

it seems to be a timing involved. With oldest of linux-64-24.8 I tried 4 times and I could reproduce it once
Comment 26 Stéphane Guillou (stragu) 2024-01-19 10:11:00 UTC
Thank you both, I also tried bibisecting the "fix", got to a nonsensical result, tested 24.8-oldest and couldn't reproduce, and suspected a timing factor but couldn't figure out what kind after a few slow and fast tries.
Comment 27 Stéphane Guillou (stragu) 2024-01-19 10:35:53 UTC
Very hard to reproduce in a current master build, I managed only once out of about 20 tries.

So my suggestion for a fix is: do not show the TOTD dialog at all if Writer is started as a "sub-component" of a base. It is disruptive anyway, since the user might have already been creating tables, then a report, then moving to creating a form and only _then_ they are greeted with a TOTD... So in my opinion, not showing it in this case is also a UX fix on top of a (however elusive) crash fix.
Comment 28 Julien Nabet 2024-01-19 15:14:47 UTC
Created attachment 192060 [details]
bt

On pc Debian x86-64 with master sources updated today (56ceb5db4eb3243d02c56c8cf21522d0373c28a9), I could reproduce this.
Comment 29 Julien Nabet 2024-01-19 19:44:59 UTC
I gave a try with gen and kf5 rendering but when I close the form, it automatically close the tip of the day.
BTW, let's put this one to NEW since the crash can be reproduced.
Comment 30 Matt K 2024-01-19 23:13:37 UTC
Fix is tracked in: https://gerrit.libreoffice.org/c/core/+/162326
Comment 31 Matt K 2024-01-20 17:08:38 UTC
Some questions that need answers:

1.) Users can still open the tip-of-the-day via "Help"->"Show Tip of the Day".  Does it still crash using that method, and if so should we also disable that path for Base forms?

2.) I was able to get the tip-of-the-day pop-up to show from Base by selecting "Tools"->"Macros"->"Edit Macros...".  Does it still crash using that method, and if so should we also disable that path?
Comment 32 Julien Nabet 2024-01-21 09:42:19 UTC
(In reply to Matt K from comment #31)
> Some questions that need answers:
> 
> 1.) Users can still open the tip-of-the-day via "Help"->"Show Tip of the
> Day".  Does it still crash using that method, and if so should we also
> disable that path for Base forms?
Before "Help"->"Show Tip of the Day", what's the context? I mean if you're on form, it corresponds to the initial description so don't understand the goal of the question.


> 
> 2.) I was able to get the tip-of-the-day pop-up to show from Base by
> selecting "Tools"->"Macros"->"Edit Macros...".  Does it still crash using
> that method, and if so should we also disable that path?

Yes it crashes in a similar way, similar because I got the same bt but don't have crash log on console.

IMHO I think disabling the path is just a workaround, not the real fix.
I think we shouldn't be able to close the window when TOTD appears.

Adding Robert in cc since it seems specific to Base. Perhaps he encountered similar use cases with TOTD in Base.
Comment 33 Robert Großkopf 2024-01-21 15:38:27 UTC
Tested this in
Version: 24.2.0.2 (X86_64) / LibreOffice Community
Build ID: b1fd3a6f0759c6f806568e15c957f97194bbec8f
CPU threads: 6; OS: Linux 5.14; UI render: default; VCL: x11
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded

and also with KDE (VCL: kf5).

When opening a form in Base the tip appears. Closing the form will close the tip also. So there is no tip of the day available any more I could click on.

My system: OpenSUSE 15.4 64bit rpm Linux.
Comment 34 Matt K 2024-01-21 15:43:17 UTC
It seems to only crash in gtk3.  Can you try to repro with gtk3?
Comment 35 Robert Großkopf 2024-01-21 16:07:32 UTC
Tried with LO 24.2.0.1, gtk3 on OpenSUSE 15.5 64bit rpm Linux.
When closing form tip of the day will still be there. Closed tip of the day - nothing happens. Tried it 3 times, every time with a new profile - didn't crash.
Comment 36 Matt K 2024-01-21 16:17:38 UTC
So, gtk3 behaves a little differently, and sometimes crashes.  Ideally gtk3 could implement a fix for itself, but it seems we should just only prevent tip-of-the-day if using gtk3.  Please advise if this is the best solution to implement.
Comment 37 Commit Notification 2024-01-30 11:50:42 UTC
Matt K committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a2c09afebef70d2419823445ff92379fe3df9485

tdf#151352 Don't display tip-of-the-day in base form editor

It will be available in 24.8.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 38 Stéphane Guillou (stragu) 2024-01-30 14:31:15 UTC
(In reply to Julien Nabet from comment #32)
> IMHO I think disabling the path is just a workaround, not the real fix.
> I think we shouldn't be able to close the window when TOTD appears.
(In reply to Matt K from comment #36)
> So, gtk3 behaves a little differently, and sometimes crashes.  Ideally gtk3
> could implement a fix for itself, but it seems we should just only prevent
> tip-of-the-day if using gtk3.  Please advise if this is the best solution to
> implement.
Maybe Caolán has an idea for a proper fix for gtk3?
Comment 39 Commit Notification 2024-01-30 19:51:53 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b01a9f8c9da419969575d0dc20e7346306ae96d3

tdf#151352 keep a reference to the parent

It will be available in 24.8.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 40 Caolán McNamara 2024-01-30 19:57:20 UTC
I think that will solve the crash problem anyway.

I think the idea of not showing the TOTD for Macro editor or Help is worth pursuing as a general thing, if it's not too difficult or convoluted to do. Or maybe invert the logic to only show the TOTD for writer/calc/impress/draw/math.
Comment 41 Matt K 2024-01-30 20:04:57 UTC
(In reply to Caolán McNamara from comment #40)
> I think that will solve the crash problem anyway.
> 
> I think the idea of not showing the TOTD for Macro editor or Help is worth
> pursuing as a general thing, if it's not too difficult or convoluted to do.
> Or maybe invert the logic to only show the TOTD for
> writer/calc/impress/draw/math.

Do we need approval from some UI people and/or need to open a new bug for that?  Why not show the tip if it doesn't crash?
Comment 42 Buovjaga 2024-01-31 06:19:12 UTC
(In reply to Matt K from comment #41)
> (In reply to Caolán McNamara from comment #40)
> > I think that will solve the crash problem anyway.
> > 
> > I think the idea of not showing the TOTD for Macro editor or Help is worth
> > pursuing as a general thing, if it's not too difficult or convoluted to do.
> > Or maybe invert the logic to only show the TOTD for
> > writer/calc/impress/draw/math.
> 
> Do we need approval from some UI people and/or need to open a new bug for
> that?  Why not show the tip if it doesn't crash?

Heiko: what do you think?
Comment 43 Heiko Tietze 2024-01-31 08:28:11 UTC
(In reply to Buovjaga from comment #42)
> Heiko: what do you think?

TotD is primarily meant to engage people in development. It's very simple to contribute by adding more tips, or enhance one with nice illustrations/animations. Secondarily it's marketing and should give beginners a clue what awesome features we offer.

If a user starts LibreOffice Basic s/he is not a beginner- and wont benefit from the TotD. No objection to hide in this case.

Last but not least we have bug 127294 asking for module-specific tips (although I'm not a fan of this idea). Perhaps it would be a better solution when we go this path.
Comment 44 Commit Notification 2024-01-31 09:59:27 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/6c24cdd5098c5021da53ee96b07bd90bada0f049

tdf#151352 keep a reference to the parent

It will be available in 24.2.1.

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 45 Commit Notification 2024-01-31 09:59:30 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/324e8b30624f26bd965e6aa20f795711dbd6f5ca

tdf#151352 keep a reference to the parent

It will be available in 7.6.5.

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.