Qt-client theming crash on startup on msys1 builds
After fixing Bug #681311, qt-client still crashes on startup, but now it gets the window frame visible before doing so.
#3 Updated by Marko Lindqvist 2 months ago
- Status changed from New to In Progress
Also Necrophos theme works. Also combination where I copied just resource.qss from Necrophos to NightStalker worked, and then I started testing what's the difference between the two that triggers the bug. Apparently it's NightStalker's use of 'border-image' instead of 'background-image' for QMainWindow. If one changes that one thing in NightStalker, it starts.
#4 Updated by Marko Lindqvist 2 months ago
- File 0005-Do-not-use-border-image-property-in-Qt-client-themes.patch View added
- Status changed from In Progress to Resolved
Attached patch is a workaround that changes the themes not to use 'border-image' property. This is meant to S2_6 only, as msys1 is not supported in later branches. Even in S2_6 I would prefer theming engine fix to this lowering of theme quality.
#6 Updated by Marko Lindqvist 2 months ago
- Status changed from Closed to New
Reopening, as this is not really fixed, but only partially worked around.
Is Qt build in msys1 release or debug build? There's some reports of border-image crashing on debug builds but not in release builds.
#8 Updated by Christian Prochaska 2 months ago
Marko Lindqvist wrote:
Is Qt build in msys1 release or debug build? There's some reports of border-image crashing on
debug builds but not in release builds.
From my understanding so far, Qt itself was built in both debug and release mode, resulting in two versions of each DLL. The Freeciv Qt client is built in release mode by default by linking against the release mode Qt DLLs. Debug mode then means linking against debug mode Qt DLLs (Qt5*d.dll).
Interestingly, linking the Freeciv Qt client against the debug mode Qt DLLs seems to avoid the crash, opposite to what the linked report says. But the debug mode DLLs are huge.
I also tried the slightly newer Qt 5.5 version, but that didn't change the problem. Trying to build Qt 5.6 brought new compile errors, probably caused by outdated MinGW headers, as more features of Windows Vista and beyond are used in Qt. Qt 5.7+ would require a GCC with C++11 support.
#9 Updated by Christian Prochaska 2 months ago
Christian Prochaska wrote:
But the debug mode DLLs are huge.
After stripping the debug symbols from the DLLs, installer size goes down to 46MB, which is only little more than with the release mode DLLs:
I'll try updating Qt to version 5.6 or later again, but if it doesn't work out, linking against the Qt debug DLLs could be an option.
#10 Updated by Christian Prochaska about 2 months ago
- File gnuwin32-2017-07-30-S2_5.patch View added
- File gnuwin32-2017-07-30-S2_6.patch View added
- File gnuwin32-2017-07-30-S3_0.patch View added
- File gnuwin32-2017-07-30-master.patch View added
- Status changed from New to Resolved
Recompiling Qt with an updated toolchain seems to have fixed the problem.
Updated msys1 environment: http://files.freeciv.org/packages/windows/gnuwin32/gnuwin32-2017-07-30.7z