[openoffice.org/f14/master] Resolves: rhbz#652695 release desktop in timeout

Caolan McNamara caolanm at fedoraproject.org
Fri Nov 26 10:27:20 UTC 2010


commit e085ea6029eeb484c16988a913527fa1cfbc7b9b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Nov 26 10:27:21 2010 +0000

    Resolves: rhbz#652695 release desktop in timeout

 0001-destroydesktop.in.timeout.patch |   51 ++++++++++++++++++++++++++++++++++
 openoffice.org.spec                  |    5 ++-
 2 files changed, 55 insertions(+), 1 deletions(-)
---
diff --git a/0001-destroydesktop.in.timeout.patch b/0001-destroydesktop.in.timeout.patch
new file mode 100644
index 0000000..7ae1a77
--- /dev/null
+++ b/0001-destroydesktop.in.timeout.patch
@@ -0,0 +1,51 @@
+@@ -, +, @@ 
+    fix crash in exiting via disabling lone quick-starter, terminate at idle
+--- a/sfx2/source/appl/shutdownicon.cxx	
++++ a/sfx2/source/appl/shutdownicon.cxx	
+@@ -182,6 +182,9 @@ bool ShutdownIcon::LoadModule( osl::Module **pModule,
+     return true;
+ }
+ 
++// These two timeouts are necessary to avoid there being
++// plugin frames still on the stack, after unloading that
++// code, causing a crash during disabling / termination.
+ class IdleUnloader : Timer
+ {
+     ::osl::Module *m_pModule;
+@@ -199,6 +202,22 @@ public:
+     }
+ };
+ 
++class IdleTerminate : Timer
++{
++    Reference< XDesktop > m_xDesktop;
++public:
++    IdleTerminate (Reference< XDesktop > xDesktop)
++    {
++        m_xDesktop = xDesktop;
++        Start();
++    }
++    virtual void Timeout()
++    {
++        m_xDesktop->terminate();
++        delete this;
++    }
++};
++
+ void ShutdownIcon::initSystray()
+ {
+     if (m_bInitialized)
+@@ -576,11 +595,8 @@ void ShutdownIcon::terminateDesktop()
+     if ( xSupplier.is() )
+     {
+         Reference< XIndexAccess > xTasks ( xSupplier->getFrames(), UNO_QUERY );
+-        if( xTasks.is() )
+-        {
+-            if( xTasks->getCount() < 1 )
+-                xDesktop->terminate();
+-        }
++        if( xTasks.is() && xTasks->getCount() < 1 )
++            new IdleTerminate( xDesktop );
+     }
+ 
+     // remove the instance pointer
diff --git a/openoffice.org.spec b/openoffice.org.spec
index 27bc7ff..0c1598b 100644
--- a/openoffice.org.spec
+++ b/openoffice.org.spec
@@ -143,6 +143,7 @@ Patch59: 0001-initial-commit-for-vba-blob-not-including-container_.patch
 Patch60: 0001-we-see-stacktraces-with-this-NULL-sometimes.patch
 Patch61: exit.quickstarter.when.deleted.patch
 Patch62: 0001-Resolves-rhbz-656191-Catch-bad-alloc-and-convert-to-.patch
+Patch63: 0001-destroydesktop.in.timeout.patch
 
 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
 %define instdir %{_libdir}
@@ -1702,6 +1703,7 @@ cp -p %{SOURCE5} external/unowinreg/unowinreg.dll
 %patch60 -p1 -b .0001-we-see-stacktraces-with-this-NULL-sometimes.patch
 %patch61 -p1 -b .exit.quickstarter.when.deleted.patch
 %patch62 -p1 -b .rhbz656191-Catch-bad-alloc-and-convert-to-.patch
+%patch63 -p1 -b .0001-destroydesktop.in.timeout.patch
 touch scripting/source/pyprov/delzip
 touch scripting/util/provider/beanshell/delzip
 touch scripting/util/provider/javascript/delzip
@@ -3896,8 +3898,9 @@ unopkg remove --shared org.openoffice.legacy.ScriptProviderForPython.zip > /dev/
 %endif
 
 %changelog
-* Thu Nov 26 2010 Caolán McNamara <caolanm at redhat.com>- 1:3.3.0-16.5
+* Fri Nov 26 2010 Caolán McNamara <caolanm at redhat.com>- 1:3.3.0-16.5
 - Resolves: rhbz#656191 catch bad_alloc when opening corrupt zips
+- Resolves: rhbz#652695 release desktop in timeout
 
 * Thu Nov 25 2010 Caolán McNamara <caolanm at redhat.com>- 1:3.3.0-16.4
 - Resolves: rhbz#610103 exit quickstarter when libs deleted


More information about the scm-commits mailing list