summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-12-12 11:11:20 +0100
committerXisco FaulĂ­ <xiscofauli@libreoffice.org>2018-12-14 17:24:36 +0100
commitb60e88a90d0e3813b05cf7990190126438232040 (patch)
tree2b87bfa7309fd8a42a59b3a801c5eca73aaed54d /svtools
parentf1c47b9ea954342ecffc440784b43cc8cfd99f91 (diff)
tdf#122038: don't create another RestartDialog if already restarting
otherwise it crashes/aborts in Window::dispose() with this backtrace: ucrtbased.dll!issue_debug_notification(const wchar_t * const message) Line 28 at minkernel\crts\ucrt\src\appcrt\internal\report_runtime_error.cpp(28) ucrtbased.dll!__acrt_report_runtime_error(const wchar_t * message) Line 154 at minkernel\crts\ucrt\src\appcrt\internal\report_runtime_error.cpp(154) ucrtbased.dll!abort() Line 61 at minkernel\crts\ucrt\src\appcrt\startup\abort.cpp(61) vcllo.dll!SalAbort(const rtl::OUString & rErrorText, bool bDumpCore) Line 309 at c:\lo\src\core\vcl\source\app\salplug.cxx(309) vcllo.dll!Application::Abort(const rtl::OUString & rErrorText) Line 270 at c:\lo\src\core\vcl\source\app\svapp.cxx(270) vcllo.dll!vcl::Window::dispose() Line 275 at c:\lo\src\core\vcl\source\window\window.cxx(275) vcllo.dll!SystemWindow::dispose() Line 114 at c:\lo\src\core\vcl\source\window\syswin.cxx(114) vcllo.dll!Dialog::dispose() Line 647 at c:\lo\src\core\vcl\source\window\dialog.cxx(647) vcllo.dll!VclReferenceBase::disposeOnce() Line 43 at c:\lo\src\core\vcl\source\outdev\vclreferencebase.cxx(43) tklo.dll!VclPtr<vcl::Window>::disposeAndClear() Line 206 at c:\lo\src\core\include\vcl\vclptr.hxx(206) tklo.dll!UnoWrapper::WindowDestroyed(vcl::Window * pWindow) Line 294 at c:\lo\src\core\toolkit\source\helper\unowrapper.cxx(294) vcllo.dll!vcl::Window::dispose() Line 233 at c:\lo\src\core\vcl\source\window\window.cxx(233) vcllo.dll!SystemWindow::dispose() Line 114 at c:\lo\src\core\vcl\source\window\syswin.cxx(114) vcllo.dll!WorkWindow::dispose() Line 129 at c:\lo\src\core\vcl\source\window\wrkwin.cxx(129) vcllo.dll!VclReferenceBase::disposeOnce() Line 43 at c:\lo\src\core\vcl\source\outdev\vclreferencebase.cxx(43) tklo.dll!VclPtr<OutputDevice>::disposeAndClear() Line 206 at c:\lo\src\core\include\vcl\vclptr.hxx(206) tklo.dll!VCLXWindow::dispose() Line 947 at c:\lo\src\core\toolkit\source\awt\vclxwindow.cxx(947) fwklo.dll!`anonymous namespace'::XFrameImpl::disposing() Line 2184 at c:\lo\src\core\framework\source\services\frame.cxx(2184) cppuhelper3MSC.dll!cppu::WeakComponentImplHelperBase::dispose() Line 105 at c:\lo\src\core\cppuhelper\source\implbase.cxx(105) fwklo.dll!cppu::PartialWeakComponentImplHelper<com::sun::star::lang::XServiceInfo,com::sun::star::frame::XFrame2,com::sun::star::awt::XWindowListener,com::sun::star::awt::XTopWindowListener,com::sun::star::awt::XFocusListener,com::sun::star::document::XActionLockable,com::sun::star::util::XCloseable,com::sun::star::frame::XComponentLoader,com::sun::star::frame::XTitle,com::sun::star::frame::XTitleChangeBroadcaster,com::sun::star::beans::XPropertySet,com::sun::star::beans::XPropertySetInfo>::dispose() Line 90 at c:\lo\src\core\include\cppuhelper\compbase.hxx(90) fwklo.dll!`anonymous namespace'::XFrameImpl::close(unsigned char bDeliverOwnership) Line 1716 at c:\lo\src\core\framework\source\services\frame.cxx(1716) fwklo.dll!framework::Desktop::impl_closeFrames(bool bAllowUI) Line 1743 at c:\lo\src\core\framework\source\services\desktop.cxx(1743) fwklo.dll!framework::Desktop::terminate() Line 233 at c:\lo\src\core\framework\source\services\desktop.cxx(233) comphelper.dll!comphelper::OOfficeRestartManager::notify(const com::sun::star::uno::Any & __formal) Line 109 at c:\lo\src\core\comphelper\source\misc\officerestartmanager.cxx(109) tklo.dll!`anonymous namespace'::AsyncCallback::Notify_Impl(`anonymous-namespace'::AsyncCallback * __formal, void * p) Line 105 at c:\lo\src\core\toolkit\source\awt\asynccallback.cxx(105) tklo.dll!`anonymous namespace'::AsyncCallback::LinkStubNotify_Impl(void * instance, void * data) Line 97 at c:\lo\src\core\toolkit\source\awt\asynccallback.cxx(97) vcllo.dll!Link<void *,void>::Call(void * data) Line 84 at c:\lo\src\core\include\tools\link.hxx(84) vcllo.dll!ImplHandleUserEvent(ImplSVEvent * pSVEvent) Line 1935 at c:\lo\src\core\vcl\source\window\winproc.cxx(1935) vcllo.dll!ImplWindowFrameProc(vcl::Window * _pWindow, SalEvent nEvent, const void * pEvent) Line 2486 at c:\lo\src\core\vcl\source\window\winproc.cxx(2486) vcllo.dll!SalFrame::CallCallback(SalEvent nEvent, const void * pEvent) Line 285 at c:\lo\src\core\vcl\inc\salframe.hxx(285) vclplug_winlo.dll!ImplHandleUserEvent(HWND__ * hWnd, __int64 lParam) Line 4068 at c:\lo\src\core\vcl\win\window\salframe.cxx(4068) vclplug_winlo.dll!SalFrameWndProc(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam, bool & rDef) Line 5721 at c:\lo\src\core\vcl\win\window\salframe.cxx(5721) vclplug_winlo.dll!SalFrameWndProcW(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 5828 at c:\lo\src\core\vcl\win\window\salframe.cxx(5828) user32.dll!UserCallWinProcCheckWow() user32.dll!CallWindowProcW() opengl32.dll!wglWndProc() user32.dll!UserCallWinProcCheckWow() user32.dll!DispatchMessageWorker() vclplug_winlo.dll!ImplSalDispatchMessage(const tagMSG * pMsg) Line 410 at c:\lo\src\core\vcl\win\app\salinst.cxx(410) vclplug_winlo.dll!ImplSalYield(bool bWait, bool bHandleAllCurrentEvents) Line 441 at c:\lo\src\core\vcl\win\app\salinst.cxx(441) vclplug_winlo.dll!WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents) Line 512 at c:\lo\src\core\vcl\win\app\salinst.cxx(512) vcllo.dll!ImplYield(bool i_bWait, bool i_bAllEvents) Line 441 at c:\lo\src\core\vcl\source\app\svapp.cxx(441) vcllo.dll!Application::Yield() Line 506 at c:\lo\src\core\vcl\source\app\svapp.cxx(506) vcllo.dll!Dialog::Execute() Line 1041 at c:\lo\src\core\vcl\source\window\dialog.cxx(1041) vcllo.dll!SalInstanceDialog::run() Line 881 at c:\lo\src\core\vcl\source\app\salvtables.cxx(881) vcllo.dll!weld::DialogController::run() Line 1364 at c:\lo\src\core\include\vcl\weld.hxx(1364) svtlo.dll!svtools::executeRestartDialog(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> & context, weld::Window * parent, svtools::RestartReason reason) Line 101 at c:\lo\src\core\svtools\source\dialogs\restartdialog.cxx(98) cuilo.dll!OfaTreeOptionsDialog::OKHdl_Impl(Button * __formal) Line 735 at c:\lo\src\core\cui\source\options\treeopt.cxx(735) cuilo.dll!OfaTreeOptionsDialog::LinkStubOKHdl_Impl(void * instance, Button * data) Line 704 at c:\lo\src\core\cui\source\options\treeopt.cxx(704) vcllo.dll!Link<Button *,void>::Call(Button * data) Line 84 at c:\lo\src\core\include\tools\link.hxx(84) vcllo.dll!Button::Click::__l2::<lambda>() Line 125 at c:\lo\src\core\vcl\source\control\button.cxx(125) vcllo.dll!std::_Invoker_functor::_Call<void <lambda>(void) &>(Button::Click::__l2::void <lambda>(void) & _Obj) vcllo.dll!std::invoke<void <lambda>(void) &>(Button::Click::__l2::void <lambda>(void) & _Obj) vcllo.dll!std::_Invoker_ret<void,1>::_Call<void <lambda>(void) &>(Button::Click::__l2::void <lambda>(void) & <_Vals_0>) vcllo.dll!std::_Func_impl_no_alloc<void <lambda>(void),void>::_Do_call() vcllo.dll!std::_Func_class<void>::operator()() vcllo.dll!Control::ImplCallEventListenersAndHandler(VclEventId nEvent, const std::function<void __cdecl(void)> & callHandler) Line 321 at c:\lo\src\core\vcl\source\control\ctrl.cxx(321) vcllo.dll!Button::Click() Line 125 at c:\lo\src\core\vcl\source\control\button.cxx(125) vcllo.dll!OKButton::Click() Line 1737 at c:\lo\src\core\vcl\source\control\button.cxx(1737) vcllo.dll!PushButton::Tracking(const TrackingEvent & rTEvt) Line 1260 at c:\lo\src\core\vcl\source\control\button.cxx(1260) vcllo.dll!vcl::Window::EndTracking(TrackingEventFlags nFlags) Line 320 at c:\lo\src\core\vcl\source\window\window2.cxx(320) vcllo.dll!ImplHandleMouseEvent(const VclPtr<vcl::Window> & xWindow, MouseNotifyEvent nSVEvent, bool bMouseLeave, long nX, long nY, unsigned __int64 nMsgTime, unsigned short nCode, MouseEventModifiers nMode) Line 703 at c:\lo\src\core\vcl\source\window\winproc.cxx(703) vcllo.dll!ImplHandleSalMouseButtonUp(vcl::Window * pWindow, const SalMouseEvent * pEvent) Line 1998 at c:\lo\src\core\vcl\source\window\winproc.cxx(1998) vcllo.dll!ImplWindowFrameProc(vcl::Window * _pWindow, SalEvent nEvent, const void * pEvent) Line 2336 at c:\lo\src\core\vcl\source\window\winproc.cxx(2336) vcllo.dll!SalFrame::CallCallback(SalEvent nEvent, const void * pEvent) Line 285 at c:\lo\src\core\vcl\inc\salframe.hxx(285) vclplug_winlo.dll!ImplHandleMouseMsg(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 3120 at c:\lo\src\core\vcl\win\window\salframe.cxx(3120) vclplug_winlo.dll!SalFrameWndProc(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam, bool & rDef) Line 5475 at c:\lo\src\core\vcl\win\window\salframe.cxx(5475) vclplug_winlo.dll!SalFrameWndProcW(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 5828 at c:\lo\src\core\vcl\win\window\salframe.cxx(5828) user32.dll!UserCallWinProcCheckWow() user32.dll!CallWindowProcW() opengl32.dll!wglWndProc() user32.dll!UserCallWinProcCheckWow() user32.dll!DispatchMessageWorker() vclplug_winlo.dll!ImplSalDispatchMessage(const tagMSG * pMsg) Line 410 at c:\lo\src\core\vcl\win\app\salinst.cxx(410) vclplug_winlo.dll!ImplSalYield(bool bWait, bool bHandleAllCurrentEvents) Line 483 at c:\lo\src\core\vcl\win\app\salinst.cxx(483) vclplug_winlo.dll!WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents) Line 512 at c:\lo\src\core\vcl\win\app\salinst.cxx(512) vcllo.dll!ImplYield(bool i_bWait, bool i_bAllEvents) Line 441 at c:\lo\src\core\vcl\source\app\svapp.cxx(441) vcllo.dll!Application::Yield() Line 506 at c:\lo\src\core\vcl\source\app\svapp.cxx(506) vcllo.dll!Dialog::Execute() Line 1041 at c:\lo\src\core\vcl\source\window\dialog.cxx(1041) cuilo.dll!OfaTreeOptionsDialog::Execute() Line 2040 at c:\lo\src\core\cui\source\options\treeopt.cxx(2040) cuilo.dll!CuiVclAbstractDialog_Impl::Execute() Line 112 at c:\lo\src\core\cui\source\factory\dlgfact.cxx(112) sfxlo.dll!SfxApplication::OfaExec_Impl(SfxRequest & rReq) Line 1361 at c:\lo\src\core\sfx2\source\appl\appserv.cxx(1361) sfxlo.dll!SfxStubSfxApplicationOfaExec_Impl(SfxShell * pShell, SfxRequest & rReq) Line 1248 at c:\lo\src\core\workdir\sditarget\sfx2\sdi\sfxslots.hxx(1248) sfxlo.dll!SfxShell::CallExec(void(*)(SfxShell *, SfxRequest &) pFunc, SfxRequest & rReq) Line 207 at c:\lo\src\core\include\sfx2\shell.hxx(207) sfxlo.dll!SfxDispatcher::Call_Impl(SfxShell & rShell, const SfxSlot & rSlot, SfxRequest & rReq, bool bRecord) Line 356 at c:\lo\src\core\sfx2\source\control\dispatch.cxx(356) sfxlo.dll!SfxDispatcher::Execute_(SfxShell & rShell, const SfxSlot & rSlot, SfxRequest & rReq, SfxCallMode eCallMode) Line 854 at c:\lo\src\core\sfx2\source\control\dispatch.cxx(854) sfxlo.dll!SfxDispatcher::Execute(unsigned short nSlot, SfxCallMode nCall, const SfxItemSet * pArgs, const SfxItemSet * pInternalArgs, unsigned short nModi) Line 913 at c:\lo\src\core\sfx2\source\control\dispatch.cxx(913) sfxlo.dll!SfxDispatchController_Impl::dispatch(const com::sun::star::util::URL & aURL, const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> & aArgs, const com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> & rListener) Line 774 at c:\lo\src\core\sfx2\source\control\unoctitm.cxx(774) sfxlo.dll!SfxOfficeDispatch::dispatch(const com::sun::star::util::URL & aURL, const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> & aArgs) Line 225 at c:\lo\src\core\sfx2\source\control\unoctitm.cxx(225) fwklo.dll!framework::MenuBarManager::Select(Menu * pMenu) Line 896 at c:\lo\src\core\framework\source\uielement\menubarmanager.cxx(896) fwklo.dll!framework::MenuBarManager::LinkStubSelect(void * instance, Menu * data) Line 832 at c:\lo\src\core\framework\source\uielement\menubarmanager.cxx(832) vcllo.dll!Link<Menu *,bool>::Call(Menu * data) Line 84 at c:\lo\src\core\include\tools\link.hxx(84) vcllo.dll!Menu::Select() Line 362 at c:\lo\src\core\vcl\source\window\menu.cxx(362) vcllo.dll!Menu::ImplCallSelect(void * __formal) Line 2140 at c:\lo\src\core\vcl\source\window\menu.cxx(2140) vcllo.dll!Menu::LinkStubImplCallSelect(void * instance, void * data) Line 2136 at c:\lo\src\core\vcl\source\window\menu.cxx(2136) vcllo.dll!Link<void *,void>::Call(void * data) Line 84 at c:\lo\src\core\include\tools\link.hxx(84) vcllo.dll!ImplHandleUserEvent(ImplSVEvent * pSVEvent) Line 1935 at c:\lo\src\core\vcl\source\window\winproc.cxx(1935) vcllo.dll!ImplWindowFrameProc(vcl::Window * _pWindow, SalEvent nEvent, const void * pEvent) Line 2486 at c:\lo\src\core\vcl\source\window\winproc.cxx(2486) vcllo.dll!SalFrame::CallCallback(SalEvent nEvent, const void * pEvent) Line 285 at c:\lo\src\core\vcl\inc\salframe.hxx(285) vclplug_winlo.dll!ImplHandleUserEvent(HWND__ * hWnd, __int64 lParam) Line 4068 at c:\lo\src\core\vcl\win\window\salframe.cxx(4068) vclplug_winlo.dll!SalFrameWndProc(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam, bool & rDef) Line 5721 at c:\lo\src\core\vcl\win\window\salframe.cxx(5721) vclplug_winlo.dll!SalFrameWndProcW(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 5828 at c:\lo\src\core\vcl\win\window\salframe.cxx(5828) user32.dll!UserCallWinProcCheckWow() user32.dll!CallWindowProcW() opengl32.dll!wglWndProc() user32.dll!UserCallWinProcCheckWow() user32.dll!DispatchMessageWorker() vclplug_winlo.dll!ImplSalDispatchMessage(const tagMSG * pMsg) Line 410 at c:\lo\src\core\vcl\win\app\salinst.cxx(410) vclplug_winlo.dll!ImplSalYield(bool bWait, bool bHandleAllCurrentEvents) Line 441 at c:\lo\src\core\vcl\win\app\salinst.cxx(441) vclplug_winlo.dll!WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents) Line 512 at c:\lo\src\core\vcl\win\app\salinst.cxx(512) vcllo.dll!ImplYield(bool i_bWait, bool i_bAllEvents) Line 441 at c:\lo\src\core\vcl\source\app\svapp.cxx(441) vcllo.dll!Application::Yield() Line 506 at c:\lo\src\core\vcl\source\app\svapp.cxx(506) vcllo.dll!Application::Execute() Line 422 at c:\lo\src\core\vcl\source\app\svapp.cxx(422) sofficeapp.dll!desktop::Desktop::Main() Line 1619 at c:\lo\src\core\desktop\source\app\app.cxx(1619) vcllo.dll!ImplSVMain() Line 199 at c:\lo\src\core\vcl\source\app\svmain.cxx(199) vcllo.dll!SVMain() Line 234 at c:\lo\src\core\vcl\source\app\svmain.cxx(234) sofficeapp.dll!soffice_main() Line 169 at c:\lo\src\core\desktop\source\app\sofficemain.cxx(169) soffice.bin!sal_main() Line 48 at c:\lo\src\core\desktop\source\app\main.c(48) soffice.bin!main(int argc, char * * argv) Line 47 at c:\lo\src\core\desktop\source\app\main.c(47) soffice.bin!invoke_main() Line 79 at d:\agent\_work\3\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl(79) soffice.bin!__scrt_common_main_seh() Line 288 at d:\agent\_work\3\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl(288) soffice.bin!__scrt_common_main() Line 331 at d:\agent\_work\3\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl(331) soffice.bin!mainCRTStartup() Line 17 at d:\agent\_work\3\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp(17) kernel32.dll!BaseThreadInitThunk() ntdll.dll!RtlUserThreadStart() Change-Id: I0518c48e48a50b99a2a1eaf17335e116d63bc587 Reviewed-on: https://gerrit.libreoffice.org/65007 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 12edea426a31f57a9d5b1c65b34fb1336c5534e9) Reviewed-on: https://gerrit.libreoffice.org/65095 Tested-by: Jenkins Reviewed-by: Xisco FaulĂ­ <xiscofauli@libreoffice.org>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/dialogs/restartdialog.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/svtools/source/dialogs/restartdialog.cxx b/svtools/source/dialogs/restartdialog.cxx
index 47a3ee906091..1de2e09cc014 100644
--- a/svtools/source/dialogs/restartdialog.cxx
+++ b/svtools/source/dialogs/restartdialog.cxx
@@ -94,9 +94,12 @@ void svtools::executeRestartDialog(
css::uno::Reference< css::uno::XComponentContext > const & context,
weld::Window* parent, RestartReason reason)
{
+ auto xRestartManager = css::task::OfficeRestartManager::get(context);
+ if (xRestartManager->isRestartRequested(false))
+ return; // don't try to show another dialog when restart is already in progress
RestartDialog aDlg(parent, reason);
if (aDlg.run()) {
- css::task::OfficeRestartManager::get(context)->requestRestart(
+ xRestartManager->requestRestart(
css::uno::Reference< css::task::XInteractionHandler >());
}
}