I have a smallish-sized Qt application. The project compiles and runs great with no problems. When I add one line to the source code — adding an std::string in the MainWindow class definition — then I get a segmentation fault.
MainWindow.h (compiles and runs fine with no errors)
... other code ...
// std::string currentFilename
... other code ...
... other code ...
// std::string currentFilename
... other code ...
To copy to clipboard, switch view to plain text mode
MainWindow.h
... other code ...
std::string currentFilename // uncomment this line
... other code ...
... other code ...
std::string currentFilename // uncomment this line
... other code ...
To copy to clipboard, switch view to plain text mode
Result on application close is:
qUncompress: Input data is corrupted
** Process crashed **
qUncompress: Input data is corrupted
** Process crashed **
To copy to clipboard, switch view to plain text mode
I have never heard qUncompress and I am certainly not using it. I am trying to figure what kind of problem might be causing this bizarre behavior. I have a lot of code to post and it might be too much to read. I have tried running the program in valgrind and I get no non-external errors. I have also tried refactoring the project by removing pieces of functionality at a time and seeing if the problem is fixed. Unfortunately, this approach has led to nothing useful. I always get to these one liners in the MainWindow class definition where I can enable/disable the segmentation fault by commenting/uncommenting out the single line. Each time I try removing functionality and “starting over†it is a different single line in MainWindow class definition that causes the segmentation fault.
I try debugging the application but I cannot get a stack trace on explosion. I simply get 0×0 ???????????
Bookmarks