Bug 161625 - Installing the same extension twice makes LibreOffice freeze (kf5/kf6)
Summary: Installing the same extension twice makes LibreOffice freeze (kf5/kf6)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Extensions (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: All All
: medium major
Assignee: Michael Weghorn
URL:
Whiteboard: target:25.2.0 target:24.8.3
Keywords: haveBacktrace
Depends on:
Blocks: KDE, KF5 Qt6
  Show dependency treegraph
 
Reported: 2024-06-17 23:15 UTC by Rafael Lima
Modified: 2024-10-22 13:29 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
GDB trace (5.10 KB, text/plain)
2024-10-19 15:52 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Lima 2024-06-17 23:15:52 UTC
Since recently, if you try to install the same extension twice LibreOffice will freeze. This appears to happen with any extension.

Steps to reproduce (the way it happened to me):
1) Download the latest version of APSO from [1]
2) Open LibreOffice and go to Tools - Extensions - Add and install the extension
3) Close the Extensions dialog and restart LibreOffice
4) Now open LibreOffice again and repeat steps 1 and 2
5) LibreOffice will freeze

[1] https://extensions.libreoffice.org/en/extensions/show/apso-alternative-script-organizer-for-python

If you uninstall the extension and install it again, it will work... but installing it again on top of an existing installation will freeze LO.

Actually I detected this issue while developing one of my extensions... during my testing I usually install modified versions of the extension on top of the existing installed extension (to replace it and test it). Then today I did this on LO 25.2 and got this freeze... it did not happen in 24.2.

Problems happens in

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 76bf4f177d2c9d7962ca325887035d57a67f416f
CPU threads: 16; OS: Linux 6.8; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: CL threaded

The problem does not exist in

Version: 24.2.3.2 (X86_64) / LibreOffice Community
Build ID: 420(Build:2)
CPU threads: 16; OS: Linux 6.8; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Ubuntu package version: 4:24.2.3-0ubuntu0.24.04.2
Calc: threaded

Can anyone else reproduce this?
Comment 1 Stéphane Guillou (stragu) 2024-07-03 06:03:02 UTC
Not reproduced with:

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 5bf58785ba2831de4efc2afe9df463b4a753ccb1
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded
Comment 2 Buovjaga 2024-08-22 06:02:56 UTC
Now it doesn't install even once: I see a window in the task bar with "Warning", but I can't focus into it. LibreOffice hangs and has to be killed.

Rafael: how does the current extension version work for you?

Arch Linux 64-bit
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 560e5406f3c6e8e6ed0f1c251b6910465266ed8d
CPU threads: 8; OS: Linux 6.10; UI render: default; VCL: kf6 (cairo+wayland)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: CL threaded
Built on 22 August 2024
Comment 3 Buovjaga 2024-10-19 15:51:52 UTC
With bug 162696 fixed, now we can properly test this. I reproduce, but not with gtk3 or gen.

Arch Linux 64-bit
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: a5f45b816e6e26439fa9e6e594b6972b100d13af
CPU threads: 8; OS: Linux 6.10; UI render: default; VCL: kf6 (cairo+wayland)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: CL threaded
Built on 15 October 2024
Comment 4 Buovjaga 2024-10-19 15:52:53 UTC
Created attachment 197155 [details]
GDB trace

I took a bt by pressing Ctrl-C in gdb after the freeze.
Comment 5 Michael Weghorn 2024-10-21 07:16:34 UTC
I can't reliably reproduce the issue (just was able to reproduce a single time out of ~15 tries), but from the backtrace, I think https://gerrit.libreoffice.org/c/core/+/175298 should fix it. Could you please check?
Comment 6 Rafael Lima 2024-10-21 19:53:32 UTC
Now I'm the one who has been unable to reproduce the bug.

Testing with

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7b2ea917cecbaa7deb67559fe09531bb2a3d98eb
CPU threads: 12; OS: Linux 6.11; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (en_US.UTF-8); UI: en-US
Calc: CL threaded

I can no longer reproduce the issue. I tested with a handful of extensions and the freeze stopped happening.
Comment 7 Commit Notification 2024-10-22 05:17:48 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/162ef484df31829361950bb6cd19f6e7f010b54f

tdf#161625 Use SolarMutex instead of std::mutex in ExtMgrDialog

It will be available in 25.2.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 8 Michael Weghorn 2024-10-22 05:19:10 UTC
Closing as fixed, s.a. comments in https://gerrit.libreoffice.org/c/core/+/175298
Comment 9 Commit Notification 2024-10-22 13:29:41 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/7266e872863625f32270f75080703ff923dd242e

tdf#161625 Use SolarMutex instead of std::mutex in ExtMgrDialog

It will be available in 24.8.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.