Martin Gallwey wrote:
Hi Mathias,
Is there a work around or do I re-write my filter in C++ ?
I don't know. Before giving a judgement on that we should find out what
your problem is. :-)
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.
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?
It seems that there is also an issue in how the jni_uno bridge recovers
from the jni_uno::BridgeRuntimeError, it should recover more gracefully
than with heap corruption. I will attempt to reduce the test case to
reproduce this.
Not sure whether the JNI--UNO bridge itself has any problems here. It
passes its internal BridgeRuntimeError to Java as a
com.sun.star.uno.RuntimeException
(Java_com_sun_star_bridges_jni_1uno_JNI_1proxy_dispatch_1call in
jni_java2uno.cxx). Would be interesting to see what exactly causes the
reported "heap corruption," so a reduced test case would be great.
Does this seem like a workable theory?
Yes, sounds like you found the problem. :)
Thanks,
Martin
-Stephan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]