Apache OpenOffice (AOO) Bugzilla – Issue 109183
XComponentLoader: XModel as PropertyValue crashes the office
Last modified: 2010-05-19 13:18:13 UTC
To reproduce: XModel xModel = (XModel) xTextDocument; XComponentLoader xComponentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class,xDesktop); PropertyValue[] props = new PropertyValue[2]; props[0] = new PropertyValue(); props[0].Name = "Model"; props[0].Value = xModel; props[1] = new PropertyValue(); props[1].Name = "Hidden"; props[1].Value = true; xComponentLoader.loadComponentFromURL("private:factory/swriter", "_blank", 0, props); In OpenOffice 3.2 this crashes the office (resp. the doc vanishes in the haze) I get a com.sun.star.lang.DisposedException: TransactionManager... Owner instance already closed. Call was rejected!
set target according to: http://api.openoffice.org/servlets/ReadMsg?list=dev&msgNo=22222
The example here is not quite correct, the URL in this case should be "private:object", it has worked till now by luck. Moreover, this feature was designed as an internal API to be used only on existing, empty frame object. In other words, the xComponentLoader should be an empty frame, and the target should be "_self". But since the API is now used outside, and has worked by luck, it should probably indeed be fixed as a showstopper for OOo3.2.1
.
Actually there is no crash at all. The document, which model is provided in the MediaDescriptor is just closed. If it is the last document, the whole office is closed as it normally happens. But it looks wrong, that the loading process tries to make the frame free, although "_blank" is provided as the target frame. Changing the priority, since this is no crash.
The problem was the handling of the hidden view of the document in this scenario. The hidden view should not control OwnerLock of the document shell. Fixed in cws sw321bf01.
mav->mru: Please verify the issue.
Created attachment 68663 [details] Document that allows to reproduce the problem. Klicking the button should have no effect ( no crash, no document closing and etc. ).
Verified fix in CWS sw321bf01.
Checked fix in DEV300m77.