Created attachment 194157 [details] Screenshot of the issue 1. Open attachment 180759 [details] from bug 149563 2. SaxException Since: https://git.libreoffice.org/core/+/4b0fa253a4540f5461397815d290586f9ddabe61 author Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> Tue Nov 28 13:46:21 2023 +0900 committer Tomaž Vajngerl <quikee@gmail.com> Fri Dec 01 08:26:38 2023 +0100 tdf#136472 adjust ooxml import to handle first header/footer
Adding CC to: Tomaž Vajngerl
Confirmed using LO 24.8.0.0.alpha0+ (6d5d9eaa61505cebaf3bde4bfc157d8e19fec8de) / Ubuntu.
Lovely: it occurs when calling DomainMapper_Impl::ConvertHeaderFooterToTextFrame
The problem seems to be coming from copyHeaderFooter(). Converted1 does not have bHasHeader, so it gets turned on with xStyle->setPropertyValue(sHeaderIsOn, uno::Any(bPreviousHasHeader ... The act of turning on the header triggers a Notify of SwXHeadFootText::Impl::Notify that m_pHeadFootFormat "First footer" is "Dying" because ChgPageDesc did a SwDoc::CopyMasterFooter. So my guess is that the xTextAppend is connected to an orphaned footer, but my brain is not large enough to understand all this stuff. We could easily put a try/catch inside ConvertHeaderFooterToTextFrame's while loop, but that would simply be an avoidance "fix".
avoided in 25.2 with commit cf22d66c5837f108296b37bc98f17ee96869a7ef Author: Miklos Vajnaon Tue Aug 6 08:30:22 2024 +0200 Related: tdf#162295 DOCX import: optimize copying headers/footers backporting to 24.8 is easy/automatic. to 24.2 will be slightly harder since Noel moved writerfilter into SW in April 2024.
(In reply to Justin L from comment #5) > avoided in 25.2 with commit cf22d66c5837f108296b37bc98f17ee96869a7ef > Author: Miklos Vajnaon Tue Aug 6 08:30:22 2024 +0200 > Related: tdf#162295 DOCX import: optimize copying headers/footers > > backporting to 24.8 is easy/automatic. to 24.2 will be slightly harder since > Noel moved writerfilter into SW in April 2024. Done in https://gerrit.libreoffice.org/c/core/+/171990
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/f019943851e138fc3a73fcc9a9692f83d50f1e51 tdf#161139: add unit test to sw filters pass It will be available in 25.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.
Justin Luth committed a patch related to this issue. It has been pushed to "libreoffice-24-8": https://git.libreoffice.org/core/commit/e61a19f8fff727e691d0ab23e6e8642b9f63ecf7 tdf#161139: add unit test to sw filters pass It will be available in 24.8.1. 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.
Justin Luth committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/9a288db65a6c5d665edd4067093a076c9507603c tdf#161139: add unit test to sw filters pass It will be available in 24.2.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.