Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
5.5.0
-
Ubuntu 14.04 64-bit (gcc 4.8.4)
Description
The attached example can be used to reproduce the crash:
#include <QApplication> #include <QWidget> #include <QScopedPointer> int main(int argc, char **argv) { QApplication *app = new QApplication(argc, argv); //QScopedPointer<QApplication> app(new QApplication(argc, argv)); QWidget widget; widget.show(); return app->exec(); }
Steps to reproduce:
1. Run the attached example application
2. close the window
3. repeat if you don't see a seg fault
Expected result:
No segmentation fault should happen
Actual result:
There comes a segmentation fault around every 7th time.
As a workaround one can use QScopedPointer instead of QApplication to prevent it from crashing if the QApplication is created from heap.