Bug 164421 - odt with superscript in header exported to rtf cannot be reloaded
Summary: odt with superscript in header exported to rtf cannot be reloaded
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: haveBacktrace
Depends on:
Blocks: RTF Crash-Assert
  Show dependency treegraph
 
Reported: 2024-12-21 21:00 UTC by Caolán McNamara
Modified: 2025-01-30 06:33 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Backtrace (5.72 KB, text/plain)
2025-01-30 06:33 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Caolán McNamara 2024-12-21 21:00:53 UTC
Description:
There are a number of crashtesting documents which, when exported to rtf, cannot be reimported without asserting

Steps to Reproduce:
1. wget https://bugs.documentfoundation.org/attachment.cgi?id=73361 -O ~/Downloads/tdf59645-2.odt
2. ./instdir/program/soffice --headless --convert-to rtf ~/Downloads/tdf59645-2.odt
3. ./instdir/program/soffice --headless --convert-to pdf ./tdf59645-2.rtf

Actual Results:
#20 writerfilter::dmapper::DomainMapper_Impl::substream(unsigned int, tools::SvRef<writerfilter::Reference<writerfilter::Stream>> const&) at /home/caolan/LibreOffice/core/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx:10131
#21 writerfilter::dmapper::DomainMapper::lcl_substream(unsigned int, tools::SvRef<writerfilter::Reference<writerfilter::Stream>> const&) at /home/caolan/LibreOffice/core/sw/source/writerfilter/dmapper/DomainMapper.cxx:4747
#22 writerfilter::LoggedStream::substream(unsigned int, tools::SvRef<writerfilter::Reference<writerfilter::Stream>> const&) at /home/caolan/LibreOffice/core/sw/source/writerfilter/dmapper/LoggedResources.cxx:275
#23 writerfilter::rtftok::RTFDocumentImpl::resolveSubstream(unsigned long, unsigned int, rtl::OUString const&) at /home/caolan/LibreOffice/core/sw/source/writerfilter/rtftok/rtfdocumentimpl.cxx:381
#24 writerfilter::rtftok::RTFDocumentImpl::resolveSubstream(unsigned long, unsigned int) at /home/caolan/LibreOffice/core/sw/source/writerfilter/rtftok/rtfdocumentimpl.cxx:356


Expected Results:
reimport without assert


Reproducible: Always


User Profile Reset: No

Additional Info:
Might not affect a non-dbgutil version without asserts enabled
Comment 1 Aron Budea 2025-01-30 06:32:56 UTC
Confirmed with a local debug build of LO 25.8.0.0.alpha0+ (f3271cf5adfbe2e00d02417d85ff320763d7e9a5) / Windows.

This is the assert that fails:
// check that stacks are the same as before substream
assert(m_aContextStack.size() == contextSize);
https://opengrok.libreoffice.org/xref/core/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx?r=575094675e7f6fb643e8cac61f06c14d2f79bcd5#10159
Comment 2 Aron Budea 2025-01-30 06:33:25 UTC
Created attachment 198879 [details]
Backtrace