Bug 141013 - Several 'More Fields' dialogs are opened in a MailMerge document with password-protected DB when the dialog is kept open when closing previous document
Summary: Several 'More Fields' dialogs are opened in a MailMerge document with passwor...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Mail-Merge
  Show dependency treegraph
 
Reported: 2021-03-14 08:32 UTC by Mike Kaganski
Modified: 2024-05-03 03:16 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2021-03-14 08:32:05 UTC
If the database associated with this MailMerge document is password-protected, and the More Fields dialog is kept open when closing last document, then opening this MailMerge document opens several copies of More Fields dialog, and it's impossible to close some of them.

Steps:

1. Use steps from tdf#141011
2. Keep More Fields dialog open, and close the MailMerge document.
3. Reopen the MailMerge document.

=> several More Fields dialogs are open, each asking for password. One of the dialogs may be closed, but trying to close the rest only triggers another dialog.

Was present already in LO 3.3, and in OOo 3.2.
Comment 1 Mike Kaganski 2021-03-14 08:36:34 UTC
See screen cast in attachment 170471 [details] from bug 141011.
Comment 2 Mike Kaganski 2021-03-14 14:47:04 UTC
After fixing bug 141011, it's important to keep More Fields dialog on Database tab on step 2.

It looks like it's some problem of inner message loop of password dialog, starting to open previously opened dialogs again.

Caolan, Jan-Marek: any ideas how to fix this?
Comment 3 Mike Kaganski 2021-03-14 14:58:33 UTC
A call stack - note the three repeated portions starting from SfxDispatcher::Update_Impl:

> swlo.dll!SwDBTreeList::InitTreeList() Line 163	C++
> swlo.dll!SwDBTreeList::SetWrtShell(SwWrtShell & rSh) Line 402	C++
> swuilo.dll!SwFieldDBPage::SetWrtShell(SwWrtShell & rSh) Line 521	C++
> swuilo.dll!SwFieldDlg::PageCreated(const rtl::OString & rId, SfxTabPage & rPage) Line 290	C++
> sfxlo.dll!SfxTabDialogController::CreatePages() Line 925	C++
> sfxlo.dll!SfxTabDialogController::Start_Impl() Line 1005	C++
> sfxlo.dll!SfxTabDialogController::runAsync(const std::shared_ptr<SfxTabDialogController> & rController, const std::function<void __cdecl(long)> & rFunc) Line 1055	C++
> swuilo.dll!AbstractSwFieldDlg_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContext & rCtx) Line 501	C++
> vcllo.dll!VclAbstractDialog::StartExecuteAsync(const std::function<void __cdecl(long)> & rEndDialogFn) Line 73	C++
> swlo.dll!SwFieldDlgWrapper::SwFieldDlgWrapper(vcl::Window * _pParent, unsigned short nId, SfxBindings * pB, SfxChildWinInfo * __formal) Line 74	C++
> swlo.dll!std::make_unique<SwFieldDlgWrapper,vcl::Window * &,unsigned short &,SfxBindings * &,SfxChildWinInfo * &,0>(vcl::Window * & <_Args_0>, unsigned short & <_Args_1>, SfxBindings * & <_Args_2>, SfxChildWinInfo * & <_Args_3>) Line 3580	C++
> swlo.dll!SwFieldDlgWrapper::CreateImpl(vcl::Window * pParent, unsigned short nId, SfxBindings * pBindings, SfxChildWinInfo * pInfo) Line 27	C++
> sfxlo.dll!SfxChildWindow::CreateChildWindow(unsigned short nId, vcl::Window * pParent, SfxBindings * pBindings, const SfxChildWinInfo & rInfo) Line 259	C++
> sfxlo.dll!SfxWorkWindow::CreateChildWin_Impl(SfxChildWin_Impl * pCW, bool bSetFocus) Line 1347	C++
> sfxlo.dll!SfxWorkWindow::UpdateChildWindows_Impl() Line 1298	C++
> sfxlo.dll!SfxWorkWindow::UpdateObjectBars_Impl2() Line 1247	C++
> sfxlo.dll!SfxWorkWindow::UpdateObjectBars_Impl() Line 1100	C++
> sfxlo.dll!SfxDispatcher::Update_Impl(bool bForce) Line 1115	C++
> sfxlo.dll!DispatcherUpdate_Impl(void * __formal, void * pArg) Line 655	C++
> svtlo.dll!Link<void *,void>::Call(void * data) Line 111	C++
> svtlo.dll!svtools::AsynchronLink::Call_Impl(void * pArg) Line 90	C++
> svtlo.dll!svtools::AsynchronLink::HandleCall_Idle(Timer * __formal) Line 66	C++
> svtlo.dll!svtools::AsynchronLink::HandleCall_PostUserEvent(void * __formal) Line 71	C++
> svtlo.dll!svtools::AsynchronLink::LinkStubHandleCall_PostUserEvent(void * instance, void * data) Line 68	C++
> vcllo.dll!Link<void *,void>::Call(void * data) Line 111	C++
> vcllo.dll!ImplHandleUserEvent(ImplSVEvent * pSVEvent) Line 1992	C++
> vcllo.dll!ImplWindowFrameProc(vcl::Window * _pWindow, SalEvent nEvent, const void * pEvent) Line 2560	C++
> vcllo.dll!SalFrame::CallCallback(SalEvent nEvent, const void * pEvent) Line 306	C++
> vclplug_winlo.dll!ImplHandleUserEvent(HWND__ * hWnd, __int64 lParam) Line 4144	C++
> vclplug_winlo.dll!SalFrameWndProc(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam, bool & rDef) Line 5790	C++
> vclplug_winlo.dll!SalFrameWndProcW(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 5897	C++
> user32.dll!UserCallWinProcCheckWow()	Unknown
> user32.dll!DispatchMessageWorker()	Unknown
> vclplug_winlo.dll!ImplSalDispatchMessage(const tagMSG * pMsg) Line 406	C++
> vclplug_winlo.dll!ImplSalYield(bool bWait, bool bHandleAllCurrentEvents) Line 437	C++
> vclplug_winlo.dll!WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents) Line 512	C++
> vcllo.dll!ImplYield(bool i_bWait, bool i_bAllEvents) Line 465	C++
> vcllo.dll!Application::Yield() Line 533	C++
> vcllo.dll!Dialog::Execute() Line 1057	C++
> vcllo.dll!SalInstanceDialog::run() Line 1609	C++
> vcllo.dll!weld::DialogController::run() Line 2430	C++
> uuilo.dll!`anonymous namespace'::executeLoginDialog(weld::Window * pParent, LoginErrorInfo & rInfo, const rtl::OUString & rRealm) Line 111	C++
> uuilo.dll!`anonymous namespace'::handleAuthenticationRequest_(weld::Window * pParent, const com::sun::star::uno::Reference<com::sun::star::task::XInteractionHandler2> & xIH, const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> & xContext, const com::sun::star::ucb::AuthenticationRequest & rRequest, const com::sun::star::uno::Sequence<com::sun::star::uno::Reference<com::sun::star::task::XInteractionContinuation>> & rContinuations, const rtl::OUString & rURL) Line 263	C++
> uuilo.dll!UUIInteractionHelper::handleAuthenticationRequest(const com::sun::star::uno::Reference<com::sun::star::task::XInteractionRequest> & rRequest) Line 611	C++
> uuilo.dll!UUIInteractionHelper::handleRequest_impl(const com::sun::star::uno::Reference<com::sun::star::task::XInteractionRequest> & rRequest, bool bObtainErrorStringOnly, bool & bHasErrorString, rtl::OUString & rErrorString) Line 783	C++
> uuilo.dll!UUIInteractionHelper::handleRequest(const com::sun::star::uno::Reference<com::sun::star::task::XInteractionRequest> & rRequest) Line 179	C++
> uuilo.dll!`anonymous namespace'::UUIInteractionHandler::handle(const com::sun::star::uno::Reference<com::sun::star::task::XInteractionRequest> & rRequest) Line 196	C++
> dbalo.dll!dbaccess::ODatabaseSource::connectWithCompletion(const com::sun::star::uno::Reference<com::sun::star::task::XInteractionHandler> & _rxHandler, bool _bIsolated) Line 1164	C++
> dbalo.dll!dbaccess::ODatabaseSource::connectWithCompletion(const com::sun::star::uno::Reference<com::sun::star::task::XInteractionHandler> & _rxHandler) Line 1103	C++
> swlo.dll!SwDBManager::GetConnection(const rtl::OUString & rDataSource, com::sun::star::uno::Reference<com::sun::star::sdbc::XDataSource> & rxSource, const SwView * pView) Line 1868	C++
> swlo.dll!SwDBManager::RegisterConnection(const rtl::OUString & rDataSource) Line 2339	C++
> swlo.dll!SwDBTreeList_Impl::GetConnection(const rtl::OUString & rSourceName) Line 124	C++
> swlo.dll!SwDBTreeList::RequestingChildrenHdl(const weld::TreeIter & rParent) Line 259	C++
> swlo.dll!SwDBTreeList::Select(std::basic_string_view<char16_t,std::char_traits<char16_t>> rDBName, std::basic_string_view<char16_t,std::char_traits<char16_t>> rTableName, std::basic_string_view<char16_t,std::char_traits<char16_t>> rColumnName) Line 347	C++
> swuilo.dll!SwFieldDBPage::Reset(const SfxItemSet * __formal) Line 141	C++
> sfxlo.dll!SfxTabDialogController::ActivatePageHdl(const rtl::OString & rPage) Line 543	C++
> sfxlo.dll!SfxTabDialogController::Start_Impl() Line 1019	C++
> sfxlo.dll!SfxTabDialogController::runAsync(const std::shared_ptr<SfxTabDialogController> & rController, const std::function<void __cdecl(long)> & rFunc) Line 1055	C++
> swuilo.dll!AbstractSwFieldDlg_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContext & rCtx) Line 501	C++
> vcllo.dll!VclAbstractDialog::StartExecuteAsync(const std::function<void __cdecl(long)> & rEndDialogFn) Line 73	C++
> swlo.dll!SwFieldDlgWrapper::SwFieldDlgWrapper(vcl::Window * _pParent, unsigned short nId, SfxBindings * pB, SfxChildWinInfo * __formal) Line 74	C++
> swlo.dll!std::make_unique<SwFieldDlgWrapper,vcl::Window * &,unsigned short &,SfxBindings * &,SfxChildWinInfo * &,0>(vcl::Window * & <_Args_0>, unsigned short & <_Args_1>, SfxBindings * & <_Args_2>, SfxChildWinInfo * & <_Args_3>) Line 3580	C++
> swlo.dll!SwFieldDlgWrapper::CreateImpl(vcl::Window * pParent, unsigned short nId, SfxBindings * pBindings, SfxChildWinInfo * pInfo) Line 27	C++
> sfxlo.dll!SfxChildWindow::CreateChildWindow(unsigned short nId, vcl::Window * pParent, SfxBindings * pBindings, const SfxChildWinInfo & rInfo) Line 259	C++
> sfxlo.dll!SfxWorkWindow::CreateChildWin_Impl(SfxChildWin_Impl * pCW, bool bSetFocus) Line 1347	C++
> sfxlo.dll!SfxWorkWindow::UpdateChildWindows_Impl() Line 1298	C++
> sfxlo.dll!SfxWorkWindow::UpdateObjectBars_Impl2() Line 1247	C++
> sfxlo.dll!SfxWorkWindow::UpdateObjectBars_Impl() Line 1100	C++
> sfxlo.dll!SfxDispatcher::Update_Impl(bool bForce) Line 1115	C++
> sfxlo.dll!DispatcherUpdate_Impl(void * __formal, void * pArg) Line 655	C++
> svtlo.dll!Link<void *,void>::Call(void * data) Line 111	C++
> svtlo.dll!svtools::AsynchronLink::Call_Impl(void * pArg) Line 90	C++
> svtlo.dll!svtools::AsynchronLink::HandleCall_Idle(Timer * __formal) Line 66	C++
> svtlo.dll!svtools::AsynchronLink::HandleCall_PostUserEvent(void * __formal) Line 71	C++
> svtlo.dll!svtools::AsynchronLink::LinkStubHandleCall_PostUserEvent(void * instance, void * data) Line 68	C++
> vcllo.dll!Link<void *,void>::Call(void * data) Line 111	C++
> vcllo.dll!ImplHandleUserEvent(ImplSVEvent * pSVEvent) Line 1992	C++
> vcllo.dll!ImplWindowFrameProc(vcl::Window * _pWindow, SalEvent nEvent, const void * pEvent) Line 2560	C++
> vcllo.dll!SalFrame::CallCallback(SalEvent nEvent, const void * pEvent) Line 306	C++
> vclplug_winlo.dll!ImplHandleUserEvent(HWND__ * hWnd, __int64 lParam) Line 4144	C++
> vclplug_winlo.dll!SalFrameWndProc(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam, bool & rDef) Line 5790	C++
> vclplug_winlo.dll!SalFrameWndProcW(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 5897	C++
> user32.dll!UserCallWinProcCheckWow()	Unknown
> user32.dll!DispatchMessageWorker()	Unknown
> vclplug_winlo.dll!ImplSalDispatchMessage(const tagMSG * pMsg) Line 406	C++
> vclplug_winlo.dll!ImplSalYield(bool bWait, bool bHandleAllCurrentEvents) Line 437	C++
> vclplug_winlo.dll!WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents) Line 512	C++
> vcllo.dll!ImplYield(bool i_bWait, bool i_bAllEvents) Line 465	C++
> vcllo.dll!Application::Yield() Line 533	C++
> vcllo.dll!Dialog::Execute() Line 1057	C++
> vcllo.dll!SalInstanceDialog::run() Line 1609	C++
> vcllo.dll!weld::DialogController::run() Line 2430	C++
> uuilo.dll!`anonymous namespace'::executeLoginDialog(weld::Window * pParent, LoginErrorInfo & rInfo, const rtl::OUString & rRealm) Line 111	C++
> uuilo.dll!`anonymous namespace'::handleAuthenticationRequest_(weld::Window * pParent, const com::sun::star::uno::Reference<com::sun::star::task::XInteractionHandler2> & xIH, const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> & xContext, const com::sun::star::ucb::AuthenticationRequest & rRequest, const com::sun::star::uno::Sequence<com::sun::star::uno::Reference<com::sun::star::task::XInteractionContinuation>> & rContinuations, const rtl::OUString & rURL) Line 263	C++
> uuilo.dll!UUIInteractionHelper::handleAuthenticationRequest(const com::sun::star::uno::Reference<com::sun::star::task::XInteractionRequest> & rRequest) Line 611	C++
> uuilo.dll!UUIInteractionHelper::handleRequest_impl(const com::sun::star::uno::Reference<com::sun::star::task::XInteractionRequest> & rRequest, bool bObtainErrorStringOnly, bool & bHasErrorString, rtl::OUString & rErrorString) Line 783	C++
> uuilo.dll!UUIInteractionHelper::handleRequest(const com::sun::star::uno::Reference<com::sun::star::task::XInteractionRequest> & rRequest) Line 179	C++
> uuilo.dll!`anonymous namespace'::UUIInteractionHandler::handle(const com::sun::star::uno::Reference<com::sun::star::task::XInteractionRequest> & rRequest) Line 196	C++
> dbalo.dll!dbaccess::ODatabaseSource::connectWithCompletion(const com::sun::star::uno::Reference<com::sun::star::task::XInteractionHandler> & _rxHandler, bool _bIsolated) Line 1164	C++
> dbalo.dll!dbaccess::ODatabaseSource::connectWithCompletion(const com::sun::star::uno::Reference<com::sun::star::task::XInteractionHandler> & _rxHandler) Line 1103	C++
> swlo.dll!SwDBManager::GetConnection(const rtl::OUString & rDataSource, com::sun::star::uno::Reference<com::sun::star::sdbc::XDataSource> & rxSource, const SwView * pView) Line 1868	C++
> swlo.dll!SwDBManager::RegisterConnection(const rtl::OUString & rDataSource) Line 2339	C++
> swlo.dll!SwDBTreeList_Impl::GetConnection(const rtl::OUString & rSourceName) Line 124	C++
> swlo.dll!SwDBTreeList::RequestingChildrenHdl(const weld::TreeIter & rParent) Line 259	C++
> swlo.dll!SwDBTreeList::Select(std::basic_string_view<char16_t,std::char_traits<char16_t>> rDBName, std::basic_string_view<char16_t,std::char_traits<char16_t>> rTableName, std::basic_string_view<char16_t,std::char_traits<char16_t>> rColumnName) Line 347	C++
> swuilo.dll!SwFieldDBPage::Reset(const SfxItemSet * __formal) Line 141	C++
> sfxlo.dll!SfxTabDialogController::ActivatePageHdl(const rtl::OString & rPage) Line 543	C++
> sfxlo.dll!SfxTabDialogController::Start_Impl() Line 1019	C++
> sfxlo.dll!SfxTabDialogController::runAsync(const std::shared_ptr<SfxTabDialogController> & rController, const std::function<void __cdecl(long)> & rFunc) Line 1055	C++
> swuilo.dll!AbstractSwFieldDlg_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContext & rCtx) Line 501	C++
> vcllo.dll!VclAbstractDialog::StartExecuteAsync(const std::function<void __cdecl(long)> & rEndDialogFn) Line 73	C++
> swlo.dll!SwFieldDlgWrapper::SwFieldDlgWrapper(vcl::Window * _pParent, unsigned short nId, SfxBindings * pB, SfxChildWinInfo * __formal) Line 74	C++
> swlo.dll!std::make_unique<SwFieldDlgWrapper,vcl::Window * &,unsigned short &,SfxBindings * &,SfxChildWinInfo * &,0>(vcl::Window * & <_Args_0>, unsigned short & <_Args_1>, SfxBindings * & <_Args_2>, SfxChildWinInfo * & <_Args_3>) Line 3580	C++
> swlo.dll!SwFieldDlgWrapper::CreateImpl(vcl::Window * pParent, unsigned short nId, SfxBindings * pBindings, SfxChildWinInfo * pInfo) Line 27	C++
> sfxlo.dll!SfxChildWindow::CreateChildWindow(unsigned short nId, vcl::Window * pParent, SfxBindings * pBindings, const SfxChildWinInfo & rInfo) Line 259	C++
> sfxlo.dll!SfxWorkWindow::CreateChildWin_Impl(SfxChildWin_Impl * pCW, bool bSetFocus) Line 1347	C++
> sfxlo.dll!SfxWorkWindow::UpdateChildWindows_Impl() Line 1298	C++
> sfxlo.dll!SfxWorkWindow::UpdateObjectBars_Impl2() Line 1247	C++
> sfxlo.dll!SfxWorkWindow::UpdateObjectBars_Impl() Line 1100	C++
> sfxlo.dll!SfxDispatcher::Update_Impl(bool bForce) Line 1115	C++
> sfxlo.dll!SfxApplication::SetViewFrame_Impl(SfxViewFrame * pFrame) Line 296	C++
> sfxlo.dll!SfxViewFrame::SetViewFrame(SfxViewFrame * pFrame) Line 3310	C++
> sfxlo.dll!SfxViewFrame::MakeActive_Impl(bool bGrabFocus) Line 1914	C++
> sfxlo.dll!SfxBaseController::ConnectSfxFrame_Impl(const SfxBaseController::ConnectSfxFrame i_eConnect) Line 1254	C++
> sfxlo.dll!SfxBaseController::attachFrame(const com::sun::star::uno::Reference<com::sun::star::frame::XFrame> & xFrame) Line 531	C++
> sfxlo.dll!`anonymous namespace'::SfxFrameLoader_Impl::impl_createDocumentView(const com::sun::star::uno::Reference<com::sun::star::frame::XModel2> & i_rModel, const com::sun::star::uno::Reference<com::sun::star::frame::XFrame> & i_rFrame, const comphelper::NamedValueCollection & i_rViewFactoryArgs, const rtl::OUString & i_rViewName) Line 585	C++
> sfxlo.dll!`anonymous namespace'::SfxFrameLoader_Impl::load(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> & rArgs, const com::sun::star::uno::Reference<com::sun::star::frame::XFrame> & _rTargetFrame) Line 703	C++
> fwklo.dll!framework::LoadEnv::impl_loadContent() Line 1159	C++
> fwklo.dll!framework::LoadEnv::start() Line 394	C++
> fwklo.dll!framework::LoadEnv::startLoading(const rtl::OUString & sURL, const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> & lMediaDescriptor, const com::sun::star::uno::Reference<com::sun::star::frame::XFrame> & xBaseFrame, const rtl::OUString & sTarget, long nSearchFlags, LoadEnvFeatures eFeature) Line 299	C++
> fwklo.dll!framework::LoadDispatcher::impl_dispatch(const com::sun::star::util::URL & rURL, const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> & lArguments, const com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> & xListener) Line 107	C++
> fwklo.dll!framework::LoadDispatcher::dispatch(const com::sun::star::util::URL & aURL, const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> & lArguments) Line 53	C++
> sfxlo.dll!sfx2::RecentDocsView::ExecuteHdl_Impl(sfx2::RecentDocsView * __formal, void * p) Line 427	C++
> sfxlo.dll!sfx2::RecentDocsView::LinkStubExecuteHdl_Impl(void * instance, void * data) Line 419	C++
> vcllo.dll!Link<void *,void>::Call(void * data) Line 111	C++
> vcllo.dll!ImplHandleUserEvent(ImplSVEvent * pSVEvent) Line 1992	C++
> vcllo.dll!ImplWindowFrameProc(vcl::Window * _pWindow, SalEvent nEvent, const void * pEvent) Line 2560	C++
> vcllo.dll!SalFrame::CallCallback(SalEvent nEvent, const void * pEvent) Line 306	C++
> vclplug_winlo.dll!ImplHandleUserEvent(HWND__ * hWnd, __int64 lParam) Line 4144	C++
> vclplug_winlo.dll!SalFrameWndProc(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam, bool & rDef) Line 5790	C++
> vclplug_winlo.dll!SalFrameWndProcW(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 5897	C++
> user32.dll!UserCallWinProcCheckWow()	Unknown
> user32.dll!DispatchMessageWorker()	Unknown
> vclplug_winlo.dll!ImplSalDispatchMessage(const tagMSG * pMsg) Line 406	C++
> vclplug_winlo.dll!ImplSalYield(bool bWait, bool bHandleAllCurrentEvents) Line 437	C++
> vclplug_winlo.dll!WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents) Line 512	C++
> vcllo.dll!ImplYield(bool i_bWait, bool i_bAllEvents) Line 465	C++
> vcllo.dll!Application::Yield() Line 533	C++
> vcllo.dll!Application::Execute() Line 444	C++
> sofficeapp.dll!desktop::Desktop::Main() Line 1586	C++
> vcllo.dll!ImplSVMain() Line 197	C++
> vcllo.dll!SVMain() Line 230	C++
> sofficeapp.dll!soffice_main() Line 98	C++
> soffice.bin!sal_main() Line 49	C
> soffice.bin!main(int argc, char * * argv) Line 47	C
> soffice.bin!invoke_main() Line 79	C++
> soffice.bin!__scrt_common_main_seh() Line 288	C++
> soffice.bin!__scrt_common_main() Line 331	C++
> soffice.bin!mainCRTStartup(void * __formal) Line 17	C++
> kernel32.dll!BaseThreadInitThunk()	Unknown
> ntdll.dll!RtlUserThreadStart()	Unknown

Still no idea what to get out of it.
Comment 4 Jan-Marek Glogowski 2021-03-14 22:21:55 UTC
Short answer: don't use Dialog::Execute, to prevent a nested event loop for GUI processing. Use weld::DialogController::runAsync / StartExecuteAsync.

In the long term we should get rid of the whole concept of nested event loops (Application::Reschedule, Application::Yield, Dialog::Execute etc.). Or at least guarantee, these won't block.

What happens here (and generally with multiple non-async dialogs) is, that you have to close the dialogs in the reverse order they were opened. Normally the close would quit the nested event loop from Dialog::Execute, but that can just work with the deepest one. Higher event loops are blocked by the deeper ones.

This is also the reason, why you can't use a file picker per document / application window, or have a dialog for multiple application windows / documents.

The nested event loops guarantees the event processing, but you simply can't continue executing code in a higher loop, which is blocked by the lower loop.
Comment 5 Mike Kaganski 2021-03-15 05:42:35 UTC
(In reply to Jan-Marek Glogowski from comment #4)
> Short answer: don't use Dialog::Execute, to prevent a nested event loop for
> GUI processing. Use weld::DialogController::runAsync / StartExecuteAsync.

Hmm, that means that executeLoginDialog must become async? Could you please point to a commit that changes a modal dialog to async mode?
Comment 6 Jan-Marek Glogowski 2021-03-15 07:34:13 UTC
(In reply to Mike Kaganski from comment #5)
> (In reply to Jan-Marek Glogowski from comment #4)
> > Short answer: don't use Dialog::Execute, to prevent a nested event loop for
> > GUI processing. Use weld::DialogController::runAsync / StartExecuteAsync.
> 
> Hmm, that means that executeLoginDialog must become async? Could you please
> point to a commit that changes a modal dialog to async mode?

Never done this myself, but check

$ git log -GrunAsync

And note, that this has nothing to do with modality. Modality means a dialog stays on top of some window hierarchy (in X11 the term is: a window is transient for an other window) and grabs input and focus of / for it. This functionality is really split in the API, so you can implement floating toolbars, which stay on top but don't grab input+focus. Or popup menus, which close when loosing focus as an other example.

I find async a bad term, as it's actually just about blocking / non-blocking AKA Windows SendMessage / PostMessage; in the end event processing.
Comment 7 Caolán McNamara 2021-03-15 09:12:05 UTC
 63e36e30beeaef36d5071cc94c7a3424ccfd48fd sc/source/ui/miscdlgs/optsolver.cxx
is an example FWIW, "LoginDialog ..." becomes "shared_ptr<LoginDialog> ..." and run->runAsync, etc. 

executeLoginDialog would immediately return though, there won't be a sub-mainloop to block its return, so that'll cause a ripple of extra things to overcome
Comment 8 Xisco Faulí 2022-05-03 12:09:40 UTC
Dear Mike Kaganski,
This bug has been in ASSIGNED status for more than 3 months without any
activity. Resetting it to NEW.
Please assign it back to yourself if you're still working on this.
Comment 9 QA Administrators 2024-05-03 03:16:39 UTC
Dear Mike Kaganski,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug