In a Qt 4.7.1 project in Ubuntu 10.10 x64, I have subclassed QDialog and am calling it in the following way:

Qt Code:
  1. //Create a dialog window to get the requested difficulty
  2. this->generateNewDialog = new GenerateNewDialog(this);
  3. connect(this->generateNewDialog, SIGNAL(difficultySelected(int)), this, SLOT(generationDifficultySelected(int)));
  4.  
  5. this->generateNewDialog->exec();
To copy to clipboard, switch view to plain text mode 

Without fail, this always produces a segmentation fault and crashes my program on the exec() call (not before). Looking at the call stack, the fault occurs at:

QWidgetPrivate::create_sys
QWidget::create
QWidget::setVisible
QDialog::setVisible
show
QDialog::exec

Does anyone see a reason for the behavior? I don't.