Bug 486905

Summary: Qt6 Webengine crash - required icudtl.dat is missing from image
Product: [Unmaintained] Craft Reporter: Thomas Friedrichsmeier <thomas.friedrichsmeier>
Component: BlueprintsAssignee: Hannah von Reth <vonreth>
Status: RESOLVED FIXED    
Severity: crash CC: kde-windows
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Thomas Friedrichsmeier 2024-05-11 20:57:54 UTC
Trying to craft Qt6 version of RKWard on Windows, but getting a crash / exit as soon as a QWebEnginePage is created (no crash as long as this is avoided).

Very shortly before the crash, qt logs:
> Could not find any platform plugin

debug.log inside CraftRoot\bin gets this:
> [0511/134609.176:ERROR:icu_util.cc(244)] Invalid file descriptor to ICU data received.

ProcMon shows a failed read attempt to CraftRoot\resources\icudtl.dat (it does not exist), right before logging, and calling WerFault.exe .

Unfortunately, my debugging skills on Windows are not terribly developed. Any ideas on how to proceed.
Comment 1 Thomas Friedrichsmeier 2024-05-13 17:52:03 UTC
Ok, I can definitely confirm it's the missing icudtl.dat.

I tried crafting qtwebengine from source. This did not finish (limited space on virutal machine), but icudtl.dat was generated, nonetheless. Copying this into the CraftRoot\resources (where the other webengine resource files are, too), fixes the crash.

I see the qtwebengine blueprint has a conditional regarding ICU. I have no idea what value was used when compiling the branch, but here, craft --configure used "QT_FEATURE_webengine_system_icu=ON".
Comment 2 Thomas Friedrichsmeier 2024-05-17 16:09:45 UTC
Some more observations:
- The qtwebengine version in the craft cache was indeed built with -DQT_FEATURE_webengine_system=ON (see https://files.kde.org/craft/Qt6/24.04/windows/cl/msvc2022/x86_64/RelWithDebInfo/libs/qt6/qtwebengine/).
- This _should_ mean that icudtl.dat is not needed, but apparently, the option is not working correctly, on Windows. The log shows "bundled_icu" being built (around steps 5280+).
- I note a similar-sounding bug report in homebrew (MacOS): https://github.com/Homebrew/homebrew-core/issues/104008 . Here, the conclusion has apparently been to make system-icu a linux only option. In fact, the Mac logs, too show "bundled_icu" being built despite the build being configured for system_icu.

So, apparently what's happening is that the option is ignored while building, and then (inappropriately) honored while installing.

Easiest solution would be to confine the option to linux. (Still hoping to verify the approach with a test-build, though. Let's see if my (virtual) disk space is large enough, this time).