QWebEnginePage runJavaScript hangs when execution time is longer
-
Hello,
I am trying to execute JavaScript command by runJavascript function in QWebEnginePage.If the execution time is smaller it runs fine but if execution time exceed limit it hangs doesn't run even next command after that. After sometime renderProcessTerminate event fires.
webEngine.page().runJavaScript ("console.log('started'); Za(); console.log('finished');", [](const QVariant &v){qDebug() << v;});
JavaScript function Za() sometime take longer to execute when it takes longer "finished" doesn't show up. Even callback doesn't work.
Please can you help me set JavaScript unlimited execution time.
-
@Asif-QtAddict
You're not intended to run a script which needs to take that long or blocks!Depending on what it does, what about moving it into the "document ready" event?
-
@Asif-QtAddict
I don't know what relevance 32- vs 64-bit has. IfQWebEngineView
uses 32-bit Chromium, than that's what it uses. -
@Asif-QtAddict
Oh! Well I have no idea why a 64-bit Chromium should behave any differently from a 32-bit one. If all it is is that it happens to be faster, presumably the problem will re-arise when the operation takes longer. Who knows!