Bug 1352881

Summary: Undo crashes spreadsheet after trigger macro
Product: [Fedora] Fedora Reporter: David Woodhouse <dwmw2>
Component: libreofficeAssignee: -RETIRED- <erack>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: caolanm, dtardon, erack, mstahl, sbergman
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libreoffice-5.1.4.2-6.fc24 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-19 15:53:40 UTC Type: Bug
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
test case none

Description David Woodhouse 2016-07-05 11:19:04 UTC
Created attachment 1176382 [details]
test case

Load attached (hopefully mostly anonymised) spreadsheet).

Make sure the AddListener macro has run. This installs a watch on cells S3 and X3 of Sheet3, and automatically ensures that cells T3 and Y3 respectively are set to equal them, by solving and inserting an appropriate "basic interest rate" in cells O9 and Q9 (resp.).

Change one of the payments into the child's account, on Sheet1. 

For example, change the initial payment to Child 1 on 2014-04-01 to £1000, and see the 'APR equivalent' at the top change to 5.369%

All works nicely.

Now hit Ctrl-Z and watch LibreOffice crash...

I also see these on stderr before the crash:

** (soffice:36159): WARNING **: Unknown event notification 36

** (soffice:36159): WARNING **: Unknown event notification 36

** (soffice:36159): WARNING **: Unknown event notification 36

** (soffice:36159): WARNING **: Unknown event notification 38

** (soffice:36159): WARNING **: Unknown event notification 36

** (soffice:36159): WARNING **: Unknown event notification 34

** (soffice:36159): WARNING **: Invalidate all children called

Comment 1 Caolan McNamara 2016-07-06 11:20:40 UTC
We have an attempt to store undo information during the basic callback which is called at the end of the toplevel undo from the user.

undobase.cxx:ScSimpleUndo::~ScSimpleUndo and do the above. The second call to the dtor is from the basic setValue, but this takes place in a callstack that traces all the way up to the ScSimpleUndo::EndUndo of the same object, so its deleted why still "undoing"

Comment 2 Caolan McNamara 2016-07-06 11:30:40 UTC
This works for me https://gerrit.libreoffice.org/#/c/26980/

Comment 3 Caolan McNamara 2016-07-08 14:12:01 UTC
pass this over to erack to see if the above fix is acceptable

Comment 4 -RETIRED- 2016-07-08 20:46:08 UTC
Pushed to upstream master and just waiting for 5-2 Jenkins.

Comment 5 Fedora Update System 2016-07-18 15:21:50 UTC
libreoffice-5.1.4.2-6.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-cb25df449f