Bug 164072 - LibreOffice crashes when deleting all comments
Summary: LibreOffice crashes when deleting all comments
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.8.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:25.8.0 target:25.2.0.0.beta2
Keywords: haveBacktrace
Depends on:
Blocks: Writer-Comments
  Show dependency treegraph
 
Reported: 2024-11-27 15:17 UTC by qa-admin@libreoffice.org
Modified: 2024-12-26 09:59 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
File contains two words and two comments to illustrate the crash (9.42 KB, application/vnd.oasis.opendocument.text)
2024-11-27 15:43 UTC, qa-admin@libreoffice.org
Details
bt (12.19 KB, text/plain)
2024-12-06 15:21 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description qa-admin@libreoffice.org 2024-11-27 15:17:52 UTC
I have basically the same issue as described in Bug ID 120222. I apologize if it was incorrect not to comment in the thread for this Bug ID.

I am running the following version:

Version: 24.8.3.2 (AARCH64) / LibreOffice Community
Build ID: 48a6bac9e7e268aeb4c3483fcf825c94556d9f92
CPU threads: 8; OS: macOS 14.4; UI render: Skia/Metal; VCL: osx
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded

The problem can be produced as follows:
1) Create a new document in Writer
2) Write at least two characters
3) Add one comment to each character
4) Attempt to "delete all comments" or "delete all comments by"

=> LibreOffice crashes completely and immediately

The issue also occurs in safe mode for me and with completely new documents that contain no content at all.

Thank you in advance for your help!!
Comment 1 Xisco Faulí 2024-11-27 15:29:36 UTC
I can't reproduce it in

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7a7ba9cbee91485a9254949d1594352b3629c070
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded

Please attach a sample document, as this makes it easier for us to verify the bug. 
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
(Please note that the attachment will be public, remove any sensitive information before attaching it. 
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)
Comment 2 Xisco Faulí 2024-11-27 15:30:27 UTC
Maybe MacOS only ?
Comment 3 qa-admin@libreoffice.org 2024-11-27 15:43:45 UTC
Created attachment 197826 [details]
File contains two words and two comments to illustrate the crash
Comment 4 qa-admin@libreoffice.org 2024-11-27 15:44:40 UTC
(In reply to Xisco Faulí from comment #2)
> Maybe MacOS only ?

This is possible. I am unsure how to find the crash report and upload it here on macOS. LibreOffice does not automatically generate a report.
Comment 5 Patrick (volunteer) 2024-11-27 16:06:11 UTC
I cannot reproduce this bug. I see no crash when I select the Edit > Comment > Delete All Comments or Delete All Comments by Author menu items:

Version: 24.8.3.2 (AARCH64) / LibreOffice Community
Build ID: 48a6bac9e7e268aeb4c3483fcf825c94556d9f92
CPU threads: 8; OS: macOS 15.1.1; UI render: Skia/Metal; VCL: osx
Locale: en-CA (en_CA.UTF-8); UI: en-US
Calc: threaded
Comment 6 qa-admin@libreoffice.org 2024-11-27 16:11:57 UTC
(In reply to Patrick (volunteer) from comment #5)
> I cannot reproduce this bug. I see no crash when I select the Edit > Comment
> > Delete All Comments or Delete All Comments by Author menu items:
> 
> Version: 24.8.3.2 (AARCH64) / LibreOffice Community
> Build ID: 48a6bac9e7e268aeb4c3483fcf825c94556d9f92
> CPU threads: 8; OS: macOS 15.1.1; UI render: Skia/Metal; VCL: osx
> Locale: en-CA (en_CA.UTF-8); UI: en-US
> Calc: threaded

Very interesting! Can you try to right-click on a comment and select "delete all comments" from there? I will check whether "Edit > Comment
> > Delete All Comments" works for me.
Comment 7 Patrick (volunteer) 2024-11-27 16:37:06 UTC
(In reply to rjnonym from comment #6)
> Very interesting! Can you try to right-click on a comment and select "delete
> all comments" from there? I will check whether "Edit > Comment
> > > Delete All Comments" works for me.

No crash with either popup menu item.

Does the crash still occur if you restart LibreOffice in safe mode by selecting the Help > Restart in Safe Mode menu item?
Comment 8 Julien Nabet 2024-11-27 21:56:08 UTC
Rjnonym: if you still reproduce this in safe mode (as Patrick suggested), would it be possible you follow https://wiki.documentfoundation.org/QA/BugReport/Debug_Information#macOS:_How_to_get_debug_information to provide extra info?
Comment 9 qa-admin@libreoffice.org 2024-11-27 22:09:06 UTC
(In reply to Patrick (volunteer) from comment #7)
> (In reply to rjnonym from comment #6)
> > Very interesting! Can you try to right-click on a comment and select "delete
> > all comments" from there? I will check whether "Edit > Comment
> > > > Delete All Comments" works for me.
> 
> No crash with either popup menu item.
> 
> Does the crash still occur if you restart LibreOffice in safe mode by
> selecting the Help > Restart in Safe Mode menu item?

So, I was able to further research this. 

1) The crash does NOT occur when I use Edit > Comment > Delete All Comments. This could explain why the issue is not widely known, if it affects many installations at all. I apologize for not checking this earlier.

2) The crash occurs ONLY when right-clicking on the comment in the sidebar and selecting Delete All Comments (by Author) in the context menu. 

3) This context-menu crash occurs both in normal and in safe mode.
Comment 10 QA Administrators 2024-11-28 03:13:15 UTC Comment hidden (obsolete)
Comment 11 Sirlaed 2024-11-28 13:54:45 UTC
I tried it on windows, but doesn't crash either

Version: 24.8.3.2 (X86_64) / LibreOffice Community
Build ID: 48a6bac9e7e268aeb4c3483fcf825c94556d9f92
CPU threads: 8; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Vulkan; VCL: win
Locale: es-CO (es_CO); UI: es-ES
Calc: CL threaded
Comment 12 Sirlaed 2024-11-28 13:56:11 UTC
(In reply to Sirlaed from comment #11)
> I tried it on windows, but doesn't crash neither
> 
> Version: 24.8.3.2 (X86_64) / LibreOffice Community
> Build ID: 48a6bac9e7e268aeb4c3483fcf825c94556d9f92
> CPU threads: 8; OS: Windows 11 X86_64 (10.0 build 22631); UI render:
> Skia/Vulkan; VCL: win
> Locale: es-CO (es_CO); UI: es-ES
> Calc: CL threaded
Comment 13 Aryeh 2024-12-01 16:32:29 UTC
(In reply to rjnonym from comment #9)
> So, I was able to further research this. 
> 
> 1) The crash does NOT occur when I use Edit > Comment > Delete All Comments.
> This could explain why the issue is not widely known, if it affects many
> installations at all. I apologize for not checking this earlier.
> 
> 2) The crash occurs ONLY when right-clicking on the comment in the sidebar
> and selecting Delete All Comments (by Author) in the context menu. 
> 
> 3) This context-menu crash occurs both in normal and in safe mode.

I tried both #1 and #2 and was not able to reproduce the crash.

Version: 24.8.2.1 (AARCH64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 8; OS: macOS 14.5; UI render: Skia/Metal; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 14 Buovjaga 2024-12-03 06:27:07 UTC
(In reply to rjnonym from comment #9)
> 2) The crash occurs ONLY when right-clicking on the comment in the sidebar
> and selecting Delete All Comments (by Author) in the context menu. 

No crash for me.

Arch Linux 64-bit
Version: 24.8.3.2 (X86_64) / LibreOffice Community
Build ID: 480(Build:2)
CPU threads: 8; OS: Linux 6.11; UI render: default; VCL: kf6 (cairo+wayland)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
24.8.3-1
Calc: threaded
Comment 15 Julien Nabet 2024-12-06 15:21:32 UTC
Created attachment 197984 [details]
bt

On pc Debian x86-64 with master sources updated today, I could reproduce this with gen rendering (not with gtk3 rendering).
Comment 16 Julien Nabet 2024-12-06 15:28:35 UTC
I noticed this on console:
warn:legacy.osl:563630:563630:vcl/source/window/window.cxx:307: Window ( 10MenuButton()) with live SystemWindows destroyed:  18MenuFloatingWindow()
Window ( 10MenuButton()) with live SystemWindows destroyed:  18MenuFloatingWindow()
Comment 17 Michael Weghorn (away) 2024-12-10 07:53:07 UTC
(In reply to Julien Nabet from comment #16)
> I noticed this on console:
> warn:legacy.osl:563630:563630:vcl/source/window/window.cxx:307: Window (
> 10MenuButton()) with live SystemWindows destroyed:  18MenuFloatingWindow()
> Window ( 10MenuButton()) with live SystemWindows destroyed: 
> 18MenuFloatingWindow()

IIUC, this (and the related crash with the backtrace in comment 15) is unrelated to the original problem reported here and should be fixed by https://gerrit.libreoffice.org/c/core/+/178197 .
Comment 18 Commit Notification 2024-12-10 08:46:38 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/90d9b6e12f0aa9a569958586832bd4abe9561197

tdf#164072 vcl: Let MenuButton dispose its PopupMenu

It will be available in 25.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 19 Commit Notification 2024-12-10 09:50:47 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/9351d4d6a131b7e4c05a5762ef74789d37054aa3

tdf#164072 vcl: Let MenuButton dispose its PopupMenu

It will be available in 25.2.0.0.beta2.

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 20 qa-admin@libreoffice.org 2024-12-26 09:54:40 UTC Comment hidden (spam)
Comment 21 qa-admin@libreoffice.org 2024-12-26 09:59:12 UTC Comment hidden (spam)