Bug 146617 - Calc crashes when stopping XEnhancedMouseClickHandler listener from event handling macro.
Summary: Calc crashes when stopping XEnhancedMouseClickHandler listener from event han...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.2.3.2 release
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:7.4.0 target:7.3.0.2 target:7.2.6
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-06 14:57 UTC by Vladimir Sokolinskiy
Modified: 2022-01-10 14:21 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
EnhancedMouseClickHandler.ods (9.88 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-01-06 14:57 UTC, Vladimir Sokolinskiy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Sokolinskiy 2022-01-06 14:57:02 UTC
Created attachment 177350 [details]
EnhancedMouseClickHandler.ods

Calc crashes when stopping (removing) XEnhancedMouseClickHandler listener from event handling macro.

1. Open the attached file.
2. Run the RegisterMouseClickHandler macro.
3. Mouse click on any cell of the sheet.

LibreOffice crashes.

If the XMouseClickHandler interface is used instead of the XEnhancedMouseClickHandler, then the error does not occur.
Comment 1 Mike Kaganski 2022-01-06 15:41:08 UTC
https://gerrit.libreoffice.org/c/core/+/128054
Comment 2 Vladimir Sokolinskiy 2022-01-06 16:16:10 UTC
Mike, thank you for your fantastically quick response! :)
Comment 3 Commit Notification 2022-01-06 19:45:51 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#146617: iterators may be invalidated during handler call

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:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2022-01-07 14:10:34 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

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

tdf#146617: iterators may be invalidated during handler call

It will be available in 7.3.0.2.

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 5 Commit Notification 2022-01-10 13:58:13 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

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

tdf#146617: iterators may be invalidated during handler call

It will be available in 7.2.6.

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 6 Vladimir Sokolinskiy 2022-01-10 14:21:05 UTC
Mike, thanks again!