Project

General

Profile

Bug #682703

Qt-client theming crash on startup on msys1 builds

Added by Marko Lindqvist 3 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Category:
gui-qt
Target version:
Start date:
Due date:
% Done:

0%


Description

After fixing Bug #681311, qt-client still crashes on startup, but now it gets the window frame visible before doing so.

freeciv-qt.RPT (20.1 KB) Marko Lindqvist, 2017-07-12 12:18 PM

0005-Do-not-use-border-image-property-in-Qt-client-themes.patch View (1.91 KB) Marko Lindqvist, 2017-07-16 12:59 AM

gnuwin32-2017-07-30-S2_5.patch View (943 Bytes) Christian Prochaska, 2017-07-30 07:45 PM

gnuwin32-2017-07-30-S2_6.patch View (942 Bytes) Christian Prochaska, 2017-07-30 07:45 PM

gnuwin32-2017-07-30-S3_0.patch View (989 Bytes) Christian Prochaska, 2017-07-30 07:45 PM

gnuwin32-2017-07-30-master.patch View (989 Bytes) Christian Prochaska, 2017-07-30 07:46 PM

History

#1 Updated by Marko Lindqvist 3 months ago

There's older crashes on that .RPT. This one is last one (July 12, 2017 at 15:05:13).

#2 Updated by Marko Lindqvist 2 months ago

I made a build where I defined FC_QT_DEFAULT_THEME_NAME as "System" and that one starts, further proving that the problem is with theming engine. Changing the theme from options to something else than "System" crashes the client.

#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

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.

#5 Updated by Marko Lindqvist 2 months ago

  • Status changed from Resolved to Closed
  • Assignee set to Marko Lindqvist

#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.

https://bugreports.qt.io/browse/QTBUG-58824

#7 Updated by Marko Lindqvist 2 months ago

  • Assignee deleted (Marko Lindqvist)

#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.

Test installer:

http://files.freeciv.org/packages/windows/testing/cproc/Freeciv-2.6.0-beta0-win32-qt-debug-setup.exe

#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:

http://files.freeciv.org/packages/windows/testing/cproc/Freeciv-2.6.0-beta0-win32-qt-debug-stripped-setup.exe

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

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

#11 Updated by Marko Lindqvist about 2 months ago

Remember also to revert the earlier patch to Qt-client themes.

I tested with the new msys1 environment and that patch reverted, and it worked.

#12 Updated by Christian Prochaska about 2 months ago

  • Status changed from Resolved to Closed
  • Assignee set to Christian Prochaska

Also available in: Atom PDF