Bug 47589 - Crash when leaving Function Wizard with Escape or OK
Summary: Crash when leaving Function Wizard with Escape or OK
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected)
Master old -3.6
Hardware: Other Linux (All)
: medium critical
Assignee: Markus Mohrhard
Whiteboard: target:3.6.0
Depends on:
Reported: 2012-03-20 08:19 UTC by Cor Nouws
Modified: 2012-04-11 00:50 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:

bt with symbols on master (10.60 KB, text/plain)
2012-03-20 14:31 UTC, Julien Nabet

Note You need to log in before you can comment on or make changes to this bug.
Description Cor Nouws 2012-03-20 08:19:47 UTC
Start spreadsheet
 > Crash

LibreOffice 36daily120318 3.6.0alpha0+ 
Build ID: 49d7d4b-985da32-e67b1bf-879ce36-638d9c
Comment 1 Julien Nabet 2012-03-20 14:31:33 UTC
Created attachment 58784 [details]
bt with symbols on master

I reproduced this pb on master (pc Debian x86-64).
Attached the bt with symbols.
Comment 2 Markus Mohrhard 2012-03-20 19:33:55 UTC
I finally understand why it crashes but it is much more complex to fix this.

The code has been wrong for a long time and only worked by luck. We are calling a virtual function at an object that is already in thee destructor. This has been so for a long time but only crashes after Stephan's recent commit to include protected virtual destructors.

I need to think about a way to solve this problem.
Comment 3 Stephan Bergmann 2012-03-21 08:51:55 UTC
<http://cgit.freedesktop.org/libreoffice/core/commit/?id=706ac4779de1870cf0d922f1cc3f6d4470392403> "Make sure one base class does not use another one after destruction" should fix the immediate problem (though, as discussed in private, the whole thing looks rather fragile and could benefit from clean up).
Comment 4 Not Assigned 2012-03-21 16:27:53 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":


prevent call to virtual method in destructor, fdo#47589
Comment 5 Markus Mohrhard 2012-03-21 16:32:23 UTC
Stephan's commit already fixed the crash and I now fixed the problem with the virtual function call in the destructor.

There was a similar problem with the report designer formula window that has been fixed too now.

The calc code does still need a lot of love in this area. We should try to get rid of ScAnyRefDlg and all the lifetime problems around it. We are still deleting ScFormulaDlg and ScFormulaReferenceHelper while we are using them.
Comment 6 Cor Nouws 2012-04-11 00:50:56 UTC
checked in master from 2012-04-04
OK - thanks!