Bug 663724

Summary: [abrt] paste and undo around comments (SIGSEGV)
Product: [Fedora] Fedora Reporter: Trevin Beattie <tbeattie>
Component: openoffice.orgAssignee: Caolan McNamara <caolanm>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: caolanm
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: i686   
OS: Unspecified   
Whiteboard: abrt_hash:1f5f451f6f97d403999ba1a6b8133673c4b6e77b
Fixed In Version: openoffice.org-3.3.0-19.2.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-19 21:01:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
backtrace
none
Microsoft Office Excel-formatted spreadsheet
none
backtrace none

Description Trevin Beattie 2010-12-16 16:52:34 UTC
abrt version: 1.1.13
architecture: i686
Attached file: backtrace
cmdline: /usr/lib/openoffice.org3/program/swriter.bin -writer
component: openoffice.org
executable: /usr/lib/openoffice.org3/program/swriter.bin
kernel: 2.6.32.26-175.fc12.i686.PAE
package: openoffice.org-writer-1:3.1.1-19.34.fc12
rating: 4
reason: Process /usr/lib/openoffice.org3/program/swriter.bin was killed by signal 11 (SIGSEGV)
release: Fedora release 12 (Constantine)
time: 1292517937
uid: 2045

How to reproduce
-----
1. Accidentally pasted text intended for a note into a cell
2. Added a note (different cell)
3. Pasted text into the note
4. Moved and resized the note
5. On closing the note, realized that the text pasted into a cell may have overwritten its previous contents
6. Undid all previous steps until the cell's former contents were restored
7. Noticed that the cell on which I had attached the note still had a note indicator
8. Right-clicked on the cell and attempted "Show Note"
9. Crash

Comment 1 Trevin Beattie 2010-12-16 16:52:35 UTC
Created attachment 469170 [details]
File: backtrace

Comment 2 Trevin Beattie 2010-12-16 17:04:01 UTC
After recovering from the crash and repeating my edits, I discovered that I had not actually done step 1.  When I pasted my clipboard text into the note (using the middle button on the mouse,) it simultaneously got pasted into the cell behind the note.

An immediate Undo removed the pasted text from the note, but not from the cell in which the text was duplicated.  I had to Undo a few more times to actually restore the cell's former text, but at that point the stability of OOoCalc was already suspect.

I undid my changes as far back as possible, but the cell on which I tried to attach the note still indicated a note attached.  Sure enough, attempting to show the note caused another crash.

Comment 3 Trevin Beattie 2010-12-16 17:09:57 UTC
Created attachment 469177 [details]
backtrace

Comment 4 Caolan McNamara 2010-12-17 20:41:00 UTC
F-12 isn't supported anymore, its not possible to submit updated packages for it anymore, so can't be fixed there anyway.

F-14 has OpenOffice.org 3.3. Hopefully its fixed in the supported versions, which isn't guaranteed of course, but I hope so :-)

Comment 5 Trevin Beattie 2010-12-17 21:04:47 UTC
Easily reproducible on openoffice.org-calc-3.3.0-17.2.fc14.i686.  I'll attach a document you can play with and another crash dump.

Comment 6 Trevin Beattie 2010-12-17 21:07:20 UTC
Created attachment 469445 [details]
Microsoft Office Excel-formatted spreadsheet

This is the document I used to reproduce the pasting & undo bugs followed by the "show note" crash.

Comment 7 Trevin Beattie 2010-12-17 22:17:27 UTC
*** Bug 664069 has been marked as a duplicate of this bug. ***

Comment 8 Caolan McNamara 2010-12-18 12:34:21 UTC
Well firstly if this .xls is opened in an older version is suffers from bug 636521 where immediately after opening there is the possibility to do an "undo" which crashes calc. That's fixed in 3.3.0-17.2.fc14. So how exactly do you get this one to crash in 3.3.0-17.2.fc14 ?

I opened the doc, confirmed that "undo" is unavailable as it should be. Went to a cell, insert note, pasted some text into the note. Dragged it about a bit, undoed all the way. For me the note indicator disappeared as expected.

Comment 9 Trevin Beattie 2010-12-20 17:24:36 UTC
1. Start OOo Calc
2. Open the .xls spreadsheet
3. Start the gedit text editor
4. In gedit, enter "This is a test note."
5. In scalc, right-click on cell K19 (as an example)
6. Choose "Insert Comment"
7. Go back to gedit and drag the mouse over the text to highlight it
8. Click the middle mouse button on the comment box in scalc, where it overlaps cell M17, to paste the selected text

At this point you should see "This is a test note" in the comment box, and the word "This" in white just to the left of the comment box.

9. Click on cell K19

This automatically hides the comment, exposing the rest of the text "This is a test note" in cell M17 (spanning from the end of K17 to the start of O17.)

10. Click on the Edit menu

The first entry reads: "Undo: Edit Comment"

11. Click on Undo
12. Click on the Edit menu

The first entry reads: "Undo: Insert"

13. Click on Undo

The text in cell M17 disappears.  The comment indicator in cell K19 is still present.

14. Click on the Edit menu

The first entry "Undo: Insert" is grayed out; no further undo is possible.

15. Close the Edit menu
16. Right-click on cell K19

The fourth section of the pop-up menu shows "Insert Comment", "Delete Comment", and "Show Comment".

17. Click on Show Comment
18. Wait for it ...

15-20 second later, scalc disappears and abrt reports a crash.

Comment 10 Trevin Beattie 2010-12-20 17:40:00 UTC
Created attachment 469822 [details]
backtrace

Comment 11 Caolan McNamara 2010-12-21 13:10:16 UTC
Excellent, reproducible, thanks for this :-)

It matters greatly the exact type of paste.

Comment 12 Caolan McNamara 2010-12-22 13:03:30 UTC
Fix checked in, will be ok (I hope) in >= 3.3.0-18.3

Comment 13 Fedora Update System 2011-01-09 13:59:46 UTC
openoffice.org-3.3.0-19.1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/openoffice.org-3.3.0-19.1.fc14

Comment 14 Fedora Update System 2011-01-09 21:00:56 UTC
openoffice.org-3.3.0-19.1.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update openoffice.org'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/openoffice.org-3.3.0-19.1.fc14

Comment 15 Trevin Beattie 2011-01-10 18:15:09 UTC
Mouse-pasting notes works beautifully as expected in this new build.  Thanks.

Comment 16 Fedora Update System 2011-01-12 18:54:38 UTC
openoffice.org-3.3.0-19.2.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/openoffice.org-3.3.0-19.2.fc14

Comment 17 Fedora Update System 2011-01-19 21:01:26 UTC
openoffice.org-3.3.0-19.2.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.