Important: Please read the Qt Code of Conduct -

Static Compilation Application Crash

  • Hallo everyone,

    I will try to cut the story short as much as I can.
    I statically compiled QT 5.11.2 to be able to compile a single executable under windows following this guide:

    After many trials, compiling and such I was able to get in "release" mode a .exe of around 15MB.

    I compiled it using different MinGW versions with the option "QTPLUGIN.imageformats = -" in the .pro project to avoid -ltiff error.
    This is strange as my Application has no image handling opss...

    My application is a basic and simple push button (no event associated).

    The issue I am facing now is that when the mouse moves over the button and it should turn from grey to light blue the Windows wheel spins for a second before the application crashes with Segmentation fault.

    Using dynamic compiling it works well and no crashes.

    After many tries I found out that at least another QT objects crashes in the same way which is RadioBox. CheckBox and Tool Button are handled correctly the mouse over event.

    I tried to change crashing obejct properties copying from working objects but still crashes!

    I am desperate! After the nightmare of static compiling I landed to this isses and no googling helped me so far.

    Tested Compilers are:

    MinGW 4.9.2 g++
    MinGW 5.3 g++
    MinGW 7.3 g++

    I also tried to remove the Debugger just in case.

    Any help?

    I am moving from Rad Studio to QT for its known issues finding more troubles than solutions.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Can you show the stack trace of the crash ?

  • Hallo and thank you for your welcome message.

    Here is an asm trace fo the crash as I cannot get anything more in details:

    0x79c3c5 7f 54 jg 0x79c41b
    0x79c3c7 24 60 and $0x60,%al
    0x79c3c9 c5 fe 7f 44 24 40 vmovdqu %ymm0,0x40(%rsp)
    0x79c3cf c5 fd 7f 20 vmovdqa %ymm4,(%rax)
    0x79c3d3 c5 fe 7f 5c 24 20 vmovdqu %ymm3,0x20(%rsp)
    0x79c3d9 c5 fd 7f 8c 24 80 00 00 00 vmovdqa %ymm1,0x80(%rsp)
    0x79c3e2 e8 09 fc ff ff callq 0x79bff0
    0x79c3e7 c5 fe 6f 44 24 40 vmovdqu 0x40(%rsp),%ymm0
    0x79c3ed c5 fe 6f 54 24 60 vmovdqu 0x60(%rsp),%ymm2
    0x79c3f3 c5 fd fc 00 vpaddb (%rax),%ymm0,%ymm0
    0x79c3f7 c5 fe 6f 5c 24 20 vmovdqu 0x20(%rsp),%ymm3
    0x79c3fd c4 81 7d 7f 04 8a vmovdqa %ymm0,(%r10,%r9,4)
    0x79c403 49 83 c1 08 add $0x8,%r9
    0x79c407 e9 76 ff ff ff jmpq 0x79c382
    0x79c40c 44 39 c2 cmp %r8d,%edx
    0x79c40f 0f 8d a0 00 00 00 jge 0x79c4b5
    0x79c415 89 d1 mov %edx,%ecx
    0x79c417 c5 e9 ef d2 vpxor %xmm2,%xmm2,%xmm2
    0x79c41b 48 c1 e2 02 shl $0x2,%rdx
    0x79c41f 44 29 c1 sub %r8d,%ecx
    0x79c422 c5 f9 6e c1 vmovd %ecx,%xmm0
    0x79c426 c4 e2 7d 58 c0 vpbroadcastd %xmm0,%ymm0
    0x79c42b c5 fd fe 05 cd 94 3e 00 vpaddd 0x3e94cd(%rip),%ymm0,%ymm0 # 0xb85900
    0x79c433 c4 c2 7d 8c 0c 13 vpmaskmovd (%r11,%rdx,1),%ymm0,%ymm1
    0x79c439 c4 e3 6d 4c 15 9d 94 3e 00 00 vpblendvb %ymm0,0x3e949d(%rip),%ymm2,%ymm2 # 0xb858e0

    The arrow stops here:
    0x79c3d9 c5 fd 7f 8c 24 80 00 00 00 vmovdqa %ymm1,0x80(%rsp)

  • Qt Champions 2019

    @Rick76 This is assembly code and will not help. Do you have a debug build?

Log in to reply