Apache OpenOffice (AOO) Bugzilla – Issue 119953
[From Symphony]Undo redo insert file cause application crashed
Last modified: 2012-10-09 09:37:33 UTC
Created attachment 78247 [details] sample Build: AOO3.4 Steps: 1. New a text document 2. From menu "Insert->File" 3. Select sample file to insert 4. Undo/Redo Defect: Application crashed.
I will take over this bug.
Created attachment 78473 [details] patch for bug 119953
Root Cause: In the procedure of inserting file, a text node split and a text node join action did not have corresponding undo recorded. Resolution: Add said undo action if necessary.
taking over for reviewing patch
Performing the steps to reproduce the crash does not result in a crash. But, I am recognizing that after the step 4 one empty paragraph is missing. Performing another Undo after step 4 results in a crash. Yan Ji and/or Chen Peng: Can you confirm my observation?
I have done some further tests: (A) If the sample document is not inserted at the very first and empty paragraph, very thing works fine. (B) If I convert the sample document (it is a Microsoft Word document in binary file format) to an ODF text document and use this ODF text document, I can _not_ reproduce the crash. I also recognized in this scenario that it differs. In general the file is inserted on a new page. This is not the case with the sample document, when it is inserted while the cursor is in the first empty paragraph. Yan Ji and/or Chen Peng: Can you confirm my observation? Thus, I think the problem can be also solved to make the "file insert" action consistent.
Created attachment 78586 [details] alternative patch which also improves the consistency of "Insert - File" function Comparing what happen regarding text node splits on inserting Microsoft Word document and ODF text documents I have found a simpler solution for this crash. This solution will also assure better consistency of the "Insert - File" function.
Comment on attachment 78473 [details] patch for bug 119953 review done - marking with '-' in favor of alternative patch
(In reply to comment #5) > Performing the steps to reproduce the crash does not result in a crash. But, > I am recognizing that after the step 4 one empty paragraph is missing. > Performing another Undo after step 4 results in a crash. Yes, I can confirm, a paragraph is missing, and in Step 4, it should be undo-redo-undo to reproduce this crach Yan Ji and/or Chen > Peng: Can you confirm my observation?
(In reply to comment #6) > I have done some further tests: (A) If the sample document is not inserted > at the very first and empty paragraph, very thing works fine. When I perform the undo/redo several times, AOO will be freezed. (B) If I > convert the sample document (it is a Microsoft Word document in binary file > format) to an ODF text document and use this ODF text document, I can _not_ > reproduce the crash. I also recognized in this scenario that it differs. In > general the file is inserted on a new page. This is not the case with the > sample document, when it is inserted while the cursor is in the first empty > paragraph. Yes, I agree with you. Yan Ji and/or Chen Peng: Can you confirm my observation? Thus, > I think the problem can be also solved to make the "file insert" action > consistent.
"af" committed SVN revision 1359246: #i119953# Fixed crash on File->Insert.
Comment on attachment 78586 [details] alternative patch which also improves the consistency of "Insert - File" function Review OK.
Setting status to fixed.
verified on the AOO3.5
set Target Milestone to AOO 3.5.0 for PM purpose.