Bug 149819

Summary: Crash when closing whole LO after having opened Writer (gtk3 only)
Product: LibreOffice Reporter: Julien Nabet <serval2412>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED FIXED    
Severity: major CC: xiscofauli
Priority: high Keywords: haveBacktrace, regression
Version: 7.5.0.0 alpha0+   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=137544
Whiteboard:
Crash report or crash signature: Regression By:
Attachments: bt with debug symbols
Valgrind (from 2022/06/30)

Description Julien Nabet 2022-07-02 13:01:25 UTC
Description:
On pc Debian x86-64 with master sources updated today + gtk3 rendering, I got a crash when closing whole LO after having opened Writer.

Steps to Reproduce:
1. Launch Writer
2. Close whole LO


Actual Results:
Crash

Expected Results:
No crash


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: 1a8132515babca53b1f1a464236e05f780cbfef3
CPU threads: 12; OS: Linux 5.18; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Calc: threaded
Comment 1 Julien Nabet 2022-07-02 13:01:46 UTC
Created attachment 181087 [details]
bt with debug symbols
Comment 2 Julien Nabet 2022-07-02 13:02:25 UTC
Created attachment 181088 [details]
Valgrind (from 2022/06/30)
Comment 3 Julien Nabet 2022-07-02 13:07:52 UTC
Let's tag it as a regression after https://cgit.freedesktop.org/libreoffice/core/commit/?id=8e7edc8c3620e4f733c1974a288e5a5abd29f87e
"
tdf#137544 std::unordered_set is cheaper here
when the number of on screen elements becomes rather large
"

But in fact, Noel indicated this commit revealed a problem but isn't the root cause.
"this is actually a shutdown problem, because we are keeping an object alive longer than it wants to be. Presumably this only did not show up previously out of sheer luck 
Probably that SwAccessibleDocument needs to be explicitly disposed."

Let's increase the importance since:
- it's a crash
- it happens everytime when closing Writer
- it's a regression

Not highest priority because it happens only on Linux with gtk3 rendering (so can be workarounded by using gen rendering).
Comment 4 Julien Nabet 2022-07-02 15:11:06 UTC
I tried to put some traces in code but don't find a way to fix this.
I'm gonna restore the revert patch and when someone would have fixed this, it can be re-reverted.
Comment 5 Julien Nabet 2022-07-02 16:36:29 UTC
For the moment, there's the workaround with the revert of the triggering commit (cf https://cgit.freedesktop.org/libreoffice/core/commit/?id=dcdf970684131cd60af3c5b927a1e05ba6c7ba81)
Comment 6 Xisco FaulĂ­ 2022-07-07 14:07:27 UTC
I guess we can close this now, since the commit was reverted