Description: https://dev-builds.libreoffice.org/crashtest/5923d4173d5000d3462fa6e55952bfc5101b6bfa/backtraces/task800-core.backtrace.txt Steps to Reproduce: 1. wget https://bugs.documentfoundation.org/attachment.cgi?id=99333 -O tdf78907-1.docx 2. ./instdir/program/soffice.bin --headless --convert-to odt ./tdf78907-1.docx Actual Results: crash Expected Results: no crash Reproducible: Always User Profile Reset: No Additional Info: commit 35021cd56b3b4e38035804087f215c80085564be Date: Wed Aug 5 11:16:32 2020 +0300 tdf#124470: Split export of table autostyles out from collection phase This allows to call collectAutoStyles where required (e.g. when enumerating used fonts), without side effect of writing table styles XML inside the call, out of place.
seems to have begin with 35021cd56b3b4e38035804087f215c80085564be from tdf#124470: Split export of table autostyles out from collection phase
I can't repro here on Win10 with dbgutil build ... :-(
Created attachment 164494 [details] gdb bt Here's a bt retrieved on pc Debian x86-64 with master sources updated today commit ec579354af954867b829e7d08e4d752518c83728 (HEAD -> master, origin/master, origin/HEAD) Author: Michael Stahl <Michael.Stahl@cib.de> Date: Wed Aug 19 18:55:27 2020 +0200 tdf#135721 sw: fix spell check context menu deleting flys
#0 SwXMLTextParagraphExport::exportTable(com::sun::star::uno::Reference<com::sun::star::text::XTextContent> const&, bool, bool) (this=0x1a76150, rTextContent=uno::Reference to (SwXTextTable *) 0x5143a28, bAutoStyles=true, _bProgress=true) at sw/source/filter/xml/xmltble.cxx:1203 #1 0x00007fffec068c39 in XMLTextParagraphExport::exportTextContentEnumeration(com::sun::star::uno::Reference<com::sun::star::container::XEnumeration> const&, bool, com::sun::star::uno::Reference<com::sun::star::text::XTextSection> const&, bool, bool, com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> const*, TextPNS) (this=0x1a76150, rContEnum=uno::Reference to ((anonymous namespace)::SwXParagraphEnumerationImpl *) 0x50ddb60, bAutoStyles=true, rBaseSection=empty uno::Reference, bIsProgress=true, bExportParagraph=true, pRangePropSet=0x0, eExtensionNS=TextPNS::ODF) at xmloff/source/text/txtparae.cxx:1814 #2 0x00007fffec069554 in XMLTextParagraphExport::exportText(com::sun::star::uno::Reference<com::sun::star::text::XText> const&, com::sun::star::uno::Reference<com::sun::star::text::XTextSection> const&, bool, bool, bool) (this=0x1a76150, rText=uno::Reference to (SwXCell *) 0x50e7da0, rBaseSection=empty uno::Reference, bAutoStyles=true, bIsProgress=true, bExportParagraph=true) at xmloff/source/text/txtparae.cxx:1700 #3 0x00007fffcad4f8e8 in XMLTextParagraphExport::collectTextAutoStyles(com::sun::star::uno::Reference<com::sun::star::text::XText> const&, com::sun::star::uno::Reference<com::sun::star::text::XTextSection> const&, bool) (this=0x1a76150, rText=uno::Reference to (SwXCell *) 0x50e7da0, rBaseSection=empty uno::Reference, bIsProgress=true) at include/xmloff/txtparae.hxx:460 #4 0x00007fffcad49f01 in SwXMLExport::ExportTableLinesAutoStyles(SwTableLines const&, unsigned int, unsigned int, rtl::OUString const&, SwXMLTableColumnsSortByWidth_Impl&, SwXMLTableFrameFormatsSort_Impl&, SwXMLTableFrameFormatsSort_Impl&, SwXMLTableInfo_Impl&, bool) (this=0x4de4ae0, rLines=..., nAbsWidth=9412, nBaseWidth=65535, rNamePrefix="Table2", rExpCols=..., rExpRows=..., rExpCells=..., rTableInfo=..., bTop=true) at sw/source/filter/xml/xmltble.cxx:695 #5 0x00007fffcad4a8f5 in SwXMLExport::ExportTableAutoStyles(SwTableNode const&) (this=0x4de4ae0, rTableNd=...) at sw/source/filter/xml/xmltble.cxx:750 #6 0x00007fffcad4d103 in SwXMLTextParagraphExport::exportTableAutoStyles() (this=0x1a76150) at sw/source/filter/xml/xmltble.cxx:1162 at #6 we are doing.... for (const auto* pTableNode : maTableNodes) and at #1 we do... maTableNodes.push_back(pTableNd); so modify the maTableNodes we are iterating over
Created attachment 164495 [details] Valgrind trace Here's a Valgrind trace from pc Debian x86-64 with master sources updated with same commit as bt but without enable-dbgutil.
Please check if this fixes the problem: https://gerrit.libreoffice.org/c/core/+/101096
(In reply to Mike Kaganski from comment #6) > Please check if this fixes the problem: > https://gerrit.libreoffice.org/c/core/+/101096 Indeed! I don't reproduce the crash with this patch and I got an odt document in instdir/program.
(In reply to Julien Nabet from comment #7) > Indeed! I don't reproduce the crash with this patch Thanks! > and I got an odt document in instdir/program. Sorry, not sure I understand what you mean: does the patch create some ODT in instdir/program? it should not...
(In reply to Mike Kaganski from comment #8) > ... > > and I got an odt document in instdir/program. > > Sorry, not sure I understand what you mean: does the patch create some ODT > in instdir/program? it should not... Yes it did. I thought it was ok since I launched: ./soffice.bin --headless --convert-to odt /tmp/5f89318bb1b0a7ec46a91126e4db1157.docx from: instdir/program
(In reply to Julien Nabet from comment #9) Ah, so I think I understand now: the patch does not create ODTs in program directory itself (and that's good), and running the --convert-to command creates the file (as expected), so everything works as it should?
(In reply to Mike Kaganski from comment #10) > (In reply to Julien Nabet from comment #9) > > Ah, so I think I understand now: the patch does not create ODTs in program > directory itself (and that's good), and running the --convert-to command > creates the file (as expected), so everything works as it should? I suppose so but I'll let Caolán have the last word :-)
seems fine to me
Mike Kaganski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/f0286ad82465152b29bba01ab2edeb97291397fa tdf#135942: avoid collecting autostyles during writing them 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.
Mike Kaganski committed a patch related to this issue. It has been pushed to "libreoffice-7-0": https://git.libreoffice.org/core/commit/0273675e7dde577077ccca17571846a0942f2630 tdf#135942: avoid collecting autostyles during writing them 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.
Mike Kaganski committed a patch related to this issue. It has been pushed to "libreoffice-6-4": https://git.libreoffice.org/core/commit/63fba1ef338f14e2451baf039e0ae30d992b6743 tdf#135942: avoid collecting autostyles during writing them 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.
*** Bug 137103 has been marked as a duplicate of this bug. ***