Gdb crashes before reaching main QT 5.1/Creator 2.7.0
-
Hi all,
after several hours of frustration because of a wired behaviour of gdb I hope some one here can give me a hint.
System: Win xp with latest service packs and updates installed.
QT: 5.1 Creator 2.7.2 MingW 4.8
Location: C:\Qt\Qt5.1.0setting up a new project -> Applications ->QT gui Application
with designer adding Pushbutton to mainwindow and adding a slot to MainWindow.cpp
compiling Debug version
try to debuggetting a SIGSEGV in ntdll!RtlpWaitForCriticalSection before the programm reaches Main.
The wired thing is if I copy all needed dll to the build directory the programm runs as expected
Also if I compile the release version it starts and run as expected.I have removed the installation and reinstall
(Qt Online Installer for Windows 32-bit (13 MB)
and after this does not work I tried
Qt 5.1.0 for Windows 32-bit (MinGW 4.8, OpenGL, 666 MB)
after removing the first oneI searched the net but no usable hint for my problem
I Hope someone here can help me.
Best regards
dexli -
+1
Qt Creator 2.7.2 / Qt 5.1.0 (Win32) / MinGW 4.8Source code:
#include <QCoreApplication>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
return a.exec();
}No errors, no warnings.
Then I try to debug bug.exe :
*D:\pjx\Qt\build-bug-Desktop_Qt_5_1_0_MinGW_32bit-Debug\debug>gdb.exe bug.exe
GNU gdb (GDB) 7.5.1
Copyright (C) 2012 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-w64-mingw32".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from D:\pjx\Qt\build-bug-Desktop_Qt_5_1_0_MinGW_32bit-Debug\debu
g\bug.exe...done.
(gdb) run
Starting program: D:\pjx\Qt\build-bug-Desktop_Qt_5_1_0_MinGW_32bit-Debug\debug\b
ug.exe
[New Thread 2696.0xaa4]Program received signal SIGSEGV, Segmentation fault.
0x7c91ac4a in ntdll!RtlpWaitForCriticalSection ()
from C:\WINDOWS\system32\ntdll.dll
(gdb)
*
Where is my mistake? -
Looks more like an issue related to GDB 7.5.1 on Windows XP, not related to Qt or Qt Creator.
-
[quote author="dexli" date="1374250685"]getting a SIGSEGV in ntdll!RtlpWaitForCriticalSection before the programm reaches Main.
The wired thing is if I copy all needed dll to the build directory the programm runs as expected[/quote]Strange crashes can happen if your system loads the wrong version of DLLs.
Do you have other versions of MinGW or Qt in your PATH? If so, remove them from your PATH.
-
@JKSH
Thanks, I think this was the problem.