Description: Description: I have a complex LibreOffice Calc document containing substantial data and a significant amount of macros. I am using an XActivationEventListener to trigger a specific subroutine when sheets are switched. However, this setup causes a crash under certain conditions. Steps to Reproduce: Open the document. Change a value on Sheet X. Switch to Sheet Y. Attempt to undo the change. Observed Behavior: LibreOffice Calc crashes upon attempting to undo the change after switching sheets. Expected Behavior: The program should undo the change without crashing. Additional Information: The event listener, named "sheetChangeEventListener," is defined as follows: Sub SheetChangeListener_activeSpreadsheetChanged(ByRef pEvt As Object) Call OnActivateSheet End Sub When the undo action is triggered, the active sheet changes back to Sheet X, invoking the event listener. The crash occurs immediately after the execution of the event listener function, specifically when the "End Sub" line is reached, and the debugger steps forward (F8). Attempts to Isolate the Issue: I tried to reproduce the bug in a different document, but was unable to cause the same crash. Temporary Workaround: Commenting out the event listener prevents the crash, but this is not a viable long-term solution as the event listener is needed for the document's functionality. Environment: LibreOffice version: 24.2.4.2 Operating system: Windows 10 Please investigate this issue and provide guidance on how to resolve it. Thank you for your assistance. Steps to Reproduce: 1. Open the document. 2. Change a value on Sheet X. 3. Switch to Sheet Y. 4. Attempt to undo the change. Actual Results: LibreOffice Calc crashes upon attempting to undo the change after switching sheets. Expected Results: The program should undo the change without crashing. Reproducible: Always User Profile Reset: Yes Additional Info: Version: 24.2.4.2 (X86_64) / LibreOffice Community Build ID: 51a6219feb6075d9a4c46691dcfe0cd9c4fff3c2 CPU threads: 16; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win Locale: de-DE (de_DE); UI: en-US Calc: CL threaded
Please attach a sample file, reduce the size as much as possible without private information.
Created attachment 195037 [details] Minimal file, start, write anything in any cell, change sheet, and undo for crash I removed everything other than 2 sheets and a few macros from my file. The bug happens every time. Just open the document, write something in any of the empty cells, change sheets and undo. The program will crash, or at least it does on my system.