[Interest] Segmentation fault on exiting Qt event loop

Ramakanth Kesireddy rama.kesi at gmail.com
Mon Dec 17 11:43:36 CET 2018


I'm using Qt 4.8 on TI Sitara embedded linux.

Firstly, a segmentation fault occurs in the destructors, which are called
after the event loop is exited. Trying to find the root cause for this.

However, if we comment out the mainwidget destructor call, the QApplication
instance created on stack throws a segmentation fault.

But if QApplication is created on heap and qApp->quit() loop and destructor
is not called, the seg fault does not occur.

Why does the QApplication instance throw seg fault when created on stack?
Is this related to destructor clean up issue?

Should the cleanup of resources be done before
qApp->quit() is called using aboutToQuit() signal?

Best Regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20181217/1352b62c/attachment.html>

More information about the Interest mailing list