From d82bd06247d0869e619450d6d61c252e08bc1fd2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 7 Dec 2023 19:59:37 +0530 Subject: [PATCH] Check for webengine render process crash in build test --- manual/faq.rst | 2 +- src/calibre/test_build.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/manual/faq.rst b/manual/faq.rst index 1feee85cff..17db6d5a37 100644 --- a/manual/faq.rst +++ b/manual/faq.rst @@ -880,7 +880,7 @@ incompatibility with your system's GPU (graphics) drivers. Try updating these first, and reboot. If that does not fix it, you can set the ``QTWEBENGINE_CHROMIUM_FLAGS`` environment variable to the value ``--disable-gpu`` to turn off hardware acceleration. See -`this page `_ for details. +`this page `_ for details. Using the viewer or doing any conversions results in a permission denied error on Windows diff --git a/src/calibre/test_build.py b/src/calibre/test_build.py index dc4ab4ccbc..de38ab04e0 100644 --- a/src/calibre/test_build.py +++ b/src/calibre/test_build.py @@ -373,7 +373,12 @@ class BuildTest(unittest.TestCase): p.runJavaScript('1 + 1', callback) p.printToPdf(print_callback) + def render_process_crashed(status, exit_code): + print('Qt WebEngine Render process crashed with status:', status, 'and exit code:', exit_code) + QApplication.instance().quit() + p.titleChanged.connect(do_webengine_test) + p.renderProcessTerminated.connect(render_process_crashed) p.runJavaScript(f'document.title = "test-run-{os.getpid()}";') timeout = 10 QTimer.singleShot(timeout * 1000, lambda: QApplication.instance().quit())