Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QtApp Segmentation Fault [SOLVED]
Lays147 last edited by Lays147
There are 15 minutes ago my application was running smoothly and now she does not perform at all, the first line of running it gives segmentation fault and does not run. Be in Debug or Release mode, all return me segmentation. I have not changed the code, why is not working anymore?
A segmentation fault is caused by a memory bug in your program. For example, you used an uninitialized pointer.
Sometimes, the bug doesn't cause crashes, but sometimes it does.
Use a Debugger to help you find the bug.
TheHawk last edited by
As @JKSH sais, a segmentation fault is caused by a memory bug in the program.
For instance, the cause can be something like this:
std::vector<double> myvector; myvector = 22; //will cause segmentation fault since myvector does not exist!
running it with the
Debuggercauses the program to halt at the line which causes the segmentation fault, so in my example at
myvector=22;. This will help you solve your problem.