OS: Windows 7
Compiler: GCC 4.8.1
Qt: 5.1.1
Qt Creator 2.8.1

I create a project through File -> New File or Project... -> Applications -> Qt Gui Application.

I open the default mainwindow.cpp file.

I add the following lines to the first lines:

Qt Code:
  1. #include <exception>
  2. #include <stdexcept>
  3. #include <QDebug>
To copy to clipboard, switch view to plain text mode 

Then in the MainWindow constructor below ui->setupUi(this); I add the following lines:

Qt Code:
  1. try {
  2. throw std::runtime_error("asd");
  3. }
  4. catch(std::exception& ex) {
  5. qDebug() << ex.what();
  6. }
To copy to clipboard, switch view to plain text mode 

I compile and run the program -> program crashes. I've tried throwing integers and catching by ... and always the same result.

The Compile Output window shows -fexceptions is used as argument for GCC.

The Application Output window shows Invalid parameter passed to C runtime function. as error.

It works fine in non-Qt C++ applications. It also works fine with Qt 5.0.2. What's going on here?