Issue 109183 - XComponentLoader: XModel as PropertyValue crashes the office
Summary: XComponentLoader: XModel as PropertyValue crashes the office
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: OOo 3.2 RC5
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 3.2.1
Assignee: michael.ruess
QA Contact: issues@framework
URL:
Keywords:
Depends on:
Blocks: 109046
  Show dependency tree
 
Reported: 2010-02-12 07:50 UTC by eberlein
Modified: 2010-05-19 13:18 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Document that allows to reproduce the problem. Klicking the button should have no effect ( no crash, no document closing and etc. ). (10.46 KB, application/vnd.oasis.opendocument.text)
2010-03-31 10:34 UTC, mikhail.voytenko
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description eberlein 2010-02-12 07:50:50 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!
Comment 1 eberlein 2010-02-12 07:58:41 UTC
set target according to:
http://api.openoffice.org/servlets/ReadMsg?list=dev&msgNo=22222
Comment 2 mikhail.voytenko 2010-02-12 09:07:31 UTC
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
Comment 3 Oliver Brinzing 2010-02-12 17:31:28 UTC
.
Comment 4 mikhail.voytenko 2010-03-19 09:44:10 UTC
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.
Comment 5 mikhail.voytenko 2010-03-19 10:36:06 UTC
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.
Comment 6 mikhail.voytenko 2010-03-31 10:32:22 UTC
mav->mru: Please verify the issue.
Comment 7 mikhail.voytenko 2010-03-31 10:34:32 UTC
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. ).
Comment 8 michael.ruess 2010-04-01 14:54:11 UTC
Verified fix in CWS sw321bf01.
Comment 9 michael.ruess 2010-05-19 13:18:13 UTC
Checked fix in DEV300m77.