Apache OpenOffice (AOO) Bugzilla – Issue 41870
Crash when loading impress doc after opening new impress
Last modified: 2005-02-07 15:42:13 UTC
This is a beta showstopper. Open a new impress. Then load an existing impress doc: Office crashes. This was ok in m74.
As a result of DrawController::dispose() forwarding its call to SfxBaseController::dispose() the side panes are closed and finally the ViewShellBase destructor is called. Closing the side panes results in the PaneManager removing the associated shells from the stack. Since this is a stack we first remove the shells above those belonging to the side pane and after all is done we add them again. This adding causes the crash since it is done at a time when this is not allowed anymore. The solution will be to remove all sd shells from the shell steck when the DrawController is disposed.
Fixed by calling PangeManager::Shutdown(true) and ViewShellManager::Shutdown() from DrawController::dispose(). The first, PangeManager::Shutdown(true), tells the pane manager to forget about view shells and windows. Without the (new) flag set to true it would close the docking windows and shut down the shells. This call to Shutdown() is necessary in order for following calls to the PaneManager, e.g. caused by the SFX closing the docking windows, not accessing the (then destroyed) shells anymore. The second, ViewShellManager::Shutdown(), simply takes all sd shells from the shell stack. It has been modified to call DrawDocShell::Disconnect() for every view shell so that the doc shell in its destructor will not access the main view shell which by then is destroyed. The two calls to Shutdown() are made only when the DrawController has not been detached from its view shell. This indicates a switch from one view to another. Taking all shells from the stack would destroy the ViewShellBase also. But that would be an error. Affected files: PaneManager.hxx 1.5.86.1 PaneManager.cxx 1.11.10.1 DrawController.cxx 1.10.78.1 ViewShellManager.cxx 1.9.10.1 ViewTabBar.cxx 1.3.02.1
Reopening...
...reassigning...
...resolving.
Tested in CWS. Verified.
Tested in master. Closed.