Description: LibreOffice crashes only if the hyperlink is set to [New Document], [XML Form Document], or [Edit later]. Steps to Reproduce: 1.[Insert]-[Hyperlink] 2.[New Document] [Edit later] File: Something File type: XML Form Document 3.[Apply]or[OK] button click Actual Results: Force close after a few seconds. Expected Results: Continue work. Reproducible: Always User Profile Reset: No Additional Info: Version: 7.3.1.1 / LibreOffice Community Build ID: 75bdb7e01371355b35ec003f0e496b8afe00a42b CPU threads: 2; OS: Linux 5.13; UI render: default; VCL: gtk3 Locale: ja-JP (ja_JP.UTF-8); UI: ja-JP Calc: threaded
I made a mistake. Description: LibreOffice crashes only if the hyperlink is set to [New Document], [XML Form Document],[Edit later].
Can confirm in: Version: 7.3.0.3 (x64) / LibreOffice Community Build ID: 0f246aa12d0eee4a0f7adcefbf7c878fc2238db3 CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win Locale: en-US (en_US); UI: en-US Calc: threaded Crashed a few seconds after pressing "Apply" in Step 3.
To be determined if regression, if it didn't happen in older LO, would be High.
I tested on Windows + LO Portable. 4.3.7 nomal(wait a few seconds) 4.4 A dialog appears Fatal Error TransactionManage... Owner instance already closed.Call was rejected! 5.X A dialog appears Fatal Error Frame disposed. 6.0- Force close after a few seconds.
(In reply to Saburo from comment #4) > I tested on Windows + LO Portable. > > 4.3.7 nomal(wait a few seconds) > 4.4 A dialog appears > Fatal Error > TransactionManage... > Owner instance already closed.Call was rejected! regression
Repro in Calc with: Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: cae0daff1dd8bd60208892c792948c0cd2b0eeec CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded And in 7.5: Version: 7.5.1.2 (X86_64) / LibreOffice Community Build ID: fcbaee479e84c6cd81291587d2ee68cba099e129 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded Crash report: https://crashreport.libreoffice.org/stats/crash_details/339cd3bd-2715-4ea9-9f5f-89dd3a948d05
(In reply to Stéphane Guillou (stragu) from comment #6) > Repro in Calc with: (crash report was in Writer)
Code pointer: 269 OUString aStrFlags('S'); 270 if (xExecuteInfo->bRbtEditLater) 271 { 272 aStrFlags += "H"; 273 } 274 SfxStringItem aFlags (SID_OPTIONS, aStrFlags); 275 276 // open url 277 const SfxPoolItem* pReturn = xExecuteInfo->pDispatcher->ExecuteList( 278 SID_OPENDOC, SfxCallMode::SYNCHRON, 279 { &aName, &aFlags, &aFrame, &aReferer }); (see https://opengrok.libreoffice.org/xref/core/cui/source/dialogs/hldocntp.cxx?r=61346723#269) If I remove lines 269-> 273 and use SfxStringItem aFlags (SID_OPTIONS, "S"); it works as we may expect since it corresponds to the "Edit now" case. I also try to use SfxCallMode::ASYNCHRON when we're in the "Edit later" case but I got: warn:legacy.tools:31063:31063:sfx2/source/appl/appopen.cxx:1019: Hidden load process must be done synchronously! and it fails later in the same way. With "Edit now", I also noticed this log: "is there a frame int 0x5593c7db2280" It seems quite a mess here :-(.
Caolán: I don't know if XML forms are often used so I'm not sure a crash on them would be reported in the crashreport but would you have some idea here? I retrieved some info in https://bugs.documentfoundation.org/show_bug.cgi?id=147503#c8 but then I'm a bit stuck.
Can't quite be sure what should happen but a place to start thinking is in NewXForms where in the non-hidden (edit now) case xDocSh->nOwnerLockCount is 2 after SfxViewFrame::DisplayNewDocument so when xDocSh goes out of scope the document isn't closed, while in hidden the nOwnerLockCount is 1 and on out of scope goes to 0 and gets closed which seems to be the difference.
I can make it not crash by changing NewXForms from SfxViewFrame::DisplayNewDocument( *xDocSh, rReq ); to SfxViewFrame* pViewFrame = SfxViewFrame::DisplayNewDocument( *xDocSh, rReq ); if (pViewFrame) pViewFrame->GetFrame().Appear(); but then the XML Form Document will appear for a moment
I'm willing to give https://gerrit.libreoffice.org/c/core/+/150891 a go in trunk, seems to work and I don't see a (obvious) downside.
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/5be0f62621a5ef66438cf2dc660be8e524588c15 tdf#147503 don't use SfxObjectShellLock for new xml forms document It will be available in 7.6.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.