I’ve had this issue on Windows especially when destroying worker threads on an application exit.
What I ended up doing was sleeping the main thread until each worker threads isRunning() return false; Something like: http://share.dkai.dk/Screen-Shot-2018-12-17-12-01-50-n9RsDe43KW.png I’d love to know if this is the //best// solution to this problem but from what I’ve found it works very well. From: Interest <interest-boun...@qt-project.org> on behalf of Ramakanth Kesireddy <rama.k...@gmail.com> Date: Monday, December 17, 2018 at 11:57 AM To: Qt Interest <interest@qt-project.org> Subject: [Interest] Segmentation fault on exiting Qt event loop Hi, 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, Ramakanth
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest