From pascal.huerst at gmail.com Thu May 4 16:24:07 2017 From: pascal.huerst at gmail.com (Pascal Huerst) Date: Thu, 4 May 2017 16:24:07 +0200 Subject: [Qtwebengine] QVirtualKeyboard not working with QWebEngineView? Message-ID: Hey everyone, I'm trying to use the Virtual Keyboard on a website, rendered within a QWebEngineView, but the keyboard does not pop up if I click into a text field. If I place a QLineEdit, next to the QWebEngineView and click into it, the Virtual Keyboard works as expected. Interestingly, if I clicked into the QLineEdit once, it starts also popping up, when clicking into the text field on the web page, but it still does not receive any key strokes. Somehow I can not belief, that the Virtual Keyboard is not working within QWebEngineView, since this seems a rather common use case to me. Did I miss something? Does someone else see this problem? To reproduce, any example using QWebEngineView can be used. The only modification necessary is to paste the following line, before QApplication(...) is created: qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard")); I'm working on Fedora 25 with Wayland. Thanks, Pascal From me at the-compiler.org Fri May 5 14:39:38 2017 From: me at the-compiler.org (Florian Bruhin) Date: Fri, 5 May 2017 14:39:38 +0200 Subject: [Qtwebengine] QVirtualKeyboard not working with QWebEngineView? In-Reply-To: References: Message-ID: <20170505123938.7vwwtp6ufdbtjrnh@hooch.localdomain> Hey, On Thu, May 04, 2017 at 04:24:07PM +0200, Pascal Huerst wrote: > I'm trying to use the Virtual Keyboard on a website, rendered within a > QWebEngineView, but the keyboard does not pop up if I click into a text > field. If I place a QLineEdit, next to the QWebEngineView and click into > it, the Virtual Keyboard works as expected. Interestingly, if I clicked > into the QLineEdit once, it starts also popping up, when clicking into > the text field on the web page, but it still does not receive any key > strokes. Somehow I can not belief, that the Virtual Keyboard is not > working within QWebEngineView, since this seems a rather common use case > to me. Qt 5.8 had various IME-related issues with QtWebEngine, with many of them fixed in Qt 5.9. Can you try with that? Florian -- https://www.qutebrowser.org | me at the-compiler.org (Mail/XMPP) GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc I love long mails! | https://email.is-not-s.ms/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: From e-ruei1 at ti.com Fri May 5 16:17:48 2017 From: e-ruei1 at ti.com (Ruei, Eric) Date: Fri, 5 May 2017 14:17:48 +0000 Subject: [Qtwebengine] Qt:WebBrowser1.0: how to configure proxy Message-ID: <009C030982313E4589C6BC55FBF1E82A2536A4E2@DFLE09.ent.ti.com> To whom it may concern: I have finally been able to run the touch-friendly QT WebBrower after our yocto build problems are resolved. The browser works well and it is very much user-friendly. The only issue is that I am not able to setup the web proxy which is not one of the settings options. I try to use the chromium command-line option –proxy-server, but it does not work, either. When I configure and save the proxy setting at one Qt Browser such as the QT Webwidgt brower, the same setting is used by other Qt browser such as Qt webenginewidget demo browser. However, the same is not applicable to the qtwebengine-based Qt WebBrower. Your kind assistance will be highly appreciated. Best regards, Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kai.Koehne at qt.io Fri May 5 16:43:15 2017 From: Kai.Koehne at qt.io (Kai Koehne) Date: Fri, 5 May 2017 14:43:15 +0000 Subject: [Qtwebengine] Qt:WebBrowser1.0: how to configure proxy In-Reply-To: <009C030982313E4589C6BC55FBF1E82A2536A4E2@DFLE09.ent.ti.com> References: <009C030982313E4589C6BC55FBF1E82A2536A4E2@DFLE09.ent.ti.com> Message-ID: > -----Original Message----- > From: QtWebEngine [mailto:qtwebengine-bounces+kai.koehne=qt.io at qt- > project.org] On Behalf Of Ruei, Eric > Sent: Friday, May 05, 2017 4:18 PM > To: qtwebengine at qt-project.org > Subject: [Qtwebengine] Qt:WebBrowser1.0: how to configure proxy > > To whom it may concern: > > I have finally been able to run the touch-friendly QT WebBrower after our > yocto build problems are resolved. > > The browser works well and it is very much user-friendly. The only issue is > that I am not able to setup the web proxy which is not one of the settings > options. It's true that the Qt WebBrowser does still miss a settings dialog for custom proxy settings. Also, it does not feature a UI yet to ask for username and password. Feel free to open a suggestion for this. Anyhow, it should pick up the system browser settings (http_proxy environment variable) automatically, as long as you have configured Qt with -system-proxies (default since Qt 5.8). > I try to use the chromium command-line option –proxy-server, but it does > not work, either. > > When I configure and save the proxy setting at one Qt Browser such as the > QT Webwidgt brower, the same setting is used by other Qt browser such as > Qt webenginewidget demo browser. This is weird, because these are application specific. Anyhow, I'm not sure which application you mean by 'Qt Webwidget Browser'. Regards Kai From e-ruei1 at ti.com Fri May 5 17:00:03 2017 From: e-ruei1 at ti.com (Ruei, Eric) Date: Fri, 5 May 2017 15:00:03 +0000 Subject: [Qtwebengine] Qt:WebBrowser1.0: how to configure proxy In-Reply-To: References: <009C030982313E4589C6BC55FBF1E82A2536A4E2@DFLE09.ent.ti.com> Message-ID: <009C030982313E4589C6BC55FBF1E82A2536A557@DFLE09.ent.ti.com> Hi, Kai: Thank you so much! It works with the system browser settings. By the way, there was typo at my previous e-mail. What I meant was the Qt Webkitwidgets example browser. Best regards, Eric -----Original Message----- From: Kai Koehne [mailto:Kai.Koehne at qt.io] Sent: Friday, May 05, 2017 10:43 AM To: Ruei, Eric; qtwebengine at qt-project.org Subject: RE: [Qtwebengine] Qt:WebBrowser1.0: how to configure proxy > -----Original Message----- > From: QtWebEngine [mailto:qtwebengine-bounces+kai.koehne=qt.io at qt- > project.org] On Behalf Of Ruei, Eric > Sent: Friday, May 05, 2017 4:18 PM > To: qtwebengine at qt-project.org > Subject: [Qtwebengine] Qt:WebBrowser1.0: how to configure proxy > > To whom it may concern: > > I have finally been able to run the touch-friendly QT WebBrower after > our yocto build problems are resolved. > > The browser works well and it is very much user-friendly. The only > issue is that I am not able to setup the web proxy which is not one of > the settings options. It's true that the Qt WebBrowser does still miss a settings dialog for custom proxy settings. Also, it does not feature a UI yet to ask for username and password. Feel free to open a suggestion for this. Anyhow, it should pick up the system browser settings (http_proxy environment variable) automatically, as long as you have configured Qt with -system-proxies (default since Qt 5.8). > I try to use the chromium command-line option –proxy-server, but it > does not work, either. > > When I configure and save the proxy setting at one Qt Browser such as > the QT Webwidgt brower, the same setting is used by other Qt browser > such as Qt webenginewidget demo browser. This is weird, because these are application specific. Anyhow, I'm not sure which application you mean by 'Qt Webwidget Browser'. Regards Kai From pvarga at inf.u-szeged.hu Tue May 9 09:59:29 2017 From: pvarga at inf.u-szeged.hu (Peter Varga) Date: Tue, 9 May 2017 09:59:29 +0200 Subject: [Qtwebengine] QVirtualKeyboard not working with QWebEngineView? In-Reply-To: <20170505123938.7vwwtp6ufdbtjrnh@hooch.localdomain> References: <20170505123938.7vwwtp6ufdbtjrnh@hooch.localdomain> Message-ID: On 05/05/2017 02:39 PM, Florian Bruhin wrote: > Hey, > > On Thu, May 04, 2017 at 04:24:07PM +0200, Pascal Huerst wrote: >> I'm trying to use the Virtual Keyboard on a website, rendered within a >> QWebEngineView, but the keyboard does not pop up if I click into a text >> field. If I place a QLineEdit, next to the QWebEngineView and click into >> it, the Virtual Keyboard works as expected. Interestingly, if I clicked >> into the QLineEdit once, it starts also popping up, when clicking into >> the text field on the web page, but it still does not receive any key >> strokes. Somehow I can not belief, that the Virtual Keyboard is not >> working within QWebEngineView, since this seems a rather common use case >> to me. > > Qt 5.8 had various IME-related issues with QtWebEngine, with many of > them fixed in Qt 5.9. Can you try with that? > > Florian > > > > _______________________________________________ > QtWebEngine mailing list > QtWebEngine at qt-project.org > http://lists.qt-project.org/mailman/listinfo/qtwebengine > Hi Pascal, Florian is right, several related issues have been fixed in 5.9. However, there are some fixes in 5.8 too. For example, this fix a virtual keyboard issue on macOS: https://codereview.qt-project.org/#/c/181969/3 and here is a test for virtual keyboard: https://codereview.qt-project.org/#/c/180414/ So theoretically the virtual keyboard works but to be honest I haven't tried it with widget yet :) The QtWebBrowser (what is quick based) works: http://code.qt.io/cgit/qt-apps/qtwebbrowser.git/ If you still can reproduce the issue with 5.9 please create a new bug report at https://bugreports.qt.io Please add the following details to the report: - Which OS is affected - Which API you use (I suppose widget) - Which Qt version you use If you could add a minimal example with virtual keyboard issue that would be very helpful. If you could run the corresponding auto test (tst_QWebEngineView::softwareInputPanel) and share the result that would be also very helpful :) Best Regards, Peter From pvarga at inf.u-szeged.hu Tue May 9 11:14:03 2017 From: pvarga at inf.u-szeged.hu (Peter Varga) Date: Tue, 9 May 2017 11:14:03 +0200 Subject: [Qtwebengine] QVirtualKeyboard not working with QWebEngineView? In-Reply-To: References: <20170505123938.7vwwtp6ufdbtjrnh@hooch.localdomain> Message-ID: <86aee97a-59b7-9def-52e4-774e5c8394f8@inf.u-szeged.hu> > Did I miss something? Does someone else see this problem? I tried it, works for me with widget, on Linux with Qt 5.9. I copied the qputenv line to the code as you proposed. From e-ruei1 at ti.com Fri May 12 20:03:22 2017 From: e-ruei1 at ti.com (Ruei, Eric) Date: Fri, 12 May 2017 18:03:22 +0000 Subject: [Qtwebengine] QT5.6.2 to 5.7.1 default behavior changes and qtWebengine ozone bridge In-Reply-To: <1A26B0C1-A936-4E25-BF0E-9EBFF5B46268@qt.io> References: <009C030982313E4589C6BC55FBF1E82A25358F91@DFLE09.ent.ti.com> <76CCF44C-8D37-4AC0-B921-C34A5779CE39@qt.io> <009C030982313E4589C6BC55FBF1E82A253592C1@DFLE09.ent.ti.com> <1A26B0C1-A936-4E25-BF0E-9EBFF5B46268@qt.io> Message-ID: <009C030982313E4589C6BC55FBF1E82A2536D6EC@DFLE09.ent.ti.com> Hi, Alex: Thank you very much for your invaluable help! I have finally resumed to debug the qtwebengine seccomp issue after a long break to other assignments. Regarding the crash as shown below, it is caused by a restricted FUTEX request (FUTEX_UNLOCK_PI) at function RestrictFutex() @syscall_parameters_restrictions.cc Render process exited with code 256 (abnormal exit) /home/a0850410/yocto_builds/sdk400_am5/oe-layersetup/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/qtwebengine/5.7.1+gitAUTOINC+9cc97f0c63_b3c79e92f0-r0.arago0/git/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc:**CRASHING**:futex() failure Received signal 11 SEGV_MAPERR 000000000007 [end of stack trace] I was trying to find out which module initiating the FUTEX call (FUTEX_UNLOCK_PI) and there was no luck. I could not set a breakpoint at or within RestrictFutex(), CrashSIGSYSFutex() and SIGSYSFutexFailure(), i.e. the breakpoints do no work at QtCreator. And the stack trace does not show anything. I wonder that I need to set some build flag or option to enable chromium debugging. Any thoughts and inputs will be highly appreciated! Best regards, Eric From: Alexandru Croitor [mailto:alexandru.croitor at qt.io] Sent: Thursday, March 23, 2017 11:35 AM To: Ruei, Eric Cc: qtwebengine at qt-project.org Subject: Re: [Qtwebengine] QT5.6.2 to 5.7.1 default behavior changes and qtWebengine ozone bridge Hi, I am not aware of the reason for the seccomp crash, but you can find some similar reports with some info at https://bugreports.qt.io/browse/QTBUG-57709 maybe that helps you investigate the issue further. Regarding GLES, I am not very familiar with that code, but it is plausible it is incomplete. You could check if there are any code changes in Qt 5.8.x and in unreleased Qt 5.9.0. Rergards, Alex. On 23 Mar 2017, at 16:14, Ruei, Eric > wrote: Hi, Alexandru: Thank you so much! The information that you provided is extremely helpful and it may take me forever to get without your help! For question #3, we are using Linux kernel 4.9.13 and seccomp-bpf is enabled. With the default setting, the following error occurs continuously and the Seccomp is set to 0 at /proc//status. Render process exited with code 256 (abnormal exit) /home/a0850410/yocto_builds/LTS2017_0/oe-layersetup/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/qtwebengine/5.7.1+gitAUTOINC+9cc97f0c63_b3c79e92f0-r0/git/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc:**CRASHING**:futex() failure Received signal 11 SEGV_MAPERR 000000000007 [end of stack trace] … The qtwebengine demo browser works if seccomp-bpf sandbox is disabled by --disable-seccomp-filter-sandbox. Do you have any idea for question #4? Best regards, Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexandru.croitor at qt.io Mon May 15 09:44:48 2017 From: alexandru.croitor at qt.io (Alexandru Croitor) Date: Mon, 15 May 2017 07:44:48 +0000 Subject: [Qtwebengine] QT5.6.2 to 5.7.1 default behavior changes and qtWebengine ozone bridge In-Reply-To: <009C030982313E4589C6BC55FBF1E82A2536D6EC@DFLE09.ent.ti.com> References: <009C030982313E4589C6BC55FBF1E82A25358F91@DFLE09.ent.ti.com> <76CCF44C-8D37-4AC0-B921-C34A5779CE39@qt.io> <009C030982313E4589C6BC55FBF1E82A253592C1@DFLE09.ent.ti.com> <1A26B0C1-A936-4E25-BF0E-9EBFF5B46268@qt.io> <009C030982313E4589C6BC55FBF1E82A2536D6EC@DFLE09.ent.ti.com> Message-ID: <75923C0B-CAA2-4487-B121-A74C96BF8E6D@qt.io> Hi, I'm not sure how well supported is Qt Creator for embedded device, so I would advise to try setting the breakpoints from command line gdb, as well as checking if the symbols are actually found by GDB. WebEngine by default does not create / include debug symbols for Blink and V8, so if the call happens somewhere inside those components, the breakpoint will not be hit. Note that enabling those debug symbols will substantially increase link time as well RAM used. You can enable them by re-running qmake with something like qmake qt57_source/qtwebengine/qtwebengine.pro CONFIG+="webcore_debug v8base_debug" Those flags are in qtwebengine/src/core/gyp_run.pro Other debug symbols should in theory be there if you are doing a debug build. On 12 May 2017, at 20:03, Ruei, Eric > wrote: Hi, Alex: Thank you very much for your invaluable help! I have finally resumed to debug the qtwebengine seccomp issue after a long break to other assignments. Regarding the crash as shown below, it is caused by a restricted FUTEX request (FUTEX_UNLOCK_PI) at function RestrictFutex() @syscall_parameters_restrictions.cc Render process exited with code 256 (abnormal exit) /home/a0850410/yocto_builds/sdk400_am5/oe-layersetup/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/qtwebengine/5.7.1+gitAUTOINC+9cc97f0c63_b3c79e92f0-r0.arago0/git/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc:**CRASHING**:futex() failure Received signal 11 SEGV_MAPERR 000000000007 [end of stack trace] I was trying to find out which module initiating the FUTEX call (FUTEX_UNLOCK_PI) and there was no luck. I could not set a breakpoint at or within RestrictFutex(), CrashSIGSYSFutex() and SIGSYSFutexFailure(), i.e. the breakpoints do no work at QtCreator. And the stack trace does not show anything. I wonder that I need to set some build flag or option to enable chromium debugging. Any thoughts and inputs will be highly appreciated! Best regards, Eric From: Alexandru Croitor [mailto:alexandru.croitor at qt.io] Sent: Thursday, March 23, 2017 11:35 AM To: Ruei, Eric Cc: qtwebengine at qt-project.org Subject: Re: [Qtwebengine] QT5.6.2 to 5.7.1 default behavior changes and qtWebengine ozone bridge Hi, I am not aware of the reason for the seccomp crash, but you can find some similar reports with some info at https://bugreports.qt.io/browse/QTBUG-57709 maybe that helps you investigate the issue further. Regarding GLES, I am not very familiar with that code, but it is plausible it is incomplete. You could check if there are any code changes in Qt 5.8.x and in unreleased Qt 5.9.0. Rergards, Alex. On 23 Mar 2017, at 16:14, Ruei, Eric > wrote: Hi, Alexandru: Thank you so much! The information that you provided is extremely helpful and it may take me forever to get without your help! For question #3, we are using Linux kernel 4.9.13 and seccomp-bpf is enabled. With the default setting, the following error occurs continuously and the Seccomp is set to 0 at /proc//status. Render process exited with code 256 (abnormal exit) /home/a0850410/yocto_builds/LTS2017_0/oe-layersetup/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/qtwebengine/5.7.1+gitAUTOINC+9cc97f0c63_b3c79e92f0-r0/git/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc:**CRASHING**:futex() failure Received signal 11 SEGV_MAPERR 000000000007 [end of stack trace] … The qtwebengine demo browser works if seccomp-bpf sandbox is disabled by --disable-seccomp-filter-sandbox. Do you have any idea for question #4? Best regards, Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From e-ruei1 at ti.com Wed May 17 00:35:21 2017 From: e-ruei1 at ti.com (Ruei, Eric) Date: Tue, 16 May 2017 22:35:21 +0000 Subject: [Qtwebengine] QT5.6.2 to 5.7.1 default behavior changes and qtWebengine ozone bridge In-Reply-To: <75923C0B-CAA2-4487-B121-A74C96BF8E6D@qt.io> References: <009C030982313E4589C6BC55FBF1E82A25358F91@DFLE09.ent.ti.com> <76CCF44C-8D37-4AC0-B921-C34A5779CE39@qt.io> <009C030982313E4589C6BC55FBF1E82A253592C1@DFLE09.ent.ti.com> <1A26B0C1-A936-4E25-BF0E-9EBFF5B46268@qt.io> <009C030982313E4589C6BC55FBF1E82A2536D6EC@DFLE09.ent.ti.com> <75923C0B-CAA2-4487-B121-A74C96BF8E6D@qt.io> Message-ID: <009C030982313E4589C6BC55FBF1E82A2536E748@DFLE09.ent.ti.com> Hi, Alex: Thanks for the information! With the help of strace, we found out that the FUTEX_UNLOCK_PI (0x07) was invoked once at the process with sandbox restriction as shown below: 3786 16:41:27.554470 futex(0xffffffff, FUTEX_UNLOCK_PI, 0) = -1093335620 It seems to be a bad call with uaddr = -1, but I am more interested in finding which module invokes FUTEX_UNLOCK_PI. Is there a way to find out the originator of the futex system call in this scenario? Best regards, Eric From: Alexandru Croitor [mailto:alexandru.croitor at qt.io] Sent: Monday, May 15, 2017 3:45 AM To: Ruei, Eric Cc: qtwebengine at qt-project.org Subject: Re: [Qtwebengine] QT5.6.2 to 5.7.1 default behavior changes and qtWebengine ozone bridge Hi, I'm not sure how well supported is Qt Creator for embedded device, so I would advise to try setting the breakpoints from command line gdb, as well as checking if the symbols are actually found by GDB. WebEngine by default does not create / include debug symbols for Blink and V8, so if the call happens somewhere inside those components, the breakpoint will not be hit. Note that enabling those debug symbols will substantially increase link time as well RAM used. You can enable them by re-running qmake with something like qmake qt57_source/qtwebengine/qtwebengine.pro CONFIG+="webcore_debug v8base_debug" Those flags are in qtwebengine/src/core/gyp_run.pro Other debug symbols should in theory be there if you are doing a debug build. On 12 May 2017, at 20:03, Ruei, Eric > wrote: Hi, Alex: Thank you very much for your invaluable help! I have finally resumed to debug the qtwebengine seccomp issue after a long break to other assignments. Regarding the crash as shown below, it is caused by a restricted FUTEX request (FUTEX_UNLOCK_PI) at function RestrictFutex() @syscall_parameters_restrictions.cc Render process exited with code 256 (abnormal exit) /home/a0850410/yocto_builds/sdk400_am5/oe-layersetup/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/qtwebengine/5.7.1+gitAUTOINC+9cc97f0c63_b3c79e92f0-r0.arago0/git/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc:**CRASHING**:futex() failure Received signal 11 SEGV_MAPERR 000000000007 [end of stack trace] I was trying to find out which module initiating the FUTEX call (FUTEX_UNLOCK_PI) and there was no luck. I could not set a breakpoint at or within RestrictFutex(), CrashSIGSYSFutex() and SIGSYSFutexFailure(), i.e. the breakpoints do no work at QtCreator. And the stack trace does not show anything. I wonder that I need to set some build flag or option to enable chromium debugging. Any thoughts and inputs will be highly appreciated! Best regards, Eric From: Alexandru Croitor [mailto:alexandru.croitor at qt.io] Sent: Thursday, March 23, 2017 11:35 AM To: Ruei, Eric Cc: qtwebengine at qt-project.org Subject: Re: [Qtwebengine] QT5.6.2 to 5.7.1 default behavior changes and qtWebengine ozone bridge Hi, I am not aware of the reason for the seccomp crash, but you can find some similar reports with some info at https://bugreports.qt.io/browse/QTBUG-57709 maybe that helps you investigate the issue further. Regarding GLES, I am not very familiar with that code, but it is plausible it is incomplete. You could check if there are any code changes in Qt 5.8.x and in unreleased Qt 5.9.0. Rergards, Alex. On 23 Mar 2017, at 16:14, Ruei, Eric > wrote: Hi, Alexandru: Thank you so much! The information that you provided is extremely helpful and it may take me forever to get without your help! For question #3, we are using Linux kernel 4.9.13 and seccomp-bpf is enabled. With the default setting, the following error occurs continuously and the Seccomp is set to 0 at /proc//status. Render process exited with code 256 (abnormal exit) /home/a0850410/yocto_builds/LTS2017_0/oe-layersetup/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/qtwebengine/5.7.1+gitAUTOINC+9cc97f0c63_b3c79e92f0-r0/git/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc:**CRASHING**:futex() failure Received signal 11 SEGV_MAPERR 000000000007 [end of stack trace] … The qtwebengine demo browser works if seccomp-bpf sandbox is disabled by --disable-seccomp-filter-sandbox. Do you have any idea for question #4? Best regards, Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From michal.klocek at qt.io Wed May 17 11:46:51 2017 From: michal.klocek at qt.io (Michal Klocek) Date: Wed, 17 May 2017 11:46:51 +0200 Subject: [Qtwebengine] QT5.6.2 to 5.7.1 default behavior changes and qtWebengine ozone bridge In-Reply-To: <009C030982313E4589C6BC55FBF1E82A2536E748@DFLE09.ent.ti.com> References: <009C030982313E4589C6BC55FBF1E82A25358F91@DFLE09.ent.ti.com> <76CCF44C-8D37-4AC0-B921-C34A5779CE39@qt.io> <009C030982313E4589C6BC55FBF1E82A253592C1@DFLE09.ent.ti.com> <1A26B0C1-A936-4E25-BF0E-9EBFF5B46268@qt.io> <009C030982313E4589C6BC55FBF1E82A2536D6EC@DFLE09.ent.ti.com> <75923C0B-CAA2-4487-B121-A74C96BF8E6D@qt.io> <009C030982313E4589C6BC55FBF1E82A2536E748@DFLE09.ent.ti.com> Message-ID: <41b8abe1-7925-f7d7-fa89-47194fcdfe86@qt.io> Hi Did you try different kernel ? 4.9 had recently some delete-after-use issue afaik see https://patchwork.kernel.org/patch/9634773/ Br Michal On 05/17/2017 12:35 AM, Ruei, Eric via QtWebEngine wrote: > Hi, Alex: > > > > Thanks for the information! > > With the help of strace, we found out that the FUTEX_UNLOCK_PI (0x07) > was invoked once at the process with sandbox restriction as shown below: > > > > 3786 16:41:27.554470 futex(0xffffffff, FUTEX_UNLOCK_PI, 0) = -1093335620 > > > > It seems to be a bad call with uaddr = -1, but I am more interested in > finding which module invokes FUTEX_UNLOCK_PI. > > Is there a way to find out the originator of the futex system call in > this scenario? > > > > Best regards, > > > > Eric > > > > *From:*Alexandru Croitor [mailto:alexandru.croitor at qt.io] > *Sent:* Monday, May 15, 2017 3:45 AM > *To:* Ruei, Eric > *Cc:* qtwebengine at qt-project.org > *Subject:* Re: [Qtwebengine] QT5.6.2 to 5.7.1 default behavior changes > and qtWebengine ozone bridge > > > > Hi, > > > > I'm not sure how well supported is Qt Creator for embedded device, so I > would advise to try setting the breakpoints from command line gdb, as > well as checking if the symbols are actually found by GDB. > > > > WebEngine by default does not create / include debug symbols for Blink > and V8, so if the call happens somewhere inside those components, the > breakpoint will not be hit. Note that enabling those debug symbols will > substantially increase link time as well RAM used. You can enable them > > by re-running qmake with something like > > > > qmake qt57_source/qtwebengine/qtwebengine.pro CONFIG+="webcore_debug > v8base_debug" > > Those flags are in qtwebengine/src/core/gyp_run.pro > > > > Other debug symbols should in theory be there if you are doing a debug > build. > > > > On 12 May 2017, at 20:03, Ruei, Eric > wrote: > > > > Hi, Alex: > > > > Thank you very much for your invaluable help! > > I have finally resumed to debug the qtwebengine seccomp issue after > a long break to other assignments. > > > > Regarding the crash as shown below, it is caused by a restricted > FUTEX request (FUTEX_UNLOCK_PI) at function RestrictFutex() > @syscall_parameters_restrictions.cc > > > > Render process exited with code 256 (abnormal exit) > > /home/a0850410/yocto_builds/sdk400_am5/oe-layersetup/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/qtwebengine/5.7.1+gitAUTOINC+9cc97f0c63_b3c79e92f0-r0.arago0/git/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc:**CRASHING**:futex() > failure > > Received signal 11 SEGV_MAPERR 000000000007 > > [end of stack trace] > > > > I was trying to find out which module initiating the FUTEX call > (FUTEX_UNLOCK_PI) and there was no luck. > > I could not set a breakpoint at or within RestrictFutex(), > CrashSIGSYSFutex() and SIGSYSFutexFailure(), i.e. the breakpoints > do no work at QtCreator. > > And the stack trace does not show anything. I wonder that I need to > set some build flag or option to enable chromium debugging. > > > > Any thoughts and inputs will be highly appreciated! > > > > Best regards, > > > > Eric > > > > *From:* Alexandru Croitor [mailto:alexandru.croitor at qt.io] > *Sent:* Thursday, March 23, 2017 11:35 AM > *To:* Ruei, Eric > *Cc:* qtwebengine at qt-project.org > *Subject:* Re: [Qtwebengine] QT5.6.2 to 5.7.1 default behavior > changes and qtWebengine ozone bridge > > > > Hi, > > > > I am not aware of the reason for the seccomp crash, but you can find > some similar reports with some info > at https://bugreports.qt.io/browse/QTBUG-57709 maybe that helps you > investigate the issue further. > > > > Regarding GLES, I am not very familiar with that code, but it is > plausible it is incomplete. You could check if there are any code > changes in Qt 5.8.x and in unreleased Qt 5.9.0. > > > > Rergards, > > Alex. > > > > > > On 23 Mar 2017, at 16:14, Ruei, Eric > wrote: > > > > Hi, Alexandru: > > > > Thank you so much! > > The information that you provided is extremely helpful and it > may take me forever to get without your help! > > > > For question #3, we are using Linux kernel 4.9.13 and > seccomp-bpf is enabled. > > With the default setting, the following error occurs > continuously and the Seccomp is set to 0 at /proc//status. > > > > Render process exited with code 256 (abnormal exit) > > /home/a0850410/yocto_builds/LTS2017_0/oe-layersetup/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/qtwebengine/5.7.1+gitAUTOINC+9cc97f0c63_b3c79e92f0-r0/git/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc:**CRASHING**:futex() > failure > > Received signal 11 SEGV_MAPERR 000000000007 > > [end of stack trace] > > … > > > > The qtwebengine demo browser works if seccomp-bpf sandbox is > disabled by --disable-seccomp-filter-sandbox. > > > > Do you have any idea for question #4? > > > > Best regards, > > > > Eric > > > > > > _______________________________________________ > QtWebEngine mailing list > QtWebEngine at qt-project.org > http://lists.qt-project.org/mailman/listinfo/qtwebengine > From michal.klocek at qt.io Wed May 17 11:49:06 2017 From: michal.klocek at qt.io (Michal Klocek) Date: Wed, 17 May 2017 11:49:06 +0200 Subject: [Qtwebengine] QT5.6.2 to 5.7.1 default behavior changes and qtWebengine ozone bridge In-Reply-To: <41b8abe1-7925-f7d7-fa89-47194fcdfe86@qt.io> References: <009C030982313E4589C6BC55FBF1E82A25358F91@DFLE09.ent.ti.com> <76CCF44C-8D37-4AC0-B921-C34A5779CE39@qt.io> <009C030982313E4589C6BC55FBF1E82A253592C1@DFLE09.ent.ti.com> <1A26B0C1-A936-4E25-BF0E-9EBFF5B46268@qt.io> <009C030982313E4589C6BC55FBF1E82A2536D6EC@DFLE09.ent.ti.com> <75923C0B-CAA2-4487-B121-A74C96BF8E6D@qt.io> <009C030982313E4589C6BC55FBF1E82A2536E748@DFLE09.ent.ti.com> <41b8abe1-7925-f7d7-fa89-47194fcdfe86@qt.io> Message-ID: tfu... I ment use-after-free :) Br Michal On 05/17/2017 11:46 AM, Michal Klocek wrote: > Hi > > > Did you try different kernel ? > > 4.9 had recently some delete-after-use issue afaik > > see https://patchwork.kernel.org/patch/9634773/ > > Br > > Michal > > On 05/17/2017 12:35 AM, Ruei, Eric via QtWebEngine wrote: >> Hi, Alex: >> >> >> >> Thanks for the information! >> >> With the help of strace, we found out that the FUTEX_UNLOCK_PI (0x07) >> was invoked once at the process with sandbox restriction as shown below: >> >> >> >> 3786 16:41:27.554470 futex(0xffffffff, FUTEX_UNLOCK_PI, 0) = -1093335620 >> >> >> >> It seems to be a bad call with uaddr = -1, but I am more interested in >> finding which module invokes FUTEX_UNLOCK_PI. >> >> Is there a way to find out the originator of the futex system call in >> this scenario? >> >> >> >> Best regards, >> >> >> >> Eric >> >> >> >> *From:*Alexandru Croitor [mailto:alexandru.croitor at qt.io] >> *Sent:* Monday, May 15, 2017 3:45 AM >> *To:* Ruei, Eric >> *Cc:* qtwebengine at qt-project.org >> *Subject:* Re: [Qtwebengine] QT5.6.2 to 5.7.1 default behavior changes >> and qtWebengine ozone bridge >> >> >> >> Hi, >> >> >> >> I'm not sure how well supported is Qt Creator for embedded device, so I >> would advise to try setting the breakpoints from command line gdb, as >> well as checking if the symbols are actually found by GDB. >> >> >> >> WebEngine by default does not create / include debug symbols for Blink >> and V8, so if the call happens somewhere inside those components, the >> breakpoint will not be hit. Note that enabling those debug symbols will >> substantially increase link time as well RAM used. You can enable them >> >> by re-running qmake with something like >> >> >> >> qmake qt57_source/qtwebengine/qtwebengine.pro CONFIG+="webcore_debug >> v8base_debug" >> >> Those flags are in qtwebengine/src/core/gyp_run.pro >> >> >> >> Other debug symbols should in theory be there if you are doing a debug >> build. >> >> >> >> On 12 May 2017, at 20:03, Ruei, Eric > > wrote: >> >> >> >> Hi, Alex: >> >> >> >> Thank you very much for your invaluable help! >> >> I have finally resumed to debug the qtwebengine seccomp issue after >> a long break to other assignments. >> >> >> >> Regarding the crash as shown below, it is caused by a restricted >> FUTEX request (FUTEX_UNLOCK_PI) at function RestrictFutex() >> @syscall_parameters_restrictions.cc >> >> >> >> Render process exited with code 256 (abnormal exit) >> >> >> /home/a0850410/yocto_builds/sdk400_am5/oe-layersetup/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/qtwebengine/5.7.1+gitAUTOINC+9cc97f0c63_b3c79e92f0-r0.arago0/git/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc:**CRASHING**:futex() >> >> failure >> >> Received signal 11 SEGV_MAPERR 000000000007 >> >> [end of stack trace] >> >> >> >> I was trying to find out which module initiating the FUTEX call >> (FUTEX_UNLOCK_PI) and there was no luck. >> >> I could not set a breakpoint at or within RestrictFutex(), >> CrashSIGSYSFutex() and SIGSYSFutexFailure(), i.e. the breakpoints >> do no work at QtCreator. >> >> And the stack trace does not show anything. I wonder that I need to >> set some build flag or option to enable chromium debugging. >> >> >> >> Any thoughts and inputs will be highly appreciated! >> >> >> >> Best regards, >> >> >> >> Eric >> >> >> >> *From:* Alexandru Croitor [mailto:alexandru.croitor at qt.io] >> *Sent:* Thursday, March 23, 2017 11:35 AM >> *To:* Ruei, Eric >> *Cc:* qtwebengine at qt-project.org >> *Subject:* Re: [Qtwebengine] QT5.6.2 to 5.7.1 default behavior >> changes and qtWebengine ozone bridge >> >> >> >> Hi, >> >> >> >> I am not aware of the reason for the seccomp crash, but you can find >> some similar reports with some info >> at https://bugreports.qt.io/browse/QTBUG-57709 maybe that helps you >> investigate the issue further. >> >> >> >> Regarding GLES, I am not very familiar with that code, but it is >> plausible it is incomplete. You could check if there are any code >> changes in Qt 5.8.x and in unreleased Qt 5.9.0. >> >> >> >> Rergards, >> >> Alex. >> >> >> >> >> >> On 23 Mar 2017, at 16:14, Ruei, Eric > > wrote: >> >> >> >> Hi, Alexandru: >> >> >> >> Thank you so much! >> >> The information that you provided is extremely helpful and it >> may take me forever to get without your help! >> >> >> >> For question #3, we are using Linux kernel 4.9.13 and >> seccomp-bpf is enabled. >> >> With the default setting, the following error occurs >> continuously and the Seccomp is set to 0 at /proc//status. >> >> >> >> Render process exited with code 256 (abnormal exit) >> >> >> /home/a0850410/yocto_builds/LTS2017_0/oe-layersetup/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/qtwebengine/5.7.1+gitAUTOINC+9cc97f0c63_b3c79e92f0-r0/git/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc:**CRASHING**:futex() >> >> failure >> >> Received signal 11 SEGV_MAPERR 000000000007 >> >> [end of stack trace] >> >> … >> >> >> >> The qtwebengine demo browser works if seccomp-bpf sandbox is >> disabled by --disable-seccomp-filter-sandbox. >> >> >> >> Do you have any idea for question #4? >> >> >> >> Best regards, >> >> >> >> Eric >> >> >> >> >> >> _______________________________________________ >> QtWebEngine mailing list >> QtWebEngine at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/qtwebengine >> > _______________________________________________ > QtWebEngine mailing list > QtWebEngine at qt-project.org > http://lists.qt-project.org/mailman/listinfo/qtwebengine From akkana at shallowsky.com Wed May 24 03:58:45 2017 From: akkana at shallowsky.com (Akkana Peck) Date: Tue, 23 May 2017 19:58:45 -0600 Subject: [Qtwebengine] Off-the-record QWebEngineProfiles Message-ID: <20170524015845.pcmpzpazyywrhaqp@shallowsky.com> Hi! I'm using the Python bindings -- I hope that doesn't make this off topic. I'm trying to figure out how to use a QWebEngineProfile to do "off the record" (incognito) browsing. The documentation for QWebEngineProfile says I can browse off the record, without saving anything to disk, by making a new profile with QWebEngineProfile(). But having made that off-the-record profile, I'm not clear how to use it. I'm trying things like this: self.webview = QWebEngineView() self.profile = QWebEngineProfile() print("Profile off the record?", self.profile.isOffTheRecord()) # prints True self.page = QWebEnginePage(self.profile) print("Page off the record?", self.page.profile().isOffTheRecord()) # prints False self.webview.setPage(self.page) self.setCentralWidget(self.webview) Even though I pass the off-record profile when initializing the QWebEnginePage, the page doesn't use it. Why? Related question and maybe a workaround: where does it store profile state? The docs I found aren't clear on that. If I knew where it was stored, at least I could delete it on startup and exit. Full script, if it helps to have something runnable, at https://github.com/akkana/scripts/blob/master/quickbrowse Thanks for any pointers! ...Akkana From me at the-compiler.org Wed May 24 06:50:54 2017 From: me at the-compiler.org (Florian Bruhin) Date: Wed, 24 May 2017 06:50:54 +0200 Subject: [Qtwebengine] Off-the-record QWebEngineProfiles In-Reply-To: <20170524015845.pcmpzpazyywrhaqp@shallowsky.com> References: <20170524015845.pcmpzpazyywrhaqp@shallowsky.com> Message-ID: <20170524045052.iswlvg3ahjj5z5ft@hooch.localdomain> Hey Akkana, On Tue, May 23, 2017 at 07:58:45PM -0600, Akkana Peck wrote: > self.page = QWebEnginePage(self.profile) The QWebEnginePage constructor has two overloads: QWebEnginePage(QObject *parent = Q_NULLPTR) QWebEnginePage(QWebEngineProfile *profile, QObject *parent = Q_NULLPTR) Since a QWebEngineProfile is a valid QObject, and you don't pass a second argument, the first one gets selected - i.e. you get the default profile, and your profile as a parent object for the page. If you pass self.webview as a second argument, all works like intended. This makes me wonder if C++ handles this differently though - does it select the second overload because it's a more specific match? If it does, this might be a "bug" in how PyQt selects which overload to run. Florian -- https://www.qutebrowser.org | me at the-compiler.org (Mail/XMPP) GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc I love long mails! | https://email.is-not-s.ms/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: From akkana at shallowsky.com Wed May 24 17:04:06 2017 From: akkana at shallowsky.com (Akkana Peck) Date: Wed, 24 May 2017 09:04:06 -0600 Subject: [Qtwebengine] Off-the-record QWebEngineProfiles In-Reply-To: <20170524045052.iswlvg3ahjj5z5ft@hooch.localdomain> References: <20170524015845.pcmpzpazyywrhaqp@shallowsky.com> <20170524045052.iswlvg3ahjj5z5ft@hooch.localdomain> Message-ID: <20170524150406.iktb2iobcn6prkxp@shallowsky.com> Florian Bruhin writes: > Hey Akkana, > > On Tue, May 23, 2017 at 07:58:45PM -0600, Akkana Peck wrote: > > self.page = QWebEnginePage(self.profile) > > The QWebEnginePage constructor has two overloads: > > QWebEnginePage(QObject *parent = Q_NULLPTR) > QWebEnginePage(QWebEngineProfile *profile, QObject *parent = Q_NULLPTR) > > Since a QWebEngineProfile is a valid QObject, and you don't pass a > second argument, the first one gets selected - i.e. you get the default > profile, and your profile as a parent object for the page. > > If you pass self.webview as a second argument, all works like intended. Good point! But even if I call self.page = QWebEnginePage(None, self.profile) self.page.profile().isOffTheRecord() still prints as False. If it works for you in C++, could this be a problem with the Python bindings? Or does it only work if I pass a non-null parent? I'm not sure what the parent is supposed to be: the documentation only says it's a QObject but not what sort of QObject. The QWebEngineView? Apparently not, that errors with "unexpected type" even though it supposedly inherits from QObject. ...Akkana From me at the-compiler.org Wed May 24 17:18:56 2017 From: me at the-compiler.org (Florian Bruhin) Date: Wed, 24 May 2017 17:18:56 +0200 Subject: [Qtwebengine] Off-the-record QWebEngineProfiles In-Reply-To: <20170524150406.iktb2iobcn6prkxp@shallowsky.com> References: <20170524015845.pcmpzpazyywrhaqp@shallowsky.com> <20170524045052.iswlvg3ahjj5z5ft@hooch.localdomain> <20170524150406.iktb2iobcn6prkxp@shallowsky.com> Message-ID: <20170524151855.svesqwp3u4pnmf5y@hooch.localdomain> On Wed, May 24, 2017 at 09:04:06AM -0600, Akkana Peck wrote: > Florian Bruhin writes: > > Hey Akkana, > > > > On Tue, May 23, 2017 at 07:58:45PM -0600, Akkana Peck wrote: > > > self.page = QWebEnginePage(self.profile) > > > > The QWebEnginePage constructor has two overloads: > > > > QWebEnginePage(QObject *parent = Q_NULLPTR) > > QWebEnginePage(QWebEngineProfile *profile, QObject *parent = Q_NULLPTR) > > > > Since a QWebEngineProfile is a valid QObject, and you don't pass a > > second argument, the first one gets selected - i.e. you get the default > > profile, and your profile as a parent object for the page. > > > > If you pass self.webview as a second argument, all works like intended. > > Good point! But even if I call > self.page = QWebEnginePage(None, self.profile) > self.page.profile().isOffTheRecord() still prints as False. I couldn't reproduce it anymore after doing that change in your quickbrowse script. Can you push the updated code? > If it works for you in C++, could this be a problem with the > Python bindings? Or does it only work if I pass a non-null parent? > I'm not sure what the parent is supposed to be: the documentation > only says it's a QObject but not what sort of QObject. The > QWebEngineView? Apparently not, that errors with "unexpected > type" even though it supposedly inherits from QObject. No, I tried with your example, and it also works fine in my PyQt5 + QtWebEngine project. Yes, you'll need to pass an actual parent object, any valid QObject. Passing the view worked fine for me in your example, and it makes sense for the view to be the parent of the page. Also see the overview here: http://doc.qt.io/qt-5/objecttrees.html Florian -- https://www.qutebrowser.org | me at the-compiler.org (Mail/XMPP) GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc I love long mails! | https://email.is-not-s.ms/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: From allan.jensen at qt.io Wed May 24 17:29:10 2017 From: allan.jensen at qt.io (Allan Sandfeld Jensen) Date: Wed, 24 May 2017 17:29:10 +0200 Subject: [Qtwebengine] Off-the-record QWebEngineProfiles In-Reply-To: <20170524150406.iktb2iobcn6prkxp@shallowsky.com> References: <20170524015845.pcmpzpazyywrhaqp@shallowsky.com> <20170524045052.iswlvg3ahjj5z5ft@hooch.localdomain> <20170524150406.iktb2iobcn6prkxp@shallowsky.com> Message-ID: <201705241729.10696.allan.jensen@qt.io> On Wednesday 24 May 2017, Akkana Peck wrote: > Florian Bruhin writes: > > Hey Akkana, > > > > On Tue, May 23, 2017 at 07:58:45PM -0600, Akkana Peck wrote: > > > self.page = QWebEnginePage(self.profile) > > > > The QWebEnginePage constructor has two overloads: > > QWebEnginePage(QObject *parent = Q_NULLPTR) > > QWebEnginePage(QWebEngineProfile *profile, QObject *parent = > > Q_NULLPTR) > > > > Since a QWebEngineProfile is a valid QObject, and you don't pass a > > second argument, the first one gets selected - i.e. you get the default > > profile, and your profile as a parent object for the page. > > > > If you pass self.webview as a second argument, all works like intended. > > Good point! But even if I call > self.page = QWebEnginePage(None, self.profile) > self.page.profile().isOffTheRecord() still prints as False. > Wrong order, profile is first argument parent is second -- Allan Sandfeld Jensen Principal Engineer The Qt Company GmbH Rudower Chaussee 13 D-12489 Berlin allan.jensen at qt.io +123 45 6789012 http://qt.io Geschäftsführer: Mika Pälsi, Juha Varelius, Mika Harjuaho Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B The Future is Written with Qt www.qtworldsummit.com From akkana at shallowsky.com Wed May 24 17:51:00 2017 From: akkana at shallowsky.com (Akkana Peck) Date: Wed, 24 May 2017 09:51:00 -0600 Subject: [Qtwebengine] Off-the-record QWebEngineProfiles In-Reply-To: <201705241729.10696.allan.jensen@qt.io> References: <20170524015845.pcmpzpazyywrhaqp@shallowsky.com> <20170524045052.iswlvg3ahjj5z5ft@hooch.localdomain> <20170524150406.iktb2iobcn6prkxp@shallowsky.com> <201705241729.10696.allan.jensen@qt.io> Message-ID: <20170524155100.qqaixiefb32qsyzm@shallowsky.com> Allan Sandfeld Jensen writes: > On Wednesday 24 May 2017, Akkana Peck wrote: > > self.page = QWebEnginePage(None, self.profile) > > self.page.profile().isOffTheRecord() still prints as False. > > > Wrong order, profile is first argument parent is second Whoops! Blush, you're right. And it does work if I call QWebEnginePage(self.profile, None). Thanks! Florian had wondered: | This makes me wonder if C++ handles this differently though - does it | select the second overload because it's a more specific match? If it | does, this might be a "bug" in how PyQt selects which overload to run. It did seem unusual that adding "None" as a second argument argument would be required to make the first argument work -- that the optional argument would be the first one, not the second. Not sure I've ever seen that before in a Python API. I don't know how hard it would be to make the Python bindings smarter about choosing which overload to use, or perhaps to make profile a keyword argument (I did try QWebEnginePage(profile=self.profile) first, but it didn't accept it since profile isn't a keyword argument). But that's a question for whoever does the Python bindings. It would definitely be something to note in the documentation, though, if there's ever going to be documentation written for the Python version of QtWebEngine. Who does the Python documentation? Is that something I could help with? (Once I understand it better, anyway.) ...Akkana From me at the-compiler.org Wed May 24 18:53:07 2017 From: me at the-compiler.org (Florian Bruhin) Date: Wed, 24 May 2017 18:53:07 +0200 Subject: [Qtwebengine] Off-the-record QWebEngineProfiles In-Reply-To: <20170524155100.qqaixiefb32qsyzm@shallowsky.com> References: <20170524015845.pcmpzpazyywrhaqp@shallowsky.com> <20170524045052.iswlvg3ahjj5z5ft@hooch.localdomain> <20170524150406.iktb2iobcn6prkxp@shallowsky.com> <201705241729.10696.allan.jensen@qt.io> <20170524155100.qqaixiefb32qsyzm@shallowsky.com> Message-ID: <20170524165307.busfdlfpyco734tj@hooch.localdomain> Hi, On Wed, May 24, 2017 at 09:51:00AM -0600, Akkana Peck wrote: > Florian had wondered: > | This makes me wonder if C++ handles this differently though - does it > | select the second overload because it's a more specific match? If it > | does, this might be a "bug" in how PyQt selects which overload to run. > > It did seem unusual that adding "None" as a second argument > argument would be required to make the first argument work -- that > the optional argument would be the first one, not the second. Not > sure I've ever seen that before in a Python API. The Python API just mirrors the Qt one, and every QObject has "parent" as last argument. > I don't know how hard it would be to make the Python bindings smarter > about choosing which overload to use, or perhaps to make profile a > keyword argument (I did try QWebEnginePage(profile=self.profile) > first, but it didn't accept it since profile isn't a keyword > argument). But that's a question for whoever does the Python bindings. Yeah, that'd be something for this mailinglist instead: https://www.riverbankcomputing.com/mailman/listinfo/pyqt However, that'd collide with how keyword arguments are used already: http://pyqt.sourceforge.net/Docs/PyQt5/qt_properties.html > It would definitely be something to note in the documentation, > though, if there's ever going to be documentation written for > the Python version of QtWebEngine. Who does the Python documentation? > Is that something I could help with? (Once I understand it better, > anyway.) PyQt doesn't have any dedicated documentation really. PyQt wraps over 1000 classes. Translating all Qt documentation to Python (and, more importantly, keeping it synchronized with all Qt doc changes) would be a massive effort, with a relatively small benefit. Florian -- https://www.qutebrowser.org | me at the-compiler.org (Mail/XMPP) GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc I love long mails! | https://email.is-not-s.ms/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: From mohammads_32 at yahoo.com Thu May 25 07:26:13 2017 From: mohammads_32 at yahoo.com (Mohammad Moradi) Date: Thu, 25 May 2017 05:26:13 +0000 (UTC) Subject: [Qtwebengine] Qwebengine 5.8.0 carshes on Raspberry pi3 References: <711562817.501573.1495689973008.ref@mail.yahoo.com> Message-ID: <711562817.501573.1495689973008@mail.yahoo.com> Hello I can create an object of "QWebEngineView" to view web pages and and run my application on laptop, but when the target changes to RPi3, i receive an error about "libEGL", while its available and other opengl apps can use this library:*error log* I searched a lot but found this bug is appeared after 5.6 and still doesn't have any workaround! Is there any solution to implement qwebengine in my application?(I tried on raspbian and now on lubuntu) Thank youmohammads -------------- next part -------------- An HTML attachment was scrubbed... URL: From carlon.luca at gmail.com Thu May 25 08:53:14 2017 From: carlon.luca at gmail.com (Luca Carlon) Date: Thu, 25 May 2017 08:53:14 +0200 Subject: [Qtwebengine] Qwebengine 5.8.0 carshes on Raspberry pi3 In-Reply-To: <711562817.501573.1495689973008@mail.yahoo.com> References: <711562817.501573.1495689973008.ref@mail.yahoo.com> <711562817.501573.1495689973008@mail.yahoo.com> Message-ID: Do you actually have the file /opt/vc/lib/libEGL.so.1? I had the same error and I just symlinked /opt/vc/lib/libEGL.so.1 to /opt/vc/lib/libEGL.so. Luca On Thu, May 25, 2017 at 7:26 AM, Mohammad Moradi via QtWebEngine < qtwebengine at qt-project.org> wrote: > Hello > I can create an object of "QWebEngineView" to view web pages and and run > my application on laptop, but when the target changes to RPi3, i receive an > error about "libEGL", while its available and other opengl apps can use > this library: > **error log* * > > * * > I searched a lot but found this bug is appeared after 5.6 and still > doesn't have any workaround! > > Is there any solution to implement qwebengine in my application?(I tried > on raspbian and now on lubuntu) > > Thank you > mohammads > > _______________________________________________ > QtWebEngine mailing list > QtWebEngine at qt-project.org > http://lists.qt-project.org/mailman/listinfo/qtwebengine > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mohammads_32 at yahoo.com Thu May 25 08:59:22 2017 From: mohammads_32 at yahoo.com (Mohammad Moradi) Date: Thu, 25 May 2017 06:59:22 +0000 (UTC) Subject: [Qtwebengine] Qwebengine 5.8.0 carshes on Raspberry pi3 In-Reply-To: References: <711562817.501573.1495689973008.ref@mail.yahoo.com> <711562817.501573.1495689973008@mail.yahoo.com> Message-ID: <137169024.2143054.1495695562596@mail.yahoo.com> Yes of course:http://paste.ubuntu.com/24652565/http://paste.ubuntu.com/24651836/ Thank youmohammads On Thursday, May 25, 2017 11:23 AM, Luca Carlon wrote: Do you actually have the file /opt/vc/lib/libEGL.so.1? I had the same error and I just symlinked /opt/vc/lib/libEGL.so.1 to /opt/vc/lib/libEGL.so. Luca On Thu, May 25, 2017 at 7:26 AM, Mohammad Moradi via QtWebEngine wrote: Hello I can create an object of "QWebEngineView" to view web pages and and run my application on laptop, but when the target changes to RPi3, i receive an error about "libEGL", while its available and other opengl apps can use this library:*error log* I searched a lot but found this bug is appeared after 5.6 and still doesn't have any workaround! Is there any solution to implement qwebengine in my application?(I tried on raspbian and now on lubuntu) Thank youmohammads ______________________________ _________________ QtWebEngine mailing list QtWebEngine at qt-project.org http://lists.qt-project.org/ mailman/listinfo/qtwebengine -------------- next part -------------- An HTML attachment was scrubbed... URL: From elyzabethvonreuenthal at iserlohn-fortress.net Thu May 25 09:10:08 2017 From: elyzabethvonreuenthal at iserlohn-fortress.net (Elyzabeth von Reuenthal) Date: Thu, 25 May 2017 09:10:08 +0200 Subject: [Qtwebengine] QWebEnginePage SSL cert Message-ID: <2618404.Bd7s8W1siF@kongou> Hi, How can I get information about the SSL certificate used by a QWebEnginePage? -- Thanks, - Ely -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: This is a digitally signed message part. URL: From me at the-compiler.org Fri May 26 11:46:18 2017 From: me at the-compiler.org (Florian Bruhin) Date: Fri, 26 May 2017 11:46:18 +0200 Subject: [Qtwebengine] QWebEnginePage SSL cert In-Reply-To: <2618404.Bd7s8W1siF@kongou> References: <2618404.Bd7s8W1siF@kongou> Message-ID: <20170526094616.wblfcyuozrgpusko@hooch.localdomain> Hi, On Thu, May 25, 2017 at 09:10:08AM +0200, Elyzabeth von Reuenthal wrote: > How can I get information about the SSL certificate used by a QWebEnginePage? Unfortunately, you can't. Some related issues: https://bugreports.qt.io/browse/QTBUG-51176 https://bugreports.qt.io/browse/QTBUG-49822 Florian -- https://www.qutebrowser.org | me at the-compiler.org (Mail/XMPP) GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc I love long mails! | https://email.is-not-s.ms/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: From akkana at shallowsky.com Sat May 27 19:31:21 2017 From: akkana at shallowsky.com (Akkana Peck) Date: Sat, 27 May 2017 11:31:21 -0600 Subject: [Qtwebengine] printToPdf(): Controlling output dimensions/resolution Message-ID: <20170527173121.nngrwoxghyb7hnu2@shallowsky.com> I need to take HTML that has CSS to fit a particular screen size, e.g. 1024x768, and turn it into PDF set for the same screen size. I'm using printToPdf() from a headless QWebEnginePage. With the old QPrinter API, it used to be possible to do QPrinter.setPaperSize(QSizeF(1024, 768), QPrinter.DevicePixel) With QPageLayout, used by QWebEnginePage.printToPdf(), there's no more DevicePixel, and all the options correspond to physical measurements: enum Unit { Millimeter, Point, Inch, Pica, Didot, Cicero } So, okay, the new API is more limited and I have to choose some physical measurement for the PDF now. But what DPI does a headless QWebEnginePage have? And in practice, the dimensions I choose are ignored anyway. For instance, the simple test script http://shallowsky.com/tmp/qwebengineprint.py with: margins = QMarginsF(0, 0, 0, 0) layout = QPageLayout(QPageSize(QSizeF(1024, 768), QPageSize.Millimeter), QPageLayout.Portrait, margins, QPageLayout.Millimeter, margins) self.webpage.printToPdf(self.print_finished, layout) I know 1024x768 millimeters isn't right, but it doesn't matter: using QSizeF(2, 768), or just a QPageLayout() with no QSizeF at all, both produce a PDF that displays exactly like the one with QSizeF(1024, 768), showing the yellow/red rectangle plus lots of extra unwanted space at the right and bottom. Given that I can't specify DevicePixels in the PDF, how can I print a PDF where the dimensions correspond to the limits of the web page (1024x768) without extra space? (This is for presentations, in case you're curious. HTML/CSS/JS works great for giving presentations, but it's helpful to have a PDF version available in case of emergency, and some conferences insist on submitted slides being .ppt or .pdf.) Thanks, ...Akkana From akkana at shallowsky.com Sat May 27 19:56:33 2017 From: akkana at shallowsky.com (Akkana Peck) Date: Sat, 27 May 2017 11:56:33 -0600 Subject: [Qtwebengine] printToPdf(): Controlling output dimensions/resolution In-Reply-To: <20170527173121.nngrwoxghyb7hnu2@shallowsky.com> References: <20170527173121.nngrwoxghyb7hnu2@shallowsky.com> Message-ID: <20170527175633.cbi3loboq4ojn4sk@shallowsky.com> Following up my own query: > margins = QMarginsF(0, 0, 0, 0) > layout = QPageLayout(QPageSize(QSizeF(1024, 768), > QPageSize.Millimeter), > QPageLayout.Portrait, margins, > QPageLayout.Millimeter, margins) > self.webpage.printToPdf(self.print_finished, layout) > > I know 1024x768 millimeters isn't right, but it doesn't matter: > using QSizeF(2, 768), or just a QPageLayout() with no QSizeF at > all, both produce a PDF that displays exactly like the one with > QSizeF(1024, 768), Actually not true about the 2, 768. Making the width much smaller make a difference, and at about 290mm it comes close to matching the 1024 pixel width, implying that the QWebEnginePage thinks it's about 3.5 dots/mm or 90 DPI. Is that constant, or will it change depending on the desktop where it's run even when the QWebEnginePage is headless? (90 is pretty close to my current desktop resolution.) Changing the QSizeF's height is less helpful. If I make it small, e.g. QSizeF(290, 100) I get a PDF that matches the width nicely but does strange things with the height, depending on what PDF app I use to view it: mupdf shows me a window as tall as my screen with the colored rectangle clipped to be only a fraction of the height, evince gives me a 3-page document with the rectangle taking up all of the first two pages and a little of the third page. So there's something weird going on with specifying the layout height. ...Akkana