Created attachment 173807 [details] Macro in the document results in crash when closing Open the attached document in a dbgutil build, and run the macro "crash" in it. Then close the document => crash. The macro is Sub crash() doc = thisComponent scene = doc.createInstance("com.sun.star.drawing.Shape3DSceneObject") doc.DrawPages(0).add(scene) scene.add(doc.createInstance("com.sun.star.drawing.Shape3DCubeObject")) sheet = doc.Sheets(0).clearContents(1023) ' doc.close(false) End Sub It basically adds a scene to the document's draw page, a cube to the scene, then calls clearContents on the sheet.
https://gerrit.libreoffice.org/c/core/+/119433
Mike Kaganski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/6362c905cf19f2f6cb67bf634091b14c2a8e90ec tdf#143514: Avoid double-free in dbgutil code It will be available in 7.3.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.
It brought some regression see last comment of tdf#117162