Martin Gallwey wrote:
> In the second stack I sent yesterday, for the finalizer thread, the top
> of the stack is:
>
> sw680mi.dll!SwXTextDocument::setPropertyValue(const rtl::OUString &
> rPropertyName={...}, const com::sun::star::uno::Any & aValue={...})
> Line 1944 + 0x27 C++
>
> Which is:
>
> void SwXTextDocument::setPropertyValue(const OUString& rPropertyName,
> const Any& aValue)
> throw( UnknownPropertyException, PropertyVetoException,
> IllegalArgumentException,
> WrappedTargetException,
> RuntimeException)
> {
> ::vos::OGuard aGuard(Application::GetSolarMutex());
>
> Ie, it is blocked waiting for the SolarMutex. The dispatch thread locked
> the SolarMutex long ago at SwXMLExport::exportDoc. So, essentially the
> JVM garbage collection can't complete until the SwXMLExport::exportDoc
> returns, which explains why it runs out of memory (causing
> java.lang.OutOfMemoryError -> jni_uno::BridgeRuntimeError -> heap
> corruption)- there is no garbage collection going on.
But why does that method not return? The waiting Finalizer thread alone
shouldn't be a problem because it isn't guaranteed even to work at any
particular time, so it can't also be a problem when it finishes.
> It would seem to me that locking the SolarMutex in the destructor of
> XMLRedlineImportHelper is the cause of this problem - maybe we can find
> a different solution for that doesn't involve setting properties back to
> SwXTextDocument?
The destruction of the object *must* be guarded by the SolarMutex or
otherwise you would run into the problem Kay mentioned (possibility of
crashes because of race conditions). So we have to keep it (moreover: we
miss it on several other places as K&K showed in their report!).
Do I understand correctly that you think that the blocked finalizer
thread leads to an out of memory condition? Then in my understanding
there is no hope because whatever solution we choose the garbage
collection never will happen while any other API call is processed
inside the OOo process.
@Kay: Is that correct?
Best regards,
Mathias
--
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]