Apache OpenOffice (AOO) Bugzilla – Issue 120095
openoffice crashes when the first time to exit quickstarter after it being enabled
Last modified: 2017-05-20 10:32:02 UTC
Created attachment 78484 [details] crash build: dev snapshot build: r1351960 platform: suse 11 By default the quichstarter is disabled after openoffice installed. 1. launch openoffice, Tools - Options... - OOo-Dev - Memory 2. check on "Enable systray Quickstarter", then the quickstarter icon will appear in the system tray 3. click File->Exit to close openoffice, now the quickstarter icon remains. 4. right-click on the quickstarter icon, click Exit Quickstarter openoffice crashes.. the screenshot attached. 5. re-launch openoffice, disable the quickstarter. close openoffice 6. repeat steps 1-4, the problem will reproduced The same issue in aoo 3.4
Does this happen on all platforms? If this is Linux specif, then adjust the fields.
I can not reproduce this crash under Windows 7. Under Windows 7 the behavior is a little bit different: after step 2 the system tray icon does not show up. Instead an restart of AOO is needed. Continuing after this restart with steps 3 and 4 does not produce a crash under Windows 7
This seems to be something Linux specific: Program received signal SIGSEGV, Segmentation fault. 0x00007ff9e92fe3aa in ?? () (gdb) bt #0 0x00007ff9e92fe3aa in ?? () #1 0x0000000000000001 in ?? () #2 0x0000003634a0f664 in g_closure_invoke () from /lib64/libgobject-2.0.so.0 #3 0x0000003634a206d8 in ?? () from /lib64/libgobject-2.0.so.0 #4 0x0000003634a2866d in g_signal_emit_valist () from /lib64/libgobject-2.0.so.0 #5 0x0000003634a287c2 in g_signal_emit () from /lib64/libgobject-2.0.so.0 #6 0x0000003b0d6805bc in gtk_widget_activate () from /lib64/libgtk-x11-2.0.so.0 #7 0x0000003b0d56457d in gtk_menu_shell_activate_item () from /lib64/libgtk-x11-2.0.so.0 #8 0x0000003b0d56497c in ?? () from /lib64/libgtk-x11-2.0.so.0 #9 0x0000003b0d54db1c in ?? () from /lib64/libgtk-x11-2.0.so.0 #10 0x0000003634a0f664 in g_closure_invoke () from /lib64/libgobject-2.0.so.0 #11 0x0000003634a20450 in ?? () from /lib64/libgobject-2.0.so.0 #12 0x0000003634a282a7 in g_signal_emit_valist () from /lib64/libgobject-2.0.so.0 #13 0x0000003634a287c2 in g_signal_emit () from /lib64/libgobject-2.0.so.0 #14 0x0000003b0d68156e in ?? () from /lib64/libgtk-x11-2.0.so.0 #15 0x0000003b0d54b8e4 in gtk_propagate_event () from /lib64/libgtk-x11-2.0.so.0 #16 0x0000003b0d54bc4b in gtk_main_do_event () from /lib64/libgtk-x11-2.0.so.0 #17 0x0000003b0c8616fc in ?? () from /lib64/libgdk-x11-2.0.so.0 #18 0x00000036306476e5 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0 #19 0x0000003630647a18 in ?? () from /lib64/libglib-2.0.so.0 #20 0x0000003630647ad4 in g_main_context_iteration () from /lib64/libglib-2.0.so.0 #21 0x00007ffa0eb30836 in ?? () from /opt/ooo-dev/basis3.4/program/libvclplug_gtk.so #22 0x00007ffa194b0dc9 in ?? () from /opt/ooo-dev3/program/../basis-link/program/libvcl.so #23 0x00007ffa194b049b in Application::Execute() () from /opt/ooo-dev3/program/../basis-link/program/libvcl.so #24 0x00007ffa1c8cf128 in ?? () from /opt/ooo-dev3/program/../basis-link/program/libsofficeapp.so #25 0x00007ffa194b41ac in ?? () from /opt/ooo-dev3/program/../basis-link/program/libvcl.so #26 0x00007ffa194b4323 in SVMain() () from /opt/ooo-dev3/program/../basis-link/program/libvcl.so #27 0x00007ffa1c8f660c in soffice_main () from /opt/ooo-dev3/program/../basis-link/program/libsofficeapp.so #28 0x000000000040102b in main () It looks like, due to the asynchronous nature of GUI stuff, gtk is still emitting signals, but our plugin has been unloaded. Just guessing, I'll have to install gtk debugging symbols.
Looking at the mercurial history (unfortunately lost in the svn repo), I've found: changeset: 264153:4a1dfa1dcc01 parent: 263867:a4be016d908d user: mmeeks date: Fri Oct 23 10:50:22 2009 +0000 files: sfx2/source/appl/shutdownicon.cxx description: Fix i#101245# Bug 101245 - sfx2: gtk quickstarter crashes on disable/exit That bug is back (or was never gone). It is reproducible in the two scenarios, by disabling or exiting the quickstarter when there is no application window opened: In void ShutdownIcon::terminateDesktop() http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sfx2/source/appl/shutdownicon.cxx?view=markup#l590 582 // terminate desktop only if no tasks exist 583 Reference< XFramesSupplier > xSupplier( xDesktop, UNO_QUERY ); 584 if ( xSupplier.is() ) 585 { 586 Reference< XIndexAccess > xTasks ( xSupplier->getFrames(), UNO_QUERY ); 587 if( xTasks.is() ) 588 { 589 if( xTasks->getCount() < 1 ) 590 xDesktop->terminate(); 591 } 592 } xDesktop->terminate() seems to be the culprit, it should be executed asynchronously, by posting a user event.
Created attachment 78490 [details] First attempt to solve the crash I only built it and tested on Linux. Please try on the other supported platforms.
I am volunteering to check the patch in my Windows environment.
set release blocker flag for 3.4.1
Committed in trunk under revision 1355915 Applied the attached patch with a few modifications to prevent a leak when posting the user event fails. ToDo: I took the idea of the asynchronous desktop termination from the way how UI elements' controllers call the dispatch (the scenario is almost the same as in this crash report, just search "Application::PostUserEvent" in svtools and framework), most code on these modules should fix the leak, see for example main/framework/source/uielement/recentfilesmenucontroller.cxx framework::RecentFilesMenuController::executeEntry( sal_Int32 nIndex ) if ( xDispatch.is() ) { // Call dispatch asychronously as we can be destroyed while dispatch is // executed. VCL is not able to survive this as it wants to call listeners // after select!!! LoadRecentFile* pLoadRecentFile = new LoadRecentFile; pLoadRecentFile->xDispatch = xDispatch; pLoadRecentFile->aTargetURL = aTargetURL; pLoadRecentFile->aArgSeq = aArgsList; if(::comphelper::UiEventsLogger::isEnabled()) //#i88653# UiEventLogHelper(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RecentFilesMenuController"))).log(m_xServiceManager, m_xFrame, aTargetURL, aArgsList); Application::PostUserEvent( STATIC_LINK(0, RecentFilesMenuController, ExecuteHdl_Impl), pLoadRecentFile ); } to fix the leak: if (!Application::PostUserEvent( STATIC_LINK(0, RecentFilesMenuController, ExecuteHdl_Impl), pLoadRecentFile )) delete pLoadRecentFile;
Trunk: revision 1355915 Branch AOO34: revision 1357624
There is no problem on Windows XP with AOO341 branch r1359641.
no problem on ubuntu 10.04 in build r1359641
no problem on suse 11 sp1 in build r1359641
set target milestone AOO 3.4.1