To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=66675
                 Issue #|66675
                 Summary|Accessing com.sun.star.document.StandaloneDocumentInfo
                        | crashes before initalisation
               Component|framework
                 Version|OOo 2.0.3
                Platform|All
                     URL|
              OS/Version|All
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P2
            Subcomponent|code
             Assigned to|as
             Reported by|ab





------- Additional comments from [EMAIL PROTECTED] Fri Jun 23 00:21:13 -0700 
2006 -------
This task describes a problem that originally was added to i59538,
but I think it has to be seperated.

Comment from i59538:

> ------- Additional comments from [EMAIL PROTECTED] Tue Jun 20 03:55:15 -0700
2006 -------
> There is another problem regarding the introspection of basic:
> The service com.sun.star.document.StandaloneDocumentInfo cant be used within 
> basic. Because this service needs another method called first
("loadFromURL()"). But 
> the introspection of basic tries to get some informations about the supported
property 
> set ... which isnt realy available before loadFromURL() was called. Because
the set of 
> properties cames from the document and is not fix.
> 
> BTW: createInstanceWithArguments doesnt help here ... because it calls 
> XInitializsation::initialize() only ... not loadFromURL() or any other method.
> 
> Example:
> 
> docinfo = createUnoService("com.sun.star.document.StandaloneDocumentInfo")
> => crash

The crash happens because Basic uses Introspection on the service
object and Introspection calls getPropertySetInfo. This crashes
because before initialisation using getPropertySetInfo somehow
accesses a NULL pointer. But the behaviour of Basic hasn't chan-
ged and the crash did not happen in src680 m167.

This problem cannot be solved in Basic even if the Introspection
is done later as in any case it has to be done before loadFromURL()
can be called in Basic. And even if this was possible the Office 
would still crash if a Basic programmer just calls another method
or if anyone else calls getPropertySetInfo() on this object. As 
also discussed with Stephan Bergmann accessing a supported inter-
face must never lead to a crash even before initialisation. Also
throwing a RuntimeException - as discussed with AS - looks criti-
cal for me as such behaviour shouldn't just be changed from one
minor version to the other. At least this would have to be coordi-
nated with changes in Introspection and Basic as otherwise proba-
bly also functionality would be lost that once worked.

The question if in Basic properties are missing because dynamic 
property sets are not supported correctly is a different one and 
still covered by i59538.

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to