Getting segfault for no reason
-
http://i.stack.imgur.com/bxJaK.jpg
I am getting this
-
[quote author="debugg" date="1392511075"]http://i.stack.imgur.com/bxJaK.jpg
I am getting this[/quote]Hi,
Pay attention to the bottom-left window (a table with the headers "Level", "Function", "File", and "Line". That's a stack trace. It helps you track down the function calls that cause the segfault.
What compiler are you using? Do you have multiple compilers installed in your system?
-
[quote author="debugg" date="1392515317"]ermm.. yeah should I just reinstall the program?[/quote]The code that you showed us did not use anything from Qt, so I don't think reinstalling will help you.
I can think of 2 possibilities:
- Your compiler is producing broken code, OR
- Your program is loading the wrong DLLs at startup
To solve your problem, please tell us what compiler you are using: MinGW or Visual Studio?
(Are there any terms that I used that you don't understand? I can elaborate further if you like)
[quote]I am currently downloading ver 5.1.0. [/quote]That's old. I recommend Qt 5.2.1: http://qt-project.org/downloads
[quote author="debugg" date="1392515317"]Do I just have to install it, or do I need to do something more?
The first time I installed it, I just had to open the executable.[/quote]For Qt's part, you just need to install it.
However, Qt Creator relies on other things in your system (like a compiler, which is NOT is not part of Qt). You might need to do extra setup for your compiler, or you might need to clean your system to make sure there are no conflicting files.
-
I am using the MinGw compiler.
I get these messages:
Error while parsing file C:/Users/.../untitled/untitled.pro. Giving up.
Could not find qmake configuration file default.
Error while parsing file C:/Qt/Qt5.2.1/Tools/QtCreator/bin/assign2/assign2.pro. Giving up.
Could not find qmake configuration file default.21:41:38: Running steps for project untitled1...
21:41:38: Configuration unchanged, skipping qmake step.
21:41:38: Starting: "C:\Qt\Qt5.2.1\Tools\mingw48_32\bin\mingw32-make.exe"
C:/Qt/Qt5.2.1/Tools/mingw48_32/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory 'C:/Qt/Qt5.2.1/Tools/QtCreator/bin/build-untitled1-Desktop_Qt_5_2_1_MinGW_32bit-Debug'
mingw32-make[1]: Nothing to be done for 'first'.
mingw32-make[1]: Leaving directory 'C:/Qt/Qt5.2.1/Tools/QtCreator/bin/build-untitled1-Desktop_Qt_5_2_1_MinGW_32bit-Debug'
21:41:39: The process "C:\Qt\Qt5.2.1\Tools\mingw48_32\bin\mingw32-make.exe" exited normally.
21:41:39: Elapsed time: 00:01. -
Wow, fuck!! Those little...!!!!!!!!!
I disabled some process called search protect conduit, which is supposedly a malware and now it's working. LOL THOSE LITTLE WORMS!!! Sorry.
I was getting seg fault probably because they were getting access to some protected parts of the memory or something.
-
[quote author="debugg" date="1392520256"]Wow, fuck!! Those little...!!!!!!!!!
I disabled some process called search protect conduit, which is supposedly a malware and now it's working. LOL THOSE LITTLE WORMS!!! Sorry.
I was getting seg fault probably because they were getting access to some protected parts of the memory or something.[/quote]Ouch! I hate malware.
I'm glad that you've found a solution. All the best with your projects, and feel free to post back if you have any other questions.