On 24.02.2014 20:56, Steele, Raymond wrote:
Thanks for responding. How can I determine what called dispose()?

If you want to know who calls dispose() then you have to place a breakpoint in the dispose() method of xCalcComponent.

If you want to know when dispose() is called then register a com::sun::star::lang::XEventListener at the xCalcComponent object. When it is disposed, it will call disposing(...) at the listener. I am just not sure if it calls disposing() when the object is already disposed when the listener is registered. Probably not.

  This is working in version AOO 3.3. Has something changed?

Without knowing the context this can easily be a timing problem in a multi-threaded environment: in AOO 3.3 some operation took longer resulting in the dispose() call made a few milliseconds later (or anything to this effect.)

-Andre


-----Original Message-----
From: Andre Fischer [mailto:awf....@gmail.com]
Sent: Monday, February 24, 2014 3:54 AM
To: api@openoffice.apache.org
Subject: EXTERNAL: Re: DisposedException

On 21.02.2014 19:20, Steele, Raymond wrote:
While running my application using AOO 4.0.1 on Solaris 11,  a 
star.lang.DisposedException is thrown  inconsistently (sometimes it works) when 
I use UnoRuntime.queryInterface.

The line of code causing the issue:

XSpreadsheetDocument  document =
UnoRuntime.queryInterface(XSpreadsheetDocument.class, xCalcCompinent);
The DisposedException means that the throwing object has been marked by its 
owner for destruction in the near future.  Any access after that results in the 
DisposedException being thrown.

That means, that the line above is executed after xCalcCompinent has received a 
dispose() call.

-Andre

This works perfectly when I use AOO 3.3, but not since upgrading to 4.0.1.

Any help would be appreciated.

Thanks,
Raymond



---------------------------------------------------------------------
To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org
For additional commands, e-mail: api-h...@openoffice.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org
For additional commands, e-mail: api-h...@openoffice.apache.org

Reply via email to