Description: XTextRange::getString() triggers selection change event, resulting infinite recursion using it in selectionChanged(). Steps to Reproduce: Add a XSelectionChangeListener to the document with a selectionChanged() calling the getString() of the selected text range. Select a word in the document editor using the Ctrl-Shift-arrow keys. Actual Results: LibreOffice crashes because of the infinite recursion. Expected Results: No crashing. Reproducible: Always User Profile Reset: No Additional Info: See Bug 154521 for a pyUNO test code.
László Németh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/993e420e3b89193b14c8289abcaecca9a90fc42f tdf#155951 sw: fix crash using XTextRange::getString() in selectionChanged() It will be available in 24.2.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.
László Németh committed a patch related to this issue. It has been pushed to "libreoffice-7-6": https://git.libreoffice.org/core/commit/440179cfce5aafa7f480bfea48984451553f8e84 tdf#155951 sw: fix crash using XTextRange::getString() in selectionChanged() It will be available in 7.6.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.