New TextDocument, new Basic module Sub testThis() dtField = ThisComponent.createInstance("com.sun.star.text.textfield.DateTime") REM No error REM Try to inspect the new instance: Full crash. End Sub The baby DateTime field inserted into the text -even if not additionally initialized- accepts inspection without the crash. It is a regression. Up to V 5.4.4 I didn't get the crash. Versions 6.4.5 and higher (including 7.5.0.0.beta1) showed the bug.
(In reply to Wolfgang Jäger from comment #0) > REM Try to inspect the new instance: Full crash. What does this mean? Please explain what we have to do. Set to NEEDINFO. Change back to UNCONFIRMED after you have provided the information.
Create a new TextDocument (you may leave the text empty). Just to keep testing separate from different macros: Create a new Basic module in the Standard library of the new Document. (The issue also occurs if the code is executed from a module in the application's library.) Insert the above given 5 lines of Basic code (2 of them REM) into the module. Execute as a step (F8) in the IDE the first actual statement beginning with "dtField = ..." Do NOT execute a second step! (Would exit the Sub in this case. REM While the Sub is still running: Statement-position-arrow visible and pointing to 'End Sub'. Enter the variable name "dtField" into the 'Watch' bar. It's shown in the panel now. REM Still not having exited the Sub: Click on the little "+" next to 'dtField' in the Watch panel. Enjoy the crash. I originally did not test with different subtype services of "com.sun.star.text.textfield..." Assuming I would get the same result, I didn't want to get crashs again and again, and to probably get a corrupted configuration once. Now I also tested with subtype ".Author" and got the same kind of total crash. As soon as the field is already INSERTED into a text object by a statement like tx.insertTextContent(someRange, theField, anyBoolean) It can be inspected without a crash.
[Automated Action] NeedInfo-To-Unconfirmed
(In reply to Wolfgang Jäger from comment #2) > REM While the Sub is still running: Statement-position-arrow visible and > pointing to 'End Sub'. I don't understand what this means.
(In reply to Buovjaga from comment #4) > (In reply to Wolfgang Jäger from comment #2) > > REM While the Sub is still running: Statement-position-arrow visible and > > pointing to 'End Sub'. > > I don't understand what this means. There was given a short Sub intended to run for a text document in LibO: Sub testThis() dtField = ThisComponent.createInstance("com.sun.star.text.textfield.DateTime") REM No error REM Try to inspect the new instance: Full crash. End Sub Execute the single statement as a step (F8 or respective Click) in the IDE. The little arrow left of the line numbers pointing to the statement to be executed next now points to 'End Sub'. This indicates that the Sub not yet was exited. The objects shown in the Watch panel are still "living", and the object dtField listed there (in the only used line likely) has a little framed "+" in front meaning "Click me to see details!". Try that, and you should get the crash. I specialized the report to objects of type textfield.DateTime. This doesn't mean the issuue won't occur with different objects newly created by .createInstance() and supporting com.sun.star.text.TextContent, but not yet actually inserted using .insertTextContent(range, object, absorb)) Hope this helps.
Created attachment 186152 [details] GDB trace of crash Ok, I did not understand that I need to step until that. I only pressed F8 once at first. Arch Linux 64-bit, X11 Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 6dfa9c7c0db91a71f3787226636864161d5367ca CPU threads: 8; OS: Linux 6.2; UI render: default; VCL: kf5 (cairo+xcb) Locale: fi-FI (fi_FI.UTF-8); UI: en-US Calc: threaded Built on 23 March 2023
Created attachment 186153 [details] Example file with macro
Bibisected with linux-64-6.3 to 2c9298e4f667a5dd7606d79890fcedfff0f66e26 SwXTextField::Impl FieldTypeClient: SwClient no more
I can reproduce, so lets give https://gerrit.libreoffice.org/c/core/+/150351 a go
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/5464a1dad69c52d011b194baf7d543ce8dd27748 Resolves: tdf#152619 crash inspecting uninserted XFieldMaster It will be available in 7.6.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.
that seems to work for me in trunk, backport to 7-5 in gerrit
Caolán McNamara committed a patch related to this issue. It has been pushed to "libreoffice-7-5": https://git.libreoffice.org/core/commit/71c7c3dddb1291e262b1f8132b75e95fc6f9fa02 Resolves: tdf#152619 crash inspecting uninserted XFieldMaster It will be available in 7.5.4. 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.
Caolán McNamara committed a patch related to this issue. It has been pushed to "libreoffice-7-4": https://git.libreoffice.org/core/commit/d9cf8459ef49f3011de3003538b503d0be06dc17 Resolves: tdf#152619 crash inspecting uninserted XFieldMaster It will be available in 7.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.
Crash reproduced in 7.3.7.2 with attachment 186152 [details], report is https://crashreport.libreoffice.org/stats/crash_details/ecefe62b-ea3c-4273-863e-9b480571add3 Fix verified in: Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 5cd9de202765e243e41416802f3e4486b8a96f16 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded Thank you all!
Caolán McNamara committed a patch related to this issue. It has been pushed to "libreoffice-7-5-3": https://git.libreoffice.org/core/commit/72f598e4b6f5250f250a3f3cce82e059f4fae34f Resolves: tdf#152619 crash inspecting uninserted XFieldMaster It will be available in 7.5.3. 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.