Created attachment 124308 [details] file problem
Created attachment 124309 [details] error popup
I can confirm with Version: 5.2.0.0.alpha0+ Build ID: ef34535ceb60d7d63b8d8671e4c6e9e43ffbd17d CPU Threads: 4; OS Version: Linux 4.2; UI Render: default; TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-03-27_09:53:05 and 4.4
Reproduced with v4.4.0.3 / Windows 7 (it has some other visual issues as well that are gone in later releases). Not reproduced with v4.3.0.4. => regression Raising severity to critical, since the document can't be saved.
The direct cause is a exception in SwXTextFrame::createTextCursor. if(!pNewStartNode || pNewStartNode != pOwnStartNode) { uno::RuntimeException aExcept; aExcept.Message = "no text available"; throw aExcept; } backtrace: #0 0x00007fb4e54f48bd in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #1 0x00007fb4a04872cb in SwXTextFrame::createTextCursor (this=0x7fb498687618) at /libreoffice/sw/source/core/unocore/unoframe.cxx:3257 #2 0x00007fb4a0486ff9 in SwXTextFrame::CreateCursor (this=0x7fb498687618) at /libreoffice/sw/source/core/unocore/unoframe.cxx:3223 #3 0x00007fb4a05c041a in SwXText::getString (this=0x7fb498687658) at /libreoffice/sw/source/core/unocore/unotext.cxx:900 #4 0x00007fb4dc11b945 in XMLShapeExport::collectShapeAutoStyles (this=0x2e1fa90, xShape=...) at /libreoffice/xmloff/source/draw/shapeexport.cxx:307 #5 0x00007fb4dc34357c in XMLTextParagraphExport::exportAnyTextFrame (this=0x300e330, rTxtCntnt=..., eType=XMLTextParagraphExport::FrameType::Shape, bAutoStyles=true, bIsProgress=false, bExportContent=true, pRangePropSet=0x0) at /libreoffice/xmloff/source/text/txtparae.cxx:2803 #6 0x00007fb4dc34a5f7 in XMLTextParagraphExport::exportShape (this=0x300e330, rTextContent=..., bAutoStyles=true, pRangePropSet=0x0) at /libreoffice/include/xmloff/txtparae.hxx:638 #7 0x00007fb4dc33e053 in XMLTextParagraphExport::exportTextContentEnumeration (this=0x300e330, rContEnum=..., bAutoStyles=true, rBaseSection=..., bIsProgress=true, bExportParagraph=true, pRangePropSet=0x0, bExportLevels=true, eExtensionNS=TextPNS::ODF) at /libreoffice/xmloff/source/text/txtparae.cxx:1865 #8 0x00007fb4dc33f3b3 in XMLTextParagraphExport::exportParagraph (this=0x300e330, rTextContent=..., bAutoStyles=true, bIsProgress=true, bExportParagraph=true, rPropSetHelper=..., eExtensionNS=TextPNS::ODF) at /libreoffice/xmloff/source/text/txtparae.cxx:2133 #9 0x00007fb4dc33dd0a in XMLTextParagraphExport::exportTextContentEnumeration (this=0x300e330, rContEnum=..., bAutoStyles=true, rBaseSection=..., bIsProgress=true, bExportParagraph=true, pRangePropSet=0x0, bExportLevels=true, eExtensionNS=TextPNS::ODF) at /libreoffice/xmloff/source/text/txtparae.cxx:1818 #10 0x00007fb4dc33d4a4 in XMLTextParagraphExport::exportText (this=0x300e330, rText=..., bAutoStyles=true, bIsProgress=true, bExportParagraph=true, eExtensionNS=TextPNS::ODF) at /libreoffice/xmloff/source/text/txtparae.cxx:1690 #11 0x00007fb4dc10b02c in XMLTextParagraphExport::collectTextAutoStyles (this=0x300e330, rText=..., bIsProgress=true, bExportParagraph=true) at /libreoffice/include/xmloff/txtparae.hxx:509 #12 0x00007fb4dc2e4537 in XMLTextMasterPageExport::exportHeaderFooterContent (this=0x1e58a70, rText=..., bAutoStyles=true, bExportParagraph=true) at /libreoffice/xmloff/source/text/XMLTextMasterPageExport.cxx:68 #13 0x00007fb4dc2e498c in XMLTextMasterPageExport::exportMasterPageContent (this=0x1e58a70, rPropSet=..., bAutoStyles=true) at /libreoffice/xmloff/source/text/XMLTextMasterPageExport.cxx:112 #14 0x00007fb4dc228b9e in XMLPageExport::exportStyle (this=0x1e58a70, rStyle=..., bAutoStyles=true) at /libreoffice/xmloff/source/style/XMLPageExport.cxx:107 #15 0x00007fb4dc229ae5 in XMLPageExport::exportStyles (this=0x1e58a70, bUsed=false, bAutoStyles=true) at /libreoffice/xmloff/source/style/XMLPageExport.cxx:208 #16 0x00007fb4a0700b56 in XMLPageExport::collectAutoStyles (this=0x1e58a70, bUsed=false) at /libreoffice/include/xmloff/XMLPageExport.hxx:90 #17 0x00007fb4a07001f0 in SwXMLExport::ExportAutoStyles_ (this=0x7fb4acc2fe10) at /libreoffice/sw/source/filter/xml/xmlfmte.cxx:197 #18 0x00007fb4dc0a1c12 in SvXMLExport::ImplExportAutoStyles (this=0x7fb4acc2fe10) at /libreoffice/xmloff/source/core/xmlexp.cxx:1185 #19 0x00007fb4dc0a2d1c in SvXMLExport::exportDoc (this=0x7fb4acc2fe10, eClass=xmloff::token::XML_TEXT) at /libreoffice/xmloff/source/core/xmlexp.cxx:1442 #20 0x00007fb4a06f384a in SwXMLExport::exportDoc (this=0x7fb4acc2fe10, eClass=xmloff::token::XML_TEXT) at /libreoffice/sw/source/filter/xml/xmlexp.cxx:297 #21 0x00007fb4dc09fdd1 in SvXMLExport::filter (this=0x7fb4acc2fe10, aDescriptor=...) at /libreoffice/xmloff/source/core/xmlexp.cxx:841
# bad: [cf6ea17155fabb2a120ba07c150735591ac861d7] source-hash-3f94c9e9ddfd807b449f3bb9b232cf2041fa12d2 # good: [fc71ac001f16209654d15ef8c1c4018aa55769f5] source-hash-c15927f20d4727c3b8de68497b6949e72f9e6e9e git bisect start 'latest' 'oldest' # bad: [8cf60cc706948588e2f33a6d98b7c55d454e362a] source-hash-f340f0454627939f1830826fb5cc53a90e6c62a4 git bisect bad 8cf60cc706948588e2f33a6d98b7c55d454e362a # bad: [d9885f526fc7a09cc8f9f8ee643af1b966be24bb] source-hash-d1465c64c6f64ad8dd25e40cdc69649b24b305ea git bisect bad d9885f526fc7a09cc8f9f8ee643af1b966be24bb # good: [e3eab511ffbcd2e1e2c67e7a4fec162bb0b26b7a] source-hash-dc9cc46f3223aff3f85d3ce9696178a5f4d3d087 git bisect good e3eab511ffbcd2e1e2c67e7a4fec162bb0b26b7a # good: [1477f347fb61b5b07de64312247b49371812f5b4] source-hash-4598bbe41d0906a34ceb1126c7fce2108642cd8e git bisect good 1477f347fb61b5b07de64312247b49371812f5b4 # bad: [fdbfc593506d9f38152b80f14c9e7afdbef0b40a] source-hash-6024ddbfac8e62db50dd5352d610c87d279627de git bisect bad fdbfc593506d9f38152b80f14c9e7afdbef0b40a # bad: [a73a454c00b7d11b852a7b7998a83965ccfc668f] source-hash-87e23f425f60b0b7459c63b824bc8bdc17796ad2 git bisect bad a73a454c00b7d11b852a7b7998a83965ccfc668f # bad: [59af433fd1667f638e7ee61709e81a8eda47c472] source-hash-c4bf1f35405d3dcbd152e2e194d9e79946c0f471 git bisect bad 59af433fd1667f638e7ee61709e81a8eda47c472 # good: [bba613463d21864fec13d1810283622835a7d62a] source-hash-73e4a5d091de89064c931128da46a910cc139bc3 git bisect good bba613463d21864fec13d1810283622835a7d62a # good: [cb6b0a0fbd337840fac4000708db7f4d8d8386a5] source-hash-8e67a7796f598de2f11b694542bccb48343f0d9a git bisect good cb6b0a0fbd337840fac4000708db7f4d8d8386a5 # bad: [7912950540d49e1812f78c669dc9e5cf1e43a696] source-hash-b304628e4d50332be9a385857f7f16a441d5a1d3 git bisect bad 7912950540d49e1812f78c669dc9e5cf1e43a696 # skip: [e609507923bbde2bad9238718f2f0d3c79e9a4ff] source-hash-f53e88d14d182fb3af3787e8dac2126ac39551fa git bisect skip e609507923bbde2bad9238718f2f0d3c79e9a4ff # bad: [70eb65f92fc59e2cbcab9fc9f517c625a5f37ce2] source-hash-2ddcc1afb07e75ef388a200faeeacf833520a0d9 git bisect bad 70eb65f92fc59e2cbcab9fc9f517c625a5f37ce2 # bad: [2663845bb43b20665144b7e6f7920cc40b1b8ae8] source-hash-cd29db561357295f0e6e719088053e39fb404469 git bisect bad 2663845bb43b20665144b7e6f7920cc40b1b8ae8 # bad: [64c8b13f248fe7ea3808c7f8e62d0d656f170378] source-hash-d379d18666aa42031359ca8eb34b0021960347ae git bisect bad 64c8b13f248fe7ea3808c7f8e62d0d656f170378 # first bad commit: [64c8b13f248fe7ea3808c7f8e62d0d656f170378] source-hash-d379d18666aa42031359ca8eb34b0021960347ae
This regression has been introduced by the commit below, Miklos, can you please take a look? 64c8b13f248fe7ea3808c7f8e62d0d656f170378 is the first bad commit commit 64c8b13f248fe7ea3808c7f8e62d0d656f170378 Author: Matthew Francis <mjay.francis@gmail.com> Date: Sat Mar 14 21:42:08 2015 +0800 source-hash-d379d18666aa42031359ca8eb34b0021960347ae commit d379d18666aa42031359ca8eb34b0021960347ae Author: Miklos Vajna <vmiklos@collabora.co.uk> AuthorDate: Wed Jun 18 11:57:31 2014 +0200 Commit: Miklos Vajna <vmiklos@collabora.co.uk> CommitDate: Wed Jun 18 12:09:15 2014 +0200 oox: import WPS shape with text as shape with textbox This allows having real shapes (like having rounded corners) and complex content (like containing a table) at the same time. WPS shapes are wrappers around drawingML markup in DOCX files, so this only affects the DOCX import. Change-Id: Iad1c1c61233be1c17efa1821e680927aa9587215
Works for me with LibreOffice build from master commit 5e9982668224345f901631d664985e823530e05a. Could you please check if it's already fixed in daily builds?
I can check in a few days. In the meantime adding other reports related to this commit.
Reproducible with LO 5.2.2.1 (x64) under Window 10.
Indeed, the error during save is not there anymore in master build. I did a reverse bibisect, and the following commit fixed it: https://cgit.freedesktop.org/libreoffice/core/commit/?id=fb045517532aababc06fb4b1112def53b03d9144 crashtesting: assert on export of tdf99571-1.docx to docx Caolán, do you think it's safe to backport this commit to 5.2/5.1? Let's keep this report open until the underlying issue is resolved. Reducing importance, since the file can be saved now.
Yes, we can safely backport that. Set to fixed, cause fixed in master and backports in gerrit for review now
Reopend because still the error messagebox pops up when save as ODF. I confirmed that the error has disappeared when saved as Word format in my master build. but saving as ODF format still has the problem. >Error saving the document Especificacion- Requerimientos-v1: >Write Error. >Error in writing sub-document styles.xml. Ubuntu 16.04 x64
Darn, that's too bad. Still, good catch. There's also data loss when saving and reloading as DOCX. We might be onto something here, as others reported errors with the same error message recently, but we weren't able to reproduce them (see newly added bug reports in See Also field). Resetting importance to high/critical. Also removing regression-related keywords: while the file could be saved in 4.3, it didn't load properly back then, either, even upon first load.
Caolán McNamara committed a patch related to this issue. It has been pushed to "libreoffice-5-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=097f34e6411248856cfc78ffe80571aa2a876bff&h=libreoffice-5-2 Resolves: tdf#99273 can't save specific docx It will be available in 5.2.3. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://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-5-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=fa5830d02cec81921235357f4ed0372d104cf89e&h=libreoffice-5-1 Resolves: tdf#99273 can't save specific docx It will be available in 5.1.6. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Please open a new follow-up bugreport for the ODF save problem, the summary of this bug is clearly about not being able to "save", not "save as odf".
Follow-up reports bug 102466 and bug 102479 opened as requested.