QT Gui application segmentation fault on exit
evanol last edited by
I have previously developed and successfully used a Qt application using Ti's Sitara SDK (ti-sdk-am335x-evm-07.00.00.00) which built applications based on Qt4.8.4
On migrating to ti-processor-sdk-linux-am335x-evm-01.00.00.03, now using Qt5.4.1, the same application now has a segmentation fault on exit.
To debug the issue i created the simple HelloWorld application below, where the same segFault occurs on exit
int main(int argc, char *argv)
QApplication app(argc, argv);
qDebug() << "hello world!" << endl;
QLabel label("this is a text label!");
QTimer::singleShot( 2000, &app, SLOT( quit() ) );
qDebug() << "app.exec() return code :" << app.exec();
If i remove the line 'label.show();' then the application runs successfully and no segmentation Fault occurs.
The issue appears only to occur when a GUI is displayed for the application.
I have tried to track down the issue using strace and running the application in debug mode but have been unable to narrow it down. The application crashes on the line 'return 0;'
Any help on narrowing down the issue would be appreciated, thanks
You should try to get a stack trace of your crash, that will help narrow down the problem.