Problem description: Cannot save a particular untitled document containing comments in LibreOffice 4. $ cat /opt/libreoffice4.0/program/versionrc [Version] AllLanguages=en-US BuildVersion= buildid=7545bee9c2a0782548772a21bc84a9dcc583b89 ExtensionUpdateURL=http://updateexte.libreoffice.org/ExtensionUpdateService/check.Update ProductBuildid=103 ProductMajor=400 ProductMinor=0 ProductSource=OOO400 ReferenceOOoMajorMinor=3.4 UpdateID=LibreOffice_4_en-US UpdateURL=http://update.libreoffice.org/check.php?pkgfmt=deb UpdateUserAgent=<PRODUCT> (${buildid}; ${_OS}; ${_ARCH}; BundledLanguages=${AllLanguages}) Vendor=The Document Foundation Steps to reproduce: 1. File -> New -> Text Document 2. Go to http://en.wikipedia.org/wiki/Valentine%27s_Day 3. Copy the text from Saint Valentine's Day, commonly known as Valentine's Day,[1]... to ... the latter date in honor of Hieromartyr Valentine, the Bishop of Interamna (modern Terni).[9][10] 4. In Writer -> Paste 5. Select Saint Valentine's Day -> Insert -> Comment 6. Type Use pink perhaps 7. Select pink -> Right-click pink -> Bold 8. Select the text St. Valentine's Day 9. Insert -> Comment 10. Type Use red perhaps 11. Select red -> Right-click red -> Bold 12. Select the text St. Valentine's Day 13. -> Font Color -> Light red 14. Select the text Saint Valentine's Day 15. -> Font Color -> Light magenta 16. Go to the first comment 17. -> Drop-Down Arrow -> Delete Comment 18. File -> Save as -> Save 19. The following error is shown: Error saving the document Untitle2: Write Error. Error in writing sub-document content.xml. The video is here: http://youtu.be/9ImnaTY65gA Current behavior: Same as Problem description. Expected behavior: Can save the particular untitled document containing comments in LibreOffice 4. Regards, C. H. D.
This is really strange, it was reproducible once for me, but now I can't get it to happen again. I've tried at least a half dozen times.... Another QA member had the same experience :-/. Will play around with it a bit more but: @Reporter - did it happen more than once for you? I even tried deleting my profile and starting from scratch and that didn't do it
See the video: http://youtu.be/_XotQrTvGJM The file does not have to be an untitled file. The file can be a saved file. Later, add more comments in a random manner to see the effect. It seems that this is a case. Delete one of the comments afterwards.
Adding writer experts to try to figure out how to reproduce this consistently. I was clearly able to one time and after that....can no longer. Very strange. @pros - any ideas on this one? Very serious, I just can't reproduce it consistently enough to mark as NEW. Joren had a similar experience
I have reliably reproduced the issue four times by following the steps below: 1 aaa bbb xxx 3 aaa bbb xxx xxx 4 aaa bbb xxx ddd eee xxx 2 aaa bbb xxx xxx xxx 1. Copy the above lines -> In LibreOffice Writer -> Paste 2. Select aaa bbb (line numbered 1) -> Insert -> Comment -> Type 1 3. Select aaa bbb (line numbered 2) -> Insert -> Comment -> Type 2 4. Select aaa bbb (line numbered 3) -> Insert -> Comment -> Type 3 5. Select aaa bbb (line numbered 4) -> Insert -> Comment -> Type 4 6. Select ddd eee (line numbered 4) -> Insert -> Comment -> Type 4 again 7. Select the Drop-Down Arrow in comment with 4 (not 4 again) 8. Delete Comment 9. Save 10. Error Error saving the document whatever: Write Error. Error in writing sub-document content.xml.
Interestingly I can't reproduce the failure to write on Linux; but I do get some corruption - seemingly deleting the first "4" comment makes the "4 again" comment not a range based comment, but a point comment at the end. ie. a save + restore doesn't restore this to where it should be. I guess this is another case of mis-managing the field-marks underlying the code ? webofht - do you have a debug symbols build you could run valgrind in to see if there is some memory corruption there ? Miklos you did a few fixes in this area recently; any thoughts ? :-)
(In reply to comment #5) > Interestingly I can't reproduce the failure to write on Linux; but I do get > some corruption - seemingly deleting the first "4" comment makes the "4 > again" comment not a range based comment, but a point comment at the end. Please watch the video to see if the steps are correct: http://youtu.be/sIZJMoUXXUk
Yes, I can reproduce this bug, following the steps from comment 4.
Created attachment 74866 [details] test doc Open the attached file, delete comment "4", then xmloff fails to save the file.
Miklos - can we assign you to this one?
Yes, I just did so.
Miklos Vajna committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=f6a02947896e19160c137032a7fc2e56277656af fdo#60710 SwXTextPortionEnumeration: filter out fields from the undo stack 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.
Erm, just to correct comment 8, you need to delete "4 again" to trigger the issue.
-4-0 review: https://gerrit.libreoffice.org/2231
Miklos Vajna committed a patch related to this issue. It has been pushed to "libreoffice-4-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=3d9911a925607ed58002c6c9488507bd5a818975&h=libreoffice-4-0 fdo#60710 SwXTextPortionEnumeration: filter out fields from the undo stack It will be available in LibreOffice 4.0.1. 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.
Confirm that this issue is fixed in LibreOffice Version: 4.2.0.4 (Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71).