Crash when using Save Online in a selfbuilt MuseScore using Qt 5.14.2 or 5.15.0 RC2

• May 20, 2020 - 11:57
Reported version
3.x-dev
Type
Functional
Frequency
Few
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
No
Project

MuseScore does upload the score apparently (it is on musescore.com afterwards, but then crashes.

Might need to get reported to the Qt folks


Comments

(Quite useless) Stack trace in VS2019:

> Qt5WebEngineCore.dll!000007fec1ca3306() Unbekannt
Qt5WebEngineCore.dll!000007fec1c18236() Unbekannt
Qt5WebEngineCore.dll!000007febed8ad53() Unbekannt
Qt5WebEngineCore.dll!000007fec1cbae2a() Unbekannt
Qt5WebEngineCore.dll!000007febe87ede3() Unbekannt
Qt5WebEngineCore.dll!000007febff241f5() Unbekannt
Qt5WebEngineCore.dll!000007febffb478f() Unbekannt
Qt5WebEngineCore.dll!000007febffb42a2() Unbekannt
Qt5WebEngineCore.dll!000007febff18df4() Unbekannt
Qt5WebEngineCore.dll!000007febff19662() Unbekannt
Qt5WebEngineCore.dll!000007febffb4c32() Unbekannt
Qt5WebEngineCore.dll!000007febff4c4e9() Unbekannt
Qt5WebEngineCore.dll!000007fec18d5fad() Unbekannt
Qt5WebEngineCore.dll!000007febff4f965() Unbekannt
Qt5WebEngineCore.dll!000007febff1a668() Unbekannt
kernel32.dll!0000000076f8556d() Unbekannt
ntdll.dll!00000000770e372d() Unbekannt

Seems I'm lacking Qt5WebEngineCore.pdb and/or Qt5WebEngineCored.pdb?

Title Crash when using Save Online in a selfbuilt MuseScore using Qt 5.15 Crash when using Save Online in a selfbuilt MuseScore using Qt 5.14.2 or 5.15.0 RC2
Frequency Once Few

Just reproduced this in VS2019 16.6 using Qt 5.14.2.

Crash:

Exception thrown: read access violation.
content::WebContentsDelegate::GetJavaScriptDialogManager[virtual](...) returned nullptr.

Function where the crash occurs:

void WebContentsDelegateQt::CloseContents(content::WebContents *source)
{
    m_viewClient->close();
    GetJavaScriptDialogManager(source)->CancelDialogs(source, /* whatever?: */false);
}

Stack trace:

Qt5WebEngineCore.dll!QtWebEngineCore::WebContentsDelegateQt::CloseContents(content::WebContents * source) Line 256
Qt5WebEngineCore.dll!content::WebContentsImpl::Close(content::RenderViewHost * rvh) Line 5882
[Inline Frame] Qt5WebEngineCore.dll!base::DispatchToMethodImpl(content::RenderWidgetHostImpl * const &) Line 52
[Inline Frame] Qt5WebEngineCore.dll!base::DispatchToMethod(content::RenderWidgetHostImpl * const &) Line 60
[Inline Frame] Qt5WebEngineCore.dll!IPC::DispatchToMethod(content::RenderWidgetHostImpl *) Line 51
Qt5WebEngineCore.dll!IPC::MessageT,void>::Dispatch(const IPC::Message * msg, content::RenderWidgetHostImpl * obj, content::RenderWidgetHostImpl * sender, void * parameter, void(content::RenderWidgetHostImpl::*)() func) Line 146
Qt5WebEngineCore.dll!content::RenderWidgetHostImpl::OnMessageReceived(const IPC::Message & msg) Line 618
Qt5WebEngineCore.dll!content::RenderProcessHostImpl::OnMessageReceived(const IPC::Message & msg) Line 3358
Qt5WebEngineCore.dll!IPC::ChannelProxy::Context::OnDispatchMessage(const IPC::Message & message) Line 324
[Inline Frame] Qt5WebEngineCore.dll!base::OnceCallback::Run() Line 98
Qt5WebEngineCore.dll!base::TaskAnnotator::RunTask(const char * trace_event_name, base::PendingTask * pending_task) Line 142
Qt5WebEngineCore.dll!base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::sequence_manager::LazyNow * continuation_lazy_now, bool * ran_task) Line 366
Qt5WebEngineCore.dll!base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() Line 270
[Inline Frame] Qt5WebEngineCore.dll!QtWebEngineCore::MessagePumpForUIQt::handleScheduledWork() Line 204
[Inline Frame] Qt5WebEngineCore.dll!QtWebEngineCore::MessagePumpForUIQt::::operator()() Line 117
[Inline Frame] Qt5WebEngineCore.dll!std::_Invoker_functor::_Call(QtWebEngineCore::MessagePumpForUIQt:: &)
[Inline Frame] Qt5WebEngineCore.dll!std::invoke(QtWebEngineCore::MessagePumpForUIQt:: &)
[Inline Frame] Qt5WebEngineCore.dll!std::_Invoker_ret::_Call(QtWebEngineCore::MessagePumpForUIQt:: &)
Qt5WebEngineCore.dll!std::_Func_impl_no_alloc<,void>::_Do_call()
Qt5Core.dll!QObject::event(QEvent * e) Line 1366
Qt5Widgets.dll!QApplicationPrivate::notify_helper(QObject * receiver, QEvent * e) Line 3687
Qt5Widgets.dll!QApplication::notify(QObject * receiver, QEvent * e) Line 3639
Qt5Core.dll!QCoreApplication::notifyInternal2(QObject * receiver, QEvent * event) Line 1075
[Inline Frame] Qt5Core.dll!QCoreApplication::sendEvent(QObject *) Line 1470
Qt5Core.dll!QCoreApplicationPrivate::sendPostedEvents(QObject * receiver, int event_type, QThreadData * data) Line 1815
qwindows.dll!QWindowsGuiEventDispatcher::sendPostedEvents() Line 82
Qt5Core.dll!QEventDispatcherWin32::processEvents(QFlags flags) Line 525
qwindows.dll!QWindowsGuiEventDispatcher::processEvents(QFlags flags) Line 75
[Inline Frame] Qt5Core.dll!QEventLoop::processEvents(QFlags) Line 138
Qt5Core.dll!QEventLoop::exec(QFlags flags) Line 225
Qt5Core.dll!QCoreApplication::exec() Line 1383
MuseScore3.exe!Ms::runApplication(int & argc, char * * av) Line 7835
MuseScore3.exe!main(int argc, char * * argv) Line 92
[Inline Frame] MuseScore3.exe!invoke_main() Line 78
MuseScore3.exe!__scrt_common_main_seh() Line 288
kernel32.dll!BaseThreadInitThunk() Unknown
ntdll.dll!RtlUserThreadStart() Unknown

I see in QTBUG-84355 that the fix didn't make it into Qt 5.15.0, but I just built MuseScore with Qt 5.15.0 and can no longer reproduce the crash.

Edit: Never mind. The crash still occurs when I click the Save button after uploading.

Still crashed for me in latest master, but indeed a step later. Might be a race condition, timing related.
The Qt folks do mention a workaround though: the issue seems to be workaroundable by delaying the close
Maybe we could do that in out code?