Author Topic: Qt6 Development  (Read 365266 times)

Mentore

  • Full Member
  • ***
  • Posts: 223
  • Karma: +11/-0
    • View Profile
Re: Qt6 Development
« Reply #645 on: March 20, 2023, 08:09:19 am »
Hype is killing me.  ;) ;D

Mentore

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2284
  • Karma: +176/-0
    • View Profile
Re: Qt6 Development
« Reply #646 on: March 20, 2023, 09:02:53 am »
Hype is killing me.  ;) ;D

Compilers are so slow ;) QtWebEngine 6.4.3 now at [2943/5834] - so about 2900 to go - or ~88% complete. Just got a build break though as I went to write this, will see how hard it is to fix!

Edit: easy one - just had to update some parts of tts_os2.cc to match the versions from other platforms.
« Last Edit: March 20, 2023, 09:06:57 am by Paul Smedley »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2284
  • Karma: +176/-0
    • View Profile
Re: Qt6 Development
« Reply #647 on: March 21, 2023, 03:33:23 am »
OK - I'm back in trouble with  generated long filenames - for some reason the changes in https://github.com/psmedley/qt6-webengine-os2/commit/f31b948382714319d10f6e602d170e5198cb98e2 don't seem to be enough any more. Will investigate this evening.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2284
  • Karma: +176/-0
    • View Profile
Re: Qt6 Development
« Reply #648 on: March 21, 2023, 06:53:18 am »
OK operator error.... when I updated the tweaks to the python files to only run on OS/2 - I used 'os2emx' not 'os2knix' - so each fix....

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2284
  • Karma: +176/-0
    • View Profile
Re: Qt6 Development
« Reply #649 on: March 21, 2023, 10:01:23 am »
Status at PM 21st March - [397/1449] - nearly there :) Had to stub some functions in https://github.com/psmedley/qt6-webengine-os2/commit/4fa6f4bca2df665ddbaebd9aba258623e8bdc0cd#diff-cc2c94e34243ed90f8fb8d01c931f30835818dc27a48275bb911a144f5bbf065  that I'm sure might cause us issues later :)

Hopefully will get to the point of trying to link a qt6webee.dll tomorrow.
« Last Edit: March 21, 2023, 10:35:25 am by Paul Smedley »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2284
  • Karma: +176/-0
    • View Profile
Re: Qt6 Development
« Reply #650 on: March 22, 2023, 04:50:10 am »
Not too bad....
Executable Image: lib/Qt6WebEe.dll
creating an OS/2 EMX dynamic link library
Error! E2028: __ZN7content29ObserveKeySystemSupportUpdateEN4base17RepeatingCallbackIFvNS0_8flat_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4mojo9StructPtrIN5media5mojom19KeySystemCapabilityEEESt4lessIvESt6vectorISt4pairIS8_SE_E!_XOWrf2 is an undefined reference
Error! E2028: __ZN5angle20GetCurrentSystemTimeEv is an undefined reference
Error! E2028: _av_stream_get_first_dts is an undefined reference
Error! E2028: __ZN2gl12GLSurfaceEGL14GetDisplayTypeEv is an undefined reference
Error! E2028: __ZN2gl4init26InitializeGLOneOffPlatformEy is an undefined reference
Error! E2028: __ZN2gl12GLSurfaceEGL15HasEGLExtensionEPKc is an undefined reference
Error! E2028: __ZN3net13TestRootCerts4InitEv is an undefined reference
Error! E2028: __ZN3net13TestRootCerts7AddImplEPNS_15X509CertificateE is an undefined reference
Error! E2028: __ZN3net13TestRootCerts9ClearImplEv is an undefined reference
Error! E2021: size of segment text exceeds 64k by 34299 bytes

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2284
  • Karma: +176/-0
    • View Profile
Re: Qt6 Development
« Reply #651 on: March 22, 2023, 10:01:32 am »
Now just down to...

Error! E2028: __ZN2gl12GLSurfaceEGL14GetDisplayTypeEv is an undefined reference
Error! E2028: __ZN2gl12GLSurfaceEGL15HasEGLExtensionEPKc is an undefined reference
Error! E2021: size of segment text exceeds 64k by 12539 bytes

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2284
  • Karma: +176/-0
    • View Profile
Re: Qt6 Development
« Reply #652 on: March 22, 2023, 11:19:18 am »
Nearly there... Got the main dll built then a build break...
Code: [Select]
{0}[u:\dev\qt6-webengine-os2-6.4.x\build] dir lib\*.dll

 Volume in drive U is Dev            Serial number is 62DB:45BE
 Directory of  U:\DEV\qt6-webengine-os2-6.4.x\build\lib\*.dll

22/03/23  19:04     285,711,275      0  Qt6WebEe.dll
22/03/23  13:42         183,099      0  Qt6WebEl.dll
22/03/23  19:04         114,206      0  Qt6WebEs.dll
     286,008,580 bytes (272MB) in 3 files and 0 dirs
     286,011,392 bytes (272MB) allocated
  54,042,521,600 bytes (50GB) free

{0}[u:\dev\qt6-webengine-os2-6.4.x\build]

More tomorrow

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2284
  • Karma: +176/-0
    • View Profile
Re: Qt6 Development
« Reply #653 on: March 22, 2023, 12:57:25 pm »
Re: Qt 6.4.x

Code: [Select]
[109:1:0322/222035.678000:ERROR:shared_buffer_dispatcher.cc(298)] Failed to map shared memory region.
[109:8:0322/222037.341000:ERROR:shared_buffer_dispatcher.cc(298)] Failed to map shared memory region.

This is fixed in https://github.com/psmedley/qt6-webengine-os2/commit/991b4368107f343d2f237d6b5b1083cca79c38da

Doesn't fix the later crash in partition_alloc (Updated TRP attached for reference).
« Last Edit: March 25, 2023, 08:32:35 am by Paul Smedley »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2284
  • Karma: +176/-0
    • View Profile
Re: Qt6 Development
« Reply #654 on: March 22, 2023, 01:30:35 pm »
Attached trp from running maps.exe might be worth investigating - maps.exe still gives the shared memory error, but tries to load the maps...

Some interesting logs about certificates too:
Code: [Select]
[141:1:0322/225951.023000:ERROR:shared_buffer_dispatcher.cc(298)] Failed to map shared memory region.
[141:7:0322/225951.761000:ERROR:shared_buffer_dispatcher.cc(298)] Failed to map shared memory region.

Killed by SIGSEGV
pid=0x008e ppid=0x008d tid=0x0001 slot=0x008e pri=0x0200 mc=0x0001 ps=0x0010
U:\QT6\BIN\QTWEBENGINEPROCESS.EXE
cs:eip=17b89aa8:ffffc000      ss:esp=0000:00000000      ebp=00120053
 ds=0000      es=0000      fs=ffffffff      gs=0000     efl=00000000
eax=0012f418 ebx=1ffc9d7c ecx=0012f42c edx=0012f450 edi=0012fd34 esi=0012fd5c
Creating 008E_01.TRP
[141:5:0322/225952.324000:ERROR:cert_verify_proc_builtin.cc(603)] No net_fetcher for performing AIA chasing.
[141:5:0322/225952.326000:ERROR:cert_verify_proc_builtin.cc(681)] CertVerifyProcBuiltin for maps.google.com failed:
----- Certificate i=2 (CN=GTS Root R1,O=Google Trust Services LLC,C=US) -----
ERROR: No matching issuer found


[141:15:0322/225952.335000:ERROR:ssl_client_socket_impl.cc(999)] handshake failed; returned -1, SSL error code 1, net_error -202
[141:15:0322/225952.335000:ERROR:ssl_client_socket_impl.cc(999)] handshake failed; returned -1, SSL error code 1, net_error -202
Moved 008e_01.TRP to C:\var\log\app\641b8868-008e_01-QTWEBENGINEPROCESS-exceptq.txt

Killed by SIGSEGV
pid=0x008f ppid=0x008d tid=0x0001 slot=0x0090 pri=0x0200 mc=0x0001 ps=0x0010
U:\QT6\BIN\QTWEBENGINEPROCESS.EXE
cs:eip=17b89aa8:ffffc000      ss:esp=0000:00000000      ebp=00120053
 ds=0000      es=0000      fs=ffffffff      gs=0000     efl=00000000
eax=0012f418 ebx=1ffc9d7c ecx=0012f42c edx=0012f450 edi=0012fd34 esi=0012fd5c
Creating 008F_01.TRP
Moved 008f_01.TRP to C:\var\log\app\641b8869-008f_01-QTWEBENGINEPROCESS-exceptq.txt
Creating 008D_01.TRP
Creating 008D_01.TRP

Andy Willis

  • Sr. Member
  • ****
  • Posts: 307
  • Karma: +7/-0
    • View Profile
Re: Qt6 Development
« Reply #655 on: March 23, 2023, 12:53:30 am »
OK, we now have DLLs but it's not working yet:
Code: [Select]
[109:1:0322/222035.678000:ERROR:shared_buffer_dispatcher.cc(298)] Failed to map shared memory region.
[109:8:0322/222037.341000:ERROR:shared_buffer_dispatcher.cc(298)] Failed to map shared memory region.
[109:1:0322/222037.875000:ERROR:system_network_context_manager.cpp(274)] Cannot use V8 Proxy resolver in single process mode.
[109:1:0322/222037.892000:ERROR:system_network_context_manager.cpp(274)] Cannot use V8 Proxy resolver in single process mode.

I get the second pair with the current code.  I find that if I disable single process mode that I then have a better chance of loading pages but the system _will_ lock up much faster.

I'm not too worried about the second pair of messages, but the former sounds more serious. I'll have to go look at the code at https://github.com/psmedley/qt6-webengine-os2/blob/6.4.x/src/3rdparty/chromium/mojo/core/shared_buffer_dispatcher.cc#L298

Edit: Seems like due to my copy of posix code in https://github.com/psmedley/qt6-webengine-os2/commit/fe6e0638c422e146cb2379bf6a275d668b144edd#diff-0b0cccfdd90d1b8b3e0eced8a42e148326a514e6b73c3eea1435b488abe39e9b

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2284
  • Karma: +176/-0
    • View Profile
Re: Qt6 Development
« Reply #656 on: March 23, 2023, 01:10:55 am »
Yeah there is a reason dmitry make single process mode the default ;) I assume my current code you mean 6.3.2?

I may have found the problem causing the trap - the changes in https://github.com/psmedley/qt6-webengine-os2/commit/feb87f70dac13bb5b805fbd271e1ac98568ec062#diff-6d3616171ce7881cc8d3a757c2f9b476d645e4c61df77cdf47a5bf7a423bf56c - specifically the implementation of DecommitAndZeroSystemPagesInternal() is clearly wrong. I should have actually read the original code and the fix (I think) is pretty obvious and much simpler using   PA_CHECK(MyDosSetMem(reinterpret_cast<void*>(address), length, PAG_DECOMMIT));

Linking a new DLL now.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2284
  • Karma: +176/-0
    • View Profile
Re: Qt6 Development
« Reply #657 on: March 23, 2023, 09:42:05 am »
This didn't fix it. I also remembered today about https://github.com/psmedley/qt6-webengine-os2/issues/9 - this may be the cause of issues with Qt >= 6.3 - will need to do some research on what the equivalent code on OS/2 might look like.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2284
  • Karma: +176/-0
    • View Profile
Re: Qt6 Development
« Reply #658 on: March 23, 2023, 09:47:12 am »
This didn't fix it. I also remembered today about https://github.com/psmedley/qt6-webengine-os2/issues/9 - this may be the cause of issues with Qt >= 6.3 - will need to do some research on what the equivalent code on OS/2 might look like.

Gotta love google - I searched for 'NtCurrentTeb())->StackBase)' (ie the windows code) and found https://github.com/psmedley/qt6-webengine-os2/blob/6.3.x/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc#L163 - I'll steal the os2 code and add it to https://github.com/psmedley/qt6-webengine-os2/blob/6.3.x/src/3rdparty/chromium/base/allocator/partition_allocator/starscan/stack/stack.cc#L55

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2284
  • Karma: +176/-0
    • View Profile
Re: Qt6 Development
« Reply #659 on: March 23, 2023, 09:45:17 pm »
OK, fixing that didn't change the Trap in QtWebEngine 6.3.x, rebuilding a new 6.4.x DLL to see if it makes any difference there.

Edit: Nope, it didn't, but at least it's one less thing to implement later.
« Last Edit: March 23, 2023, 09:51:29 pm by Paul Smedley »