Author Topic: Qt6 Development  (Read 210938 times)

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: Qt6
« Reply #480 on: January 16, 2023, 01:38:56 am »
Still nothing, at least the NSS error is now gone.
It is surprising as testing when Firefox was vanishing, it would generate an exceptq report with Z, which looked like a normal exit.
I guess the exception handler is getting broken somewhere

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #481 on: January 16, 2023, 01:56:40 am »
Bugger... I'll need to think about how to attack this - most likely will run a diff between the V8 code in 5.15.x and 6.2.x to see what's changed - on the assumption that the issue is within the V8 code...

Rich Walsh

  • Sr. Member
  • ****
  • Posts: 331
  • Karma: +23/-0
  • ONU! (OS/2 is NOT Unix!)
    • View Profile
Re: Qt6
« Reply #482 on: January 16, 2023, 02:42:51 am »
Code: [Select]
[115:6:0115/161115.645000:ERROR:nss_util.cc(177)] Error initializing NSS with a
persistent database (sql:h:\home\.pki\nssdb): NSS error code: -8174

This one is easy to fix. If you create a new home directory, dooble will create a '.pki\nssdb' directory with an empty 'cert9.db', no 'key4.db', and a *valid* 'pkcs11.txt'. Go to your primary home directory, find the cert9 and key4 files, then copy them over (do _not_ replace pkcs11).

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: Qt6
« Reply #483 on: January 16, 2023, 02:57:14 am »
OK, I set this in my environment,
Code: [Select]
set QTWEBENGINE_CHROMIUM_FLAGS="ignore-certificate-errors -ignore-ssl-errors -log-level=1"

Loaded os2world, which succeeded for the first time with JavaScript enabled and got this in the log,
Code: [Select]
QFont::fromString: Invalid description '(empty)'
qt.webenginecontext: WebEngine compiled with no opengl enabled.
QQuickWidget is only supported on OpenGL. Use QQuickWindow::setGraphicsApi() to override the default.
[123:1:0115/174014.231000:ERROR:validation_errors.cc(115)] Invalid message: VALIDATION_ERROR_DESERIALIZATION_FAILED
[123:14:0115/174014.233000:ERROR:ssl_client_socket_impl.cc(947)] handshake failed; returned -1, SSL error code 1, net_error -3
js: Uncaught (in promise) undefined
[123:14:0115/174056.016000:ERROR:ssl_client_socket_impl.cc(947)] handshake failed; returned -1, SSL error code 1, net_error -3
js: Uncaught (in promise) undefined
QQuickWidget is only supported on OpenGL. Use QQuickWindow::setGraphicsApi() to override the default.

So one of the scripts that OS2World calls causes SSL errors. Other pages as well spit out similar errors

Have to test Rich's idea for getting rid of the NSS error, hmm, actually the files eventually get created.

Rich Walsh

  • Sr. Member
  • ****
  • Posts: 331
  • Karma: +23/-0
  • ONU! (OS/2 is NOT Unix!)
    • View Profile
Re: Qt6 - Works for me!
« Reply #484 on: January 16, 2023, 03:34:18 am »
Thanks to Martin's concise listing of required files 'n stuff, I was able to get Dooble/QT6 up and running quickly. The installation is isolated from the rest of the system in its own QT6 tree and has its own 'home' directory.

Like others, I had a rough time until I realized the problems weren't with QT6 (vs QT5), they were the same old Dooble problems I'd already learned to work-around. Once my fixes were in place, the whole thing was remarkably stable - even on a javascript-infested site like politico.com. WFM!

1) import the attached block list into Dooble - the difference in performance and CPU load can be astounding on a site like politico. It appears that all of the banners and ads and whatever load their own JS that keeps running in the background. On many sites, you may not have to disable JS if you can prevent the scripts from getting loaded in the first place.

2) do not save cookies. This may be painful if you log into a lot of sites, but again, performance and stability are noticably improved. Plus, this fixes the "first tab doesn't work" problem.

3) if your CPU meter is far more active than it should be, right-click on the current tab and uncheck "Javascript". IMHO, this is Dooble's single-best feature :)

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: Qt6
« Reply #485 on: January 16, 2023, 03:45:00 am »
Politico works fine here without your blocklist, likely as I have a 6MB host file that routes all those addresses to 0.0.0.0
Code: [Select]
wget https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #486 on: January 16, 2023, 03:47:23 am »
Thanks Rich and Dave - there's some good clues in there. I appreciate you taking the time to hunt down things like the settings for QTWEBENGINE_CHROMIUM_FLAGS as I'm pretty time poor, so this is really helpful!!

Rich the words 'remarkably stable' put a real smile on my face - I'm pleasantly surprised at the progress - given the size of the beast when I first started looking at this in November :)

I probably need to investigate some better way of packaging this all - without including headers, libs, etc which most people will never need...

Rich Walsh

  • Sr. Member
  • ****
  • Posts: 331
  • Karma: +23/-0
  • ONU! (OS/2 is NOT Unix!)
    • View Profile
Re: Qt6
« Reply #487 on: January 16, 2023, 04:04:57 am »
Politico works fine here without your blocklist, likely as I have a 6MB host file that routes all those addresses to 0.0.0.0
Code: [Select]
wget https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts

I was never willing to weigh my system down with a 6mb text lookup file. This 59kb listing seems to serve my single-browser needs: I don't recall ever seeing an ad after installing it.

BTW... the blocklist I attached above comes from a site recommended in the Dooble docs. I generated it a few minutes before the posting:

https://pgl.yoyo.org/adservers/serverlist.php?hostformat=nohtml&showintro=0&mimetype=plaintext

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: Qt6
« Reply #488 on: January 16, 2023, 04:26:44 am »
Yes, the hosts file has grown, tripled in size last time I updated it a week or so back. For Dooble the blocklist is better, though really it shouldn't crash from ads though they do have a tendency of being JavaScript heavy to say the least.
Had a hard time importing the block list. Tried to import it from %TMP% where SM put it and Dooble wouldn't navigate that drive (the ram disk) possibly as it is currently running from that drive along with HOME being there. The file picker showed three H:'s. Copied it to another drive and it loaded fine.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #489 on: January 16, 2023, 05:05:46 am »
Code: [Select]
[115:6:0115/161115.645000:ERROR:nss_util.cc(177)] Error initializing NSS with a
persistent database (sql:h:\home\.pki\nssdb): NSS error code: -8174

This one is easy to fix. If you create a new home directory, dooble will create a '.pki\nssdb' directory with an empty 'cert9.db', no 'key4.db', and a *valid* 'pkcs11.txt'. Go to your primary home directory, find the cert9 and key4 files, then copy them over (do _not_ replace pkcs11).

Does the creation of these files work correctly in Qt5? This is potentially a bug in the Qt6 port of Webengine...

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: Qt6
« Reply #490 on: January 16, 2023, 05:28:17 am »
Code: [Select]
[115:6:0115/161115.645000:ERROR:nss_util.cc(177)] Error initializing NSS with a
persistent database (sql:h:\home\.pki\nssdb): NSS error code: -8174

This one is easy to fix. If you create a new home directory, dooble will create a '.pki\nssdb' directory with an empty 'cert9.db', no 'key4.db', and a *valid* 'pkcs11.txt'. Go to your primary home directory, find the cert9 and key4 files, then copy them over (do _not_ replace pkcs11).

Does the creation of these files work correctly in Qt5? This is potentially a bug in the Qt6 port of Webengine...

They did eventually get built here with Qt6. Qt5 seems to act the same, need to load a few pages, close and reopen Dooble and .pki slowly populates

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #491 on: January 17, 2023, 09:42:50 am »
Some clues about positioning in https://github.com/psmedley/qt6-base-os2/issues/6 and the attached tst_qwindow report...

roberto

  • Hero Member
  • *****
  • Posts: 810
  • Karma: +3/-6
    • View Profile
Re: Qt6
« Reply #492 on: January 17, 2023, 03:47:34 pm »
-Paul
After restoring my system, I have verified that days it worked quite well with Dooble qt6, now it does not work as before. And remiriting some captures of the console find this:
Code: [Select]
[111:40:0112/183305.693000:ERROR:audio_thread_hang_monitor.cc(150)] Audio thread hang has been detected. You may need to restart your browser. Please file a bug at https://crbug.com/new
It makes me think that bug, they have it in Chrome. And they have put themselves defensive. Now I don't get anything about JS: when before if I got many messages.
saludos

roberto

  • Hero Member
  • *****
  • Posts: 810
  • Karma: +3/-6
    • View Profile
Re: Qt6
« Reply #493 on: January 17, 2023, 03:55:44 pm »
-Tellie
Making your examples in QT6, I have observed that Hexalate is very interesting, the screen corrupts me. This occurs when I move an object from one position to another. And it is the framework of the object that produces corruption. But if the same click object to turn, it does not spoil the screen.
saludos
« Last Edit: January 17, 2023, 06:33:02 pm by roberto »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #494 on: January 21, 2023, 06:43:18 am »
Quick update.... whilst soaking on how to move forward with debugging QtWebEngine 6.2.4, and fixing the position issues with Qt Base 6.2.4; I started playing around with QtWebEngine 6.3.2; and nodejs 12.x (needed for QtWebEngine 6.3.2).

I'm close (I think) to having nodejs 12 built, and meanwhile have patched QtWebEngine 6.3.2.

Currently stuck with a python error with QtWebEngine - I'm thinking this might be a problem with our python3 port...
Code: [Select]
Traceback (most recent call last):
  File "U:/DEV/qt6-webengine-os2-6.3.x/build/src/core/Release/i386/../../../../../src/3rdparty/chromium/third_party/blink/renderer/build/scripts/core/css/parser/make_atrule_names.py", line 64, in <module>
    json5_generator.Maker(AtRuleNamesWriter).main()
  File "U:/DEV/qt6-webengine-os2-6.3.x/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/json5_generator.py", line 339, in main
    writer.write_files(args.output_dir)
  File "U:/DEV/qt6-webengine-os2-6.3.x/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/json5_generator.py", line 304, in write_files
    self._write_file_if_changed(output_dir, generator(), file_name)
  File "U:/DEV/qt6-webengine-os2-6.3.x/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py", line 72, in generator_internal
    return generate_gperf(gperf_path, gperf_input, gperf_args)
  File "U:/DEV/qt6-webengine-os2-6.3.x/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py", line 31, in generate_gperf
    gperf_output = gperf.communicate(gperf_input)[0]
  File "C:/USR/lib/python3.9/subprocess.py", line 1152, in communicate
    stdout, stderr = self._communicate(input, endtime, timeout)
  File "C:/USR/lib/python3.9/subprocess.py", line 2109, in _communicate
    stdout = b''.join(stdout)
TypeError: sequence item 0: expected a bytes-like object, str found