diff options
author | Tor Lillqvist <tlillqvist@novell.com> | 2011-04-21 11:26:34 +0300 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@novell.com> | 2011-04-26 11:42:24 +0300 |
commit | 872e81297ed48b8991329d30d8ea347b2173eebc (patch) | |
tree | c0a4df6a4d1ef93a5373764d75a03e5d6779491d | |
parent | 021a906cb52757f2804576af59dab5b6df2a9aa2 (diff) |
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.
-rw-r--r-- | configmgr/source/components.cxx | 5 | ||||
-rw-r--r-- | configmgr/source/rootaccess.cxx | 9 | ||||
-rw-r--r-- | sfx2/source/appl/app.cxx | 7 |
3 files changed, 20 insertions, 1 deletions
diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx index 108e08fa7a..e20ddad2eb 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 ef5982e3a5..90e5675b35 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 4f7a7bdbcd..1d167b6833 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; |