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)
Qt Code:
  1. ... other code ...
  2. // std::string currentFilename
  3. ... other code ...
To copy to clipboard, switch view to plain text mode 

MainWindow.h

Qt Code:
  1. ... other code ...
  2. std::string currentFilename // uncomment this line
  3. ... other code ...
To copy to clipboard, switch view to plain text mode 

Result on application close is:

Qt Code:
  1. qUncompress: Input data is corrupted
  2. ** 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 ???????????