Bug 152200

Summary: An input box followed by a to-character anchor of a textbox results in corrupt DOCX
Product: LibreOffice Reporter: Mike Kaganski <mikekaganski>
Component: WriterAssignee: Mike Kaganski <mikekaganski>
Status: RESOLVED FIXED    
Severity: normal CC: aron.budea
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=149996
Whiteboard: target:7.5.0 target:7.4.4
Crash report or crash signature: Regression By:
Attachments: An input field and a textbox

Description Mike Kaganski 2022-11-24 11:53:57 UTC
Created attachment 183753 [details]
An input field and a textbox

Open the attached document in Writer, save (as DOCX), close, and reopen.
It crashes on opening it after close. In debug builds, a failed assertion message appears.

First of all, the bad DOCX should not be generated; also, invalid input must not crash the program.
Comment 1 Commit Notification 2022-11-24 21:01:51 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9a7945f36ce95a48e0d525bc444e722b9ec5c452

tdf#152200: tolerate begin/end fldChar context mismatch

It will be available in 7.5.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.
Comment 2 Commit Notification 2022-11-25 15:55:40 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ec345c02d8fa5a7c7d4ea4ad08ae7be5303d9b20

tdf#152200: Make sure to not write objects into field character runs

It will be available in 7.5.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.
Comment 3 Commit Notification 2022-11-28 11:34:58 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/b2237449bec85903f438454ac925574f3856d8c6

tdf#152200: tolerate begin/end fldChar context mismatch

It will be available in 7.4.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.
Comment 4 Commit Notification 2022-11-30 09:57:11 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/e1dca6d2d6a39c4996256c5552896cae7f25499b

tdf#152200: Make sure to not write objects into field character runs

It will be available in 7.4.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.