Issue 122902 - footnote deletion causes crash
Summary: footnote deletion causes crash
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: editing (show other issues)
Version: 4.0.0
Hardware: All All
: P2 Major (vote)
Target Milestone: 4.0.1
Assignee: Oliver-Rainer Wittmann
QA Contact:
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2013-07-30 19:25 UTC by centurio9
Modified: 2017-05-20 10:33 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 4.0.0
Developer Difficulty: ---
jsc: 4.0.1_release_blocker+


Attachments
crash details (57.93 KB, image/jpeg)
2013-07-31 08:42 UTC, Edwin Sharp
no flags Details
crash stack (10.44 KB, text/plain)
2013-08-02 12:32 UTC, hdu@apache.org
no flags Details
patch to solve the crash (6.62 KB, patch)
2013-08-12 14:27 UTC, Oliver-Rainer Wittmann
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description centurio9 2013-07-30 19:25:49 UTC
When I attempted to remove a footnote, the whole program crashed. When I deleted the text in the footnote first and then the footnote it didn't crash. I should say that the document with wich it occured originally was created with an earlier version of the open office writer (3.2 I think)
Comment 1 Edwin Sharp 2013-07-31 05:40:19 UTC
Created document with footnote in 2.4.3.
Deleted footnote in Rev. 1507307 -> no crash.

Please attach document.
Comment 2 centurio9 2013-07-31 08:29:38 UTC
(In reply to Edwin Sharp from comment #1)
> Created document with footnote in 2.4.3.
> Deleted footnote in Rev. 1507307 -> no crash.
> 
> Please attach document.


I may have additional information: Before I've attempted to remove the footnote, I've used 'ctrl+c' to copy the content of the footnote in case if I change my mind about the deletion. And then I've deleted the little index-number to remove the footnote and thats when it crashed. I've tried it without copying the text in the footnote, and it removed the footnote without crashing. 

Try it like this, and if the problem won't occur Im gonna attach the document.
Comment 3 Edwin Sharp 2013-07-31 08:42:46 UTC
Created attachment 81213 [details]
crash details
Comment 4 Edwin Sharp 2013-07-31 08:43:07 UTC
Thank you.
Comment 5 Oliver-Rainer Wittmann 2013-08-02 07:27:47 UTC
I was no able to reproduce this defect.

Can someone provide a step-by-step instruction to reproduce the crash? Thx in advance.
Comment 6 centurio9 2013-08-02 08:05:28 UTC
(In reply to Oliver-Rainer Wittmann from comment #5)
> I was no able to reproduce this defect.
> 
> Can someone provide a step-by-step instruction to reproduce the crash? Thx
> in advance.

1. Create a document with open office writer 4.0.0.
2. Type some random word in, lets say 'Crash'
3. Attach a footnote to that word
4. Type some text in the footnote
5. Now highlight the text in the footnote
6. Press 'ctrl+c' 
7. Now go back to the word 'crash' and delete the footnote number with 'backspace'
8. It should crash at this point.
Comment 7 Edwin Sharp 2013-08-02 08:12:18 UTC
http://screencast.com/t/DWLyFNc4
Comment 8 Oliver-Rainer Wittmann 2013-08-02 08:51:20 UTC
Thanks for step-by-step instruction and the video.
Before it must be too early for me, when I tried to reproduce the crash ;-)

I can confirm the crash on Windows 7.
It is a regression - in AOO 3.4.1 it works fine.
Comment 9 hdu@apache.org 2013-08-02 12:32:14 UTC
Created attachment 81240 [details]
crash stack
Comment 10 hdu@apache.org 2013-08-02 12:40:02 UTC
Reproducible on other platforms too and the crash stack up to the MarkManager::deleteMark() frame looks like the stack in attachment 81237 [details] of bug 122922.
Comment 11 Oliver-Rainer Wittmann 2013-08-02 14:40:00 UTC
taking over for deeper investigation
Comment 12 Oliver-Rainer Wittmann 2013-08-12 14:21:59 UTC
root cause found:
- ::std::vector.earse(..) triggers a recursive call to the same ::std::vector.erase(..) by the deletion of the corresponding entry. Afterwards the crashed occurred inside stl.

note:
crash did not happen in stlport.

bug 122922 and bug 122992 have the same root cause.
Comment 13 Oliver-Rainer Wittmann 2013-08-12 14:27:15 UTC
Created attachment 81321 [details]
patch to solve the crash
Comment 14 jsc 2013-08-13 11:59:31 UTC
approve showstopper request
Comment 15 SVN Robot 2013-08-19 08:22:54 UTC
"orw" committed SVN revision 1515312 into trunk:
122902, 122922, 122992: - <MarkManager::deleteMark(..)> - assure that entry i...
Comment 16 SVN Robot 2013-08-19 08:43:07 UTC
"orw" committed SVN revision 1515317 into branches/AOO401:
122902, 122922, 122992: - <MarkManager::deleteMark(..)> - assure that entry i...
Comment 17 Oliver-Rainer Wittmann 2013-08-19 08:50:30 UTC
fixed on trunk and AOO401 branch
Comment 18 fanyuzhen 2013-08-30 14:39:43 UTC
It's verified fixed in build AOO401m1(Build:9710)  -  Rev. 1516414