Running this code when in IDE, and Styles Inspector is active in current text document, crashes LO: Sub crashWithSI ThisComponent.CurrentController.ViewCursor.Start.setString("a") End Sub Version: 7.1.0.0.alpha0+ (x64) Build ID: 52f8e0b6f09be0e8e8a068edef2017d45d5a1892 CPU threads: 12; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win Locale: ru-RU (ru_RU); UI: en-US Calc: CL See also bug 135178 comment 8, which might be related.
confirm crash in Version: 7.1.0.0.alpha0+ (x64) Build ID: <buildversion> CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Vulkan; VCL: win Locale: ru-RU (ru_RU); UI: en-US Calc: CL build from 8 August 2020
A code pointer: WriterInspectorTextPanel's AttrChangedNotify tries to get a "current" shell, which might change over time, while the panel should be bound to the original shell. On the other hand, Writer's SI captures a SwWrtShell in its ctor, which is what may be used later everywhere when it needs any shell. E.g., the SwWrtShell is the shell that provides cursor itself; to get document shell from SwWrtShell, you call m_pShell->GetDoc()->GetDocShell(). HTH.
Shivam Kumar Singh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/a2f226d63e88f2c6ba6771b37a7039c82e3d0001 tdf#135528 tdf#135491 Fix LO crash when using macro with SI enabled It will be available in 7.1.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.