Sanath Reddy
Sanath Reddy

Reputation: 960

Qt Gdb is crashing my application with exit code 1

When I try debugging my Qt C++ application from within Qt Creator, it crashes consistently with the following error message:

**An unhandled win32 exception in gdb.exe**

However, when I try launching the same binary by double clicking it, it runs just fine. Also, I can also run my binary on gdb from the command line like this

C:\Users\CoolCast>c:\MinGW4.4\bin\gdb.exe C:\QuiKast\git_apps_0_1\Server\MediaSt
reamServer-build-Desktop-Debug\debug\CoolCast.exe
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32"...
(gdb) run
Starting program: C:\QuiKast\git_apps_0_1\Server\MediaStreamServer-build-Desktop
-Debug\debug\CoolCast.exe
[New thread 2112.0x1224]
[New thread 2112.0x12c8]
[New thread 2112.0xc00]
[New thread 2112.0x1264]
[New thread 2112.0x150c]
... and so on.

My environment and program versions are:

Windows 7
Qt SDK 4.8.4
MinGw 4.4
GDB auto-detected under Mingw and set to C:\Mingw4.4\bin\gdb.exe

Upvotes: 2

Views: 1852

Answers (2)

23r0c001
23r0c001

Reputation: 161

For me switching to the auto-detected debugger worked. I was using c:\qtx64\mingw64\bin\g++.exe for my debugger and I got the same or a similar error: the gdb process terminated unexpectedly (code 1). Then I went into my MinGW 64-bit kit (Tools->Options->Build & Run->Kits) and clicked the Auto-detect button next to the Debugger field. This switched my debugger to c:\qtx64\mingw64\bin\gdb.exe. Rebuilt my project (which may or may not have been necessary) and started the debugger from inside Qt Creator (Qt Creator 2.7.0 ; Based on Qt 4.8.4 (32 bit)) and bada bing it worked.

Upvotes: 0

Ashif
Ashif

Reputation: 1684

Update newer version of gdb gdb-windows. Creator wants at least version 7.2 IIRC. Pleae check similar link. GDB crash in Qt Creator 2.5

Upvotes: 1

Related Questions