Created attachment 163960 [details] Some fields to convert to text by macro When the following BASIC code is executed on the attached document, LibreOffice crashes: Sub FieldsToText fields = ThisComponent.getTextFields.CreateEnumeration Dim map() While fields.hasMoreElements field = fields.nextElement ReDim Preserve map(LBound(map) To UBound(map) + 1) map(UBound(map)) = Array(field, field.getPresentation(false)) Wend For i = LBound(map) To UBound(map) a = map(i)(0).getAnchor If Not (a Is Nothing) Then map(i)(0).getAnchor.setString(map(i)(1)) End If Next i End Sub Tested with Version: 7.1.0.0.alpha0+ (x64) Build ID: ed3ccdbde9ace7d2e3d67a9cc83a189cfaf1cad9 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 The crash seems related to undo data.
Reproduced in Version: 7.1.0.0.alpha0+ Build ID: 58937aa4a50ecd681382f03331340da4c843b01e CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded
Doesn't crash for me in Version: 5.3.0.0.alpha1+ Build ID: 4136757b4e51c4e6f7cb4132c95538a7f831ef2c CPU Threads: 4; OS Version: Linux 4.19; UI Render: default; VCL: gtk3; Layout Engine: new; Locale: en-US (en_US.UTF-8); Calc: group
Regression introduced by: https://cgit.freedesktop.org/libreoffice/core/commit/?id=91b2325808a75174f284c48c8b8afc118fad74e4 author Michael Stahl <Michael.Stahl@cib.de> 2019-12-05 16:49:33 +0100 committer Michael Stahl <michael.stahl@cib.de> 2019-12-06 13:26:32 +0100 commit 91b2325808a75174f284c48c8b8afc118fad74e4 (patch) tree d456e57e6d0d0532592030cb0d3d20585b8fe7a4 parent 6ed12ab2d0742f86ce25defec3c776562dbfad9a (diff) tdf#121300 sw: consistent fly at-pargraph selection Bisected with: bibisect-linux64-7.0 Adding Cc: to Michael Stahl
The content of attachment 163960 [details] has been deleted for the following reason: user's request
Michael Stahl committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/14fd4b54113f884cfd6871aeff693734fc06224b tdf#135457 sw: fix invalidation of SwXTextField 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.
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-7-0": https://git.libreoffice.org/core/commit/27e9ead64d4e3a3f3b3d1203f7b9fee50eb0d04d tdf#135457 sw: fix invalidation of SwXTextField It will be available in 7.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.
actually regression presumably from: commit e18359445fabad9ba1a704600e9ee327112cc6ae Author: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> AuthorDate: Sun Apr 14 13:33:35 2019 +0200 Commit: Björn Michaelsen <bjoern.michaelsen@libreoffice.org> CommitDate: Sun May 5 22:27:54 2019 +0200 [API CHANGE] SwXTextField: no more SwModify/SwClient - fix unittest assuming the double-insertion of annotation throwing an IllegalArgumentException was intentional - remove SwModify/SwClient in SwXTextField - also: add basic C++ api test ... which is older than the commit in comment #3 ? fixed on master
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-6-4": https://git.libreoffice.org/core/commit/8f563f83a1cad52ba397fd7386690736fb891db6 tdf#135457 sw: fix invalidation of SwXTextField It will be available in 6.4.7. 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.
Thank you Michael!