Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Compiled QtWebEngineProcess.exe crashed 1 sec after loading webpage



  • I am trying to figure out what is needed to compile QtWebEngine properly. On my release build, currently I tried to load www.youtube.com and the QtWebEngineProcess.exe will crash after I saw the youtube page show up for 1 sec.

    This is the command and configure that I used.

    CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat" 
    SET _ROOT=F:\lib\Qt\Qt5.13.2\5.13.2\Src
    SET PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH%
    
    configure -opensource -confirm-license -no-icu -opengl desktop -qt-libpng -qt-libjpeg -nomake examples -nomake tests -no-compile-examples -prefix F:\lib\Qt\Qt5.13.2\5.13.2\msvc2019x86 -force-debug-info -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtdatavis3d -skip qtgamepad -skip qtmacextras -skip qtpurchasing -skip qtremoteobjects -skip qtx11extras
    
    nmake
    nmake install
    

    Then I build webengine separately.
    I create a empty folder and ran the following commands:

    CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsamd64_x86.bat"
    F:\lib\Qt\Qt5.13.2\5.13.2\msvc2019x86\bin\qmake.exe F:\lib\Qt\Qt5.13.2\5.13.2\Src\qtwebengine -- -webengine-proprietary-codecs
    

    However, I have no crash using the precompiled binaries dll and webengine from Qt website. 32 bits msvc2017. I have some custom changes and fixes so I need to compile QT instead of using the precompiled binaries.

    Anyone knows what is the configure used by Qt to compile their precompiled binaries? Thanks.


  • Lifetime Qt Champion

    @lttlflla What crash is that? Do you have a stack trace? Without more information only guessing is possible.



  • @jsulm
    Here is the call stack:
    ```
    KernelBase.dll!74db4622() Unknown
    KernelBase.dll![Frames below may be incorrect and/or missing, no symbols loaded for KernelBase.dll] Unknown
    Qt5WebEngineCore.dll!blink::V8Initializer::MessageHandlerInWorker(class v8::Local<class v8::Message>,class v8::Local<class v8::Value>) C++
    Qt5WebEngineCore.dll!v8::Utils::ReportOOMFailure(class v8::internal::Isolate *,char const *,bool) C++
    Qt5WebEngineCore.dll!v8::internal::V8::FatalProcessOutOfMemory(class v8::internal::Isolate *,char const *,bool) C++
    Qt5WebEngineCore.dll!v8::internal::Heap::FatalProcessOutOfMemory(char const *) C++
    Qt5WebEngineCore.dll!v8::internal::Factory::NewPropertyArray(int,enum v8::internal::PretenureFlag) C++
    Qt5WebEngineCore.dll!v8::internal::JSFunction::MarkForOptimization(enum v8::internal::ConcurrencyMode) C++
    Qt5WebEngineCore.dll!v8::internal::JSObject::MigrateToMap(class v8::internal::Handle<class v8::internal::JSObject>,class v8::internal::Handle<class v8::internal::Map>,int) C++
    Qt5WebEngineCore.dll!v8::internal::JSObject::MigrateInstance(class v8::internal::Handle<class v8::internal::JSObject>) C++
    Qt5WebEngineCore.dll!v8::internal::LoadIC::Load(class v8::internal::Handle<class v8::internal::Object>,class v8::internal::Handle<class v8::internal::Name>) C++
    Qt5WebEngineCore.dll!v8::internal::Runtime_LoadIC_Miss(int,unsigned int *,class v8::internal::Isolate *) C++
    Qt5WebEngineCore.dll!_Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit() Unknown
    Qt5WebEngineCore.dll!_Builtins_LdaNamedPropertyHandler() Unknown
    Qt5WebEngineCore.dll!_Builtins_InterpreterEntryTrampoline() Unknown
    Qt5WebEngineCore.dll!_Builtins_InterpreterEntryTrampoline() Unknown
    Qt5WebEngineCore.dll!_Builtins_InterpreterEntryTrampoline() Unknown
    Qt5WebEngineCore.dll!_Builtins_JSEntryTrampoline() Unknown
    Qt5WebEngineCore.dll!_Builtins_JSEntry() Unknown
    Qt5WebEngineCore.dll!v8::internal::StackGuard::InitThread(class v8::internal::ExecutionAccess const &) C++
    Qt5WebEngineCore.dll!v8::internal::Execution::Call(class v8::internal::Isolate *,class v8::internal::Handle<class v8::internal::Object>,class v8::internal::Handle<class v8::internal::Object>,int,class v8::internal::Handle<class v8::internal::Object> * const) C++
    Qt5WebEngineCore.dll!v8::Script::Run(class v8::Local<class v8::Context>) C++
    Qt5WebEngineCore.dll!blink::V8ScriptRunner::RunCompiledScript(class v8::Isolate *,class v8::Local<class v8::Script>,class blink::ExecutionContext *) C++
    Qt5WebEngineCore.dll!blink::ScriptController::ExecuteScriptAndReturnValue(class v8::Local<class v8::Context>,class blink::ScriptSourceCode const &,class blink::KURL const &,enum blink::SanitizeScriptErrors,class blink::ScriptFetchOptions const &) C++
    Qt5WebEngineCore.dll!blink::ScriptController::EvaluateScriptInMainWorld(class blink::ScriptSourceCode const &,class blink::KURL const &,enum blink::SanitizeScriptErrors,class blink::ScriptFetchOptions const &,enum blink::ScriptController::ExecuteScriptPolicy) C++
    Qt5WebEngineCore.dll!blink::ScriptController::ExecuteScriptInMainWorld(class blink::ScriptSourceCode const &,class blink::KURL const &,enum blink::SanitizeScriptErrors,class blink::ScriptFetchOptions const &) C++
    Qt5WebEngineCore.dll!blink::ClassicScript::RunScript(class blink::LocalFrame *,class blink::SecurityOrigin const *) C++
    Qt5WebEngineCore.dll!blink::PendingScript::ExecuteScriptBlockInternal(class blink::Script *,class blink::ScriptElementBase ,bool,bool,bool,class base::TimeTicks,bool) C++
    Qt5WebEngineCore.dll!blink::PendingScript::ExecuteScriptBlock(class blink::KURL const &) C++
    Qt5WebEngineCore.dll!blink::ScriptLoader::PrepareScript(class WTF::TextPosition const &,enum blink::ScriptLoader::LegacyTypeSupport) C++
    Qt5WebEngineCore.dll!blink::HTMLParserScriptRunner::ProcessScriptElementInternal(class blink::Element ,class WTF::TextPosition const &) C++
    Qt5WebEngineCore.dll!blink::HTMLParserScriptRunner::ProcessScriptElement(class blink::Element ,class WTF::TextPosition const &) C++
    Qt5WebEngineCore.dll!blink::HTMLDocumentParser::ProcessTokenizedChunkFromBackgroundParser(class std::unique_ptr<struct blink::HTMLDocumentParser::TokenizedChunk,struct std::default_delete<struct blink::HTMLDocumentParser::TokenizedChunk> >) C++
    Qt5WebEngineCore.dll!blink::HTMLDocumentParser::PumpPendingSpeculations(void) C++
    Qt5WebEngineCore.dll!blink::TaskHandle::Runner::Run(class blink::TaskHandle const &) C++
    Qt5WebEngineCore.dll!base::internal::FunctorTraits<void ( base::internal::CancelableCallbackImpl<class base::RepeatingCallback<void > >::
    )(class base::UnguessableToken const &),void>::Invoke<void ( base::internal::CancelableCallbackImpl<class base::RepeatingCallback<void > >::
    )(class base::UnguessableToken const &),class base::WeakPtr<class base::internal::CancelableCallbackImpl<class base::RepeatingCallback<void > > > const &,class base::UnguessableToken const &>(void ( base::internal::CancelableCallbackImpl<class base::RepeatingCallback<void > >::
    )(class base::UnguessableToken const &),class base::WeakPtr<class base::internal::CancelableCallbackImpl<class base::RepeatingCallback<void > > > const &,class base::UnguessableToken const &) C++
    Qt5WebEngineCore.dll!base::internal::InvokeHelper<1,void>::MakeItSo<void ( base::internal::CancelableCallbackImpl<class base::RepeatingCallback<void > >::*const &)(class base::UnguessableToken const &),class base::WeakPtr<class base::internal::CancelableCallbackImpl<class base::RepeatingCallback<void > > > const &,class base::UnguessableToken const &>(void ( base::internal::CancelableCallbackImpl<class base::RepeatingCallback<void > >::const &)(class base::UnguessableToken const &),class base::WeakPtr<class base::internal::CancelableCallbackImpl<class base::RepeatingCallback<void > > > const &,class base::UnguessableToken const &) C++
    Qt5WebEngineCore.dll!base::internal::Invoker<struct base::internal::BindState<void ( blink::AnimationWorkletMutatorDispatcherImpl::
    )(class WTF::String const &),class base::WeakPtr<class blink::AnimationWorkletMutatorDispatcherImpl>,class WTF::String>,void >::Run(class base::internal::BindStateBase *) C++
    Qt5WebEngineCore.dll!base::debug::TaskAnnotator::RunTask(char const *,struct base::PendingTask ) C++
    Qt5WebEngineCore.dll!base::sequence_manager::internal::ThreadControllerImpl::DoWork(enum base::sequence_manager::internal::ThreadControllerImpl::WorkType) C++
    Qt5WebEngineCore.dll!base::internal::Invoker<struct base::internal::BindState<void ( base::sequence_manager::internal::ThreadControllerImpl::
    )(enum base::sequence_manager::internal::ThreadControllerImpl::WorkType),class base::WeakPtr<class base::sequence_manager::internal::ThreadControllerImpl>,enum base::sequence_manager::internal::ThreadControllerImpl::WorkType>,void >::Run(class base::internal::BindStateBase *) C++
    Qt5WebEngineCore.dll!base::debug::TaskAnnotator::RunTask(char const *,struct base::PendingTask *) C++
    Qt5WebEngineCore.dll!base::MessageLoopImpl::RunTask(struct base::PendingTask *) C++
    Qt5WebEngineCore.dll!base::MessageLoopImpl::DoWork(void) C++
    Qt5WebEngineCore.dll!base::MessagePumpDefault::Run(class base::MessagePump::Delegate *) C++
    Qt5WebEngineCore.dll!base::RunLoop::Run(void) C++
    Qt5WebEngineCore.dll!content::RendererMain(struct content::MainFunctionParams const &) C++
    Qt5WebEngineCore.dll!content::RunOtherNamedProcessTypeMain(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,struct content::MainFunctionParams const &,class content::ContentMainDelegate *) C++
    Qt5WebEngineCore.dll!content::ContentMainRunnerImpl::Run(bool) C++
    Qt5WebEngineCore.dll!content::ContentServiceManagerMainDelegate::RunEmbedderProcess(void) C++
    Qt5WebEngineCore.dll!service_manager::Main(struct service_manager::MainParams const &) C++
    Qt5WebEngineCore.dll!content::ContentMain(struct content::ContentMainParams const &) C++

    Qt5WebEngineCore.dll!QtWebEngine::processMain(int argc, const char * * argv) Line 78 C++



  • @jsulm

    There is also this console output:
    <--- Last few GCs --->

    [17644:01327278] 8234 ms: Mark-sweep 0.3 (1.8) -> 0.3 (1.8) MB, 3.7 / 1.5 ms (+ 0.9 ms in 3 steps since start of marking, biggest step 0.8 ms, walltime since start of marking 5 ms) (average mu = 0.999, current mu = 0.999) finalize incremental marking[17644:01327278] 8838 ms: Mark-sweep 0.3 (1.8) -> 0.3 (1.8) MB, 1.5 / 0.8 ms (+ 0.8 ms in 4 steps since start of marking, biggest step 0.8 ms, walltime since start of marking 3 ms) (average mu = 0.999, current mu = 0.996) finalize incremental marking

    <--- JS stacktrace --->

    ==== JS stack trace =========================================

    0: ExitFrame [pc: 1037DC34]
    1: StubFrame [pc: 103AE358]
    

    Security context: 0x48885b29 <Window map = 2620D405>
    2: e [488A3E55] [chrome-error://chromewebdata/:5653] [bytecode=488B2561 offset=11](this=0x51d911a1 <L map = 262162D5>,0x51d90ff5 <s map = 26214485>,0x51d98809 <HTMLDivElement map = 26214C7D>)
    3: jstProcess [488A3EBD] [chrome-error://chromewebdata/:5657] [bytecode=488A5A4D offset=292](this=0x3dfd2b29 <JSGlobal Object...

    Exception thrown at 0x74DB4622 (KernelBase.dll) in QtWebEngineProcess.exe: 0xE0000008.
    Unhandled exception at 0x74DB4622 (KernelBase.dll) in QtWebEngineProcess.exe: 0xE0000008.



  • I had success with using the 2017 toolset instead.

    In addition I had to used the version from git instead of the offline installer because I was encountering missing precompiled header error while compiling webengine using the offline installer version. With the git version, it does not skip over webengine while compiling and can compile Qt with webengine in one go.

    command to download Qt from git:

    git clone git://code.qt.io/qt/qt5.git
    cd qt5
    --git checkout tag version, i.e : 
    git checkout v5.13.2
    perl init-repository --module-subset=all -f
    

    These are the commands and configure options which I had used:

    CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64_x86 -vcvars_ver=14.16
    SET _ROOT=F:\lib\Qt\Qt5.13Git\qt5
    SET PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH%
    
    F:\lib\Qt\Qt5.13Git\qt5\configure -opensource -confirm-license -force-debug-info -no-icu -opengl desktop -qt-libpng -qt-libjpeg -nomake examples -nomake tests -no-compile-examples -prefix F:\lib\Qt\Qt5.13Git\msvc2019x86_release_ssl -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtdatavis3d -skip qtgamepad -skip qtmacextras -skip qtpurchasing -skip qtremoteobjects -skip qtx11extras -webengine-proprietary-codecs -openssl-linked OPENSSL_LIBS="-llibssl -llibcrypto -lws2_32 -lAdvapi32 -lcrypt32 -lUser32" -I F:\lib\openssl-1.1.1d\win32static\include -L F:\lib\openssl-1.1.1d\win32static\lib
    

    I also switched to use jom instead of nmake, it certainly made the build much faster for the non webengine part.

    jom
    jom install
    

Log in to reply