[Libreoffice-commits] .: Branch 'libreoffice-3-4' - configmgr/source sfx2/source

Tor Lillqvist tml at kemper.freedesktop.org
Tue Apr 26 01:44:18 PDT 2011


 configmgr/source/components.cxx |    5 +++++
 configmgr/source/rootaccess.cxx |    9 +++++++++
 sfx2/source/appl/app.cxx        |    7 ++++++-
 3 files changed, 20 insertions(+), 1 deletion(-)

New commits:
commit 872e81297ed48b8991329d30d8ea347b2173eebc
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Thu Apr 21 11:26:34 2011 +0300

    Stopgap fixes for the crash on exit, fdo#36301
    
    Hacks just intended as debugging aids, suggested by caolan. But as
    this does prevent the crash, I removed the debugging printfs and
    assertions, and commit as we don't have any proper fix anyway.

diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index 108e08f..e20ddad 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -510,12 +510,16 @@ css::beans::Optional< css::uno::Any > Components::getExternalValue(
     return value;
 }
 
+int tempHACK = 0;
+
 Components::Components(
     css::uno::Reference< css::uno::XComponentContext > const & context):
     context_(context)
 {
     lock_ = lock();
 
+    tempHACK = 1;
+
     OSL_ASSERT(context.is());
     RTL_LOGFILE_TRACE_AUTHOR("configmgr", "sb", "begin parsing");
     parseXcsXcuLayer(
@@ -594,6 +598,7 @@ Components::Components(
 Components::~Components()
 {
     flushModifications();
+    tempHACK = 0;
 }
 
 void Components::parseFileLeniently(
diff --git a/configmgr/source/rootaccess.cxx b/configmgr/source/rootaccess.cxx
index ef5982e..90e5675 100644
--- a/configmgr/source/rootaccess.cxx
+++ b/configmgr/source/rootaccess.cxx
@@ -284,6 +284,8 @@ void RootAccess::removeChangesListener(
     }
 }
 
+extern int tempHACK;
+
 void RootAccess::commitChanges()
     throw (css::lang::WrappedTargetException, css::uno::RuntimeException)
 {
@@ -291,6 +293,13 @@ void RootAccess::commitChanges()
     Broadcaster bc;
     {
         osl::MutexGuard g(*lock_);
+
+        // OSL_ENSURE(tempHACK, "fucktastic!, seriously busted lifecycles\n");
+        if (!tempHACK)
+        {
+            return;
+        }
+
         checkLocalizedPropertyAccess();
         int finalizedLayer;
         Modifications globalMods;
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index 4f7a7bd..1d167b6 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -153,6 +153,7 @@ using namespace ::com::sun::star;
 // Static member
 SfxApplication* SfxApplication::pApp = NULL;
 static BasicDLL*       pBasic   = NULL;
+static SfxHelp*        pSfxHelp = NULL;
 
 class SfxPropertyHandler : public PropertyHandler
 {
@@ -305,7 +306,6 @@ SfxApplication* SfxApplication::GetOrCreate()
         ::framework::SetIsDockingWindowVisible( IsDockingWindowVisible );
         ::framework::SetActivateToolPanel( &SfxViewFrame::ActivateToolPanel );
 
-        SfxHelp* pSfxHelp = new SfxHelp;
         Application::SetHelp( pSfxHelp );
         if ( SvtHelpOptions().IsHelpTips() )
             Help::EnableQuickHelp();
@@ -352,6 +352,8 @@ SfxApplication::SfxApplication()
 #endif
 #endif
 
+    pSfxHelp = new SfxHelp;
+
     pBasic   = new BasicDLL;
     StarBASIC::SetGlobalErrorHdl( LINK( this, SfxApplication, GlobalBasicErrorHdl_Impl ) );
     RTL_LOGFILE_CONTEXT_TRACE( aLog, "} initialize DDE" );
@@ -365,6 +367,9 @@ SfxApplication::~SfxApplication()
 
     SfxModule::DestroyModules_Impl();
 
+    delete pSfxHelp;
+    Application::SetHelp( NULL );
+
     // delete global options
     SvtViewOptions::ReleaseOptions();
     delete pBasic;


More information about the Libreoffice-commits mailing list