Qt Debugging on Windows

  • Hi everyone!

    After a long fight with my source code, finally it compiles in a pretty clean way on Windows.
    Nevertheless, when I try to execute the binary file I get this error message:

    Starting D:\xtingray\tupi-build-desktop-Qt_4_8_0_for_Desktop_-MinGW__Qt_SDK__Release\src\bin\tupi.bin.exe...
    The program has unexpectedly finished.
    exited with code -1073741515

    Question: ¿What is the best practice to debug a Qt app on Windows?

    Thanks for any hint!

  • Moderators

    Did you compile the program already in debug mode?
    As with any program I would start with the debugger. You can eventually go step by step and may see where something goes wrong. When the program runs without exception in debug mode and in the debugger, you can start to worry about the release version.

  • Shame on me! I hope to read a little more before posting around. Ok, I set the debugging option in the Qt Creator interface and I recompiled the whole source code of my project. The binary was generated in a pretty clean way.

    The moment when the debugger is launched, a dialog window pops up with this message: "The gdb process crashes"

    I tried to run the gdb command from the Windows console, and I got this:

    (gdb) run
    Starting program: /cygdrive/d/xtingray/tupi/bin/tupi.exe.exe
    [New Thread 260.0x7c0]
    During startup program exited with code 0xc0000005.

    I downloaded the "Dependency Walker" application to check if some library is missing with no luck.

    Is there another way to find out what's going on?

  • Looking for a solution for my problem, I decided to try the "Debbuging Tools for Windows" package.
    Fortunately, the WinDbg tool gave me a new feedback about the problem and this is the output:

    CommandLine: D:\xtingray\binary\tupi.exe
    Symbol search path is: *** Invalid ***

    • Symbol loading may be unreliable without a symbol search path. *
    • Use .symfix to have the debugger choose a symbol path. *
    • After setting your symbol path, use .reload to refresh symbol locations. *

    Executable search path is:
    ModLoad: 00400000 007a7000 image00400000
    ModLoad: 773b0000 774ec000 ntdll.dll
    ModLoad: 75890000 75964000 C:\Windows\system32\kernel32.dll
    ModLoad: 756c0000 7570a000 C:\Windows\system32\KERNELBASE.dll
    ModLoad: 6f180000 6f435000 D:\xtingray\binary\animation.dll
    ModLoad: 68cc0000 68eb9000 D:\xtingray\binary\tupifwcore.dll
    ModLoad: 6fbc0000 6fbc7000 D:\xtingray\binary\mingwm10.dll
    ModLoad: 75d40000 75dec000 C:\Windows\system32\msvcrt.dll
    ModLoad: 6e940000 6e950000 D:\xtingray\binary\libgcc_s_dw2-1.dll
    ModLoad: 6a100000 6c8fa000 D:\xtingray\binary\QtCored4.dll
    ModLoad: 75e40000 75ee0000 C:\Windows\system32\ADVAPI32.DLL
    ModLoad: 77510000 77529000 C:\Windows\SYSTEM32\sechost.dll
    ModLoad: 75bc0000 75c61000 C:\Windows\system32\RPCRT4.dll
    ModLoad: 75ee0000 7603c000 C:\Windows\system32\OLE32.dll
    ModLoad: 75df0000 75e3e000 C:\Windows\system32\GDI32.dll
    ModLoad: 76340000 76409000 C:\Windows\system32\USER32.dll
    ModLoad: 77500000 7750a000 C:\Windows\system32\LPK.dll
    ModLoad: 77180000 7721d000 C:\Windows\system32\USP10.dll
    ModLoad: 764f0000 76525000 C:\Windows\system32\WS2_32.DLL
    ModLoad: 774f0000 774f6000 C:\Windows\system32\NSI.dll
    ModLoad: 009e0000 0af1b000 D:\xtingray\binary\QtGuid4.dll
    ModLoad: 76470000 764eb000 C:\Windows\system32\COMDLG32.DLL
    ModLoad: 76410000 76467000 C:\Windows\system32\SHLWAPI.dll
    ModLoad: 002c0000 00344000 C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.17514_none_ec83dffa859149af\COMCTL32.dll
    ModLoad: 76530000 7717a000 C:\Windows\system32\SHELL32.dll
    ModLoad: 77530000 7754f000 C:\Windows\system32\IMM32.DLL
    ModLoad: 75c70000 75d3c000 C:\Windows\system32\MSCTF.dll
    ModLoad: 77550000 775df000 C:\Windows\system32\OLEAUT32.DLL
    ModLoad: 71670000 716a2000 C:\Windows\system32\WINMM.DLL
    ModLoad: 6dcf0000 6dd41000 C:\Windows\system32\WINSPOOL.DRV
    ModLoad: 65080000 65252000 D:\xtingray\binary\QtXmld4.dll
    ModLoad: 63980000 6501e000 D:\xtingray\binary\tupifwgui.dll
    ModLoad: 63580000 6397c000 D:\xtingray\binary\tupibase.dll
    ModLoad: 0af20000 0b427000 D:\xtingray\binary\tupi.dll
    ModLoad: 69080000 6913f000 D:\xtingray\binary\quazip.dll
    ModLoad: 0b430000 0c960000 D:\xtingray\binary\QtNetworkd4.dll
    ModLoad: 6fec0000 70c8e000 D:\xtingray\binary\tupistore.dll
    ModLoad: 669c0000 66a58000 D:\xtingray\binary\tupifwsound.dll
    ModLoad: 67c00000 6813f000 D:\xtingray\binary\QtSvgd4.dll
    ModLoad: 678b0000 67978000 C:\Windows\system32\OPENGL32.DLL
    ModLoad: 00350000 00372000 C:\Windows\system32\GLU32.dll
    ModLoad: 007b0000 00897000 C:\Windows\system32\DDRAW.dll
    ModLoad: 726d0000 726d6000 C:\Windows\system32\DCIMAN32.dll
    ModLoad: 76040000 761dd000 C:\Windows\system32\SETUPAPI.dll
    ModLoad: 75710000 75737000 C:\Windows\system32\CFGMGR32.dll
    ModLoad: 75580000 75592000 C:\Windows\system32\DEVOBJ.dll
    ModLoad: 73c90000 73ca3000 C:\Windows\system32\dwmapi.dll
    ModLoad: 0c960000 0d5de000 D:\xtingray\binary\QtOpenGLd4.dll
    ModLoad: 62a40000 62b2a000 D:\xtingray\binary\export.dll
    *** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll -
    (e08.fe4): Access violation - code c0000005 (first chance)
    First chance exceptions are reported before any exception handling.
    This exception may be expected and handled.
    eax=63a5fa94 ebx=63a98108 ecx=63a9302c edx=63980000 esi=63a92000 edi=62a5cf1c
    eip=7740f7e4 esp=0022f33c ebp=0022f3b8 iopl=0 nv up ei pl nz na po nc
    cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010202
    *** ERROR: Symbol file could not be found. Defaulted to export symbols for D:\xtingray\binary\export.dll -
    7740f7e4 8907 mov dword ptr [edi],eax ds:0023:62a5cf1c=62a6768c

    I made a copy of the ntdll.dll file into the application directory, but I keep getting the same error.
    Any hint? :P

    PS: By the way, I'm using Windows 7

  • On my way to find a solution for my problem, I asked for help at the MSN forums, so here is the thread in case that someone want to read it:


    I have to confess that I am not a low-level debugger, so I think I will give up to this issue for a while. If anyone has a clue about how to fix my problem, I appreciate any help.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.