From 3a9e1e71d9a28b2c6bc96757e629b231d2276d9d Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 14 Dec 2012 21:46:49 +0100 Subject: Do not defer ~XMLRedlineImportHelper activity to ~SwXMLImport At least with one Clang build, executing sw_unoapi test aborts at shutdown of soffice.bin with 20 __cxxabiv1::__cxa_call_unexpected 21 XMLRedlineImportHelper::~XMLRedlineImportHelper 22 XMLRedlineImportHelper::~XMLRedlineImportHelper 23 SwXMLTextImportHelper::~SwXMLTextImportHelper 24 SwXMLTextImportHelper::~SwXMLTextImportHelper 25 UniRefBase::release 26 UniReference::~UniReference 27 UniReference::~UniReference 28 SvXMLImport::~SvXMLImport 29 SwXMLImport::~SwXMLImport 30 SwXMLImport::~SwXMLImport 31 cppu::OWeakObject::release [...] 79 binaryurp::Bridge::dispose [...] 98 desktop::Desktop::DeregisterServices 99 desktop::Desktop::doShutdown 100 desktop::Desktop::Main due to ~XMLRedlineImportHelper calling setPropertyValue on an SwXTextDocument that is !IsValid() and thus throws a RuntimeException. SwXMLImport::endOocument already contains ClearShapeImport with a comment that indicates it is necessary for a similar reason, so add a ClearTextImport that ensures any ~XMLRedlineImportHelper activity is done before the SwXTextDocument becomes invalid, and not only at shutdown of the remote bridge that still holds a (Java) reference to SwXMLImport. Change-Id: I9891879c91bfea79fa9e22691be1826f61fdd70a --- sw/source/filter/xml/xmlimp.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'sw') diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 8e79e986430e..240439e2fe96 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -936,6 +936,7 @@ void SwXMLImport::endDocument( void ) // delegate to parent: takes care of error handling SvXMLImport::endDocument(); + ClearTextImport(); } -- cgit