Bug 146286 - Crash/hang calling context menu
Summary: Crash/hang calling context menu
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
(earliest affected) alpha0+
Hardware: x86-64 (AMD64) All
: highest critical
Assignee: Not Assigned
Whiteboard: target:7.4.0
Keywords: regression
: 146292 146308 146324 (view as bug list)
Depends on:
Reported: 2021-12-17 19:08 UTC by Regina Henschel
Modified: 2021-12-20 10:29 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:
Regression By:

File to reproduce the crash (14.40 KB, application/vnd.oasis.opendocument.graphics)
2021-12-17 19:08 UTC, Regina Henschel
Call Stack by VS2019 (4.23 KB, text/plain)
2021-12-17 19:09 UTC, Regina Henschel

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2021-12-17 19:08:14 UTC
Created attachment 176980 [details]
File to reproduce the crash

Open attached document.
Click on green line to mark it.
Press context menu key. => Crash.

Crash report was not generated.

The crash happens with a today debug build Version: (x64) / LibreOffice Community
Build ID: 8c028b7e41e3d350d0e67005b16faf0159cc5c12
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: default; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: threaded
Comment 1 Regina Henschel 2021-12-17 19:09:13 UTC
Created attachment 176981 [details]
Call Stack by VS2019
Comment 2 Telesto 2021-12-17 20:19:47 UTC
Reading the BT & your recent work in this area..
Comment 3 Caolán McNamara 2021-12-17 21:18:15 UTC
commit b37f9fbf05e16eb58eae40c6d900a4b9da2972db
Date:   Thu Dec 16 19:24:42 2021 +0200

    osl::Mutex->std::mutex in VCLXMenu
    Change-Id: I93883f5cd8f5f83f33eded87d995f95dbfd7989b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126989

is a strong contender as well. I haven't confirmed yet but
VCLXMenu::queryInterface does std::unique_lock aGuard( maMutex ) and 
VCLXMenu::execute does std::unique_lock aGuard( maMutex ) also
Comment 4 Caolán McNamara 2021-12-17 21:30:11 UTC
yeah, I think I can confirm it was that. Linux runtime isn't as clever apparently and just hangs rather than assert.
Comment 5 Julien Nabet 2021-12-18 11:04:57 UTC
*** Bug 146292 has been marked as a duplicate of this bug. ***
Comment 6 Julien Nabet 2021-12-18 11:07:29 UTC
Let's put this one as highest since:
- it's in fact just right click
- it happens at least on Windows (crash) and Linux (hang)
- regression
- very fundamental feature
Comment 7 Julien Nabet 2021-12-18 11:09:59 UTC
Noel/Caolán: if you think it would need some time to tackle it, IMHO it could be relevant to revert the commit to avoid a lot of people create a lot of dup bugs.
Comment 8 Noel Grandin 2021-12-18 14:19:12 UTC
fix at
Comment 9 Commit Notification 2021-12-18 15:29:16 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":


tdf#146286 Crash/hang calling context menu

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

Affected users are encouraged to test the fix and report feedback.
Comment 10 Julien Nabet 2021-12-18 21:59:59 UTC
*** Bug 146308 has been marked as a duplicate of this bug. ***
Comment 11 Hossein 2021-12-18 22:23:15 UTC
Confirming the fix. Right clicking on the attachment 177007 [details] (described in the duplicate bug 146308) in Linux, no longer causes LibreOffice to hang.
Comment 12 Julien Nabet 2021-12-20 10:29:00 UTC
*** Bug 146324 has been marked as a duplicate of this bug. ***