[Interest] Segmentation fault on exiting Qt event loop
rama.kesi at gmail.com
Tue Dec 18 07:14:01 CET 2018
Thanks for your mail..Yes did try with valgrind but couldn't detect memory
issue may be due to the way our app is designed using threading.
But wondering why it throws segmentation fault if qApp instance is created
on stack but not on Heap as I understand that it is mandatory to construct
qApp instance on stack by design.
On Mon, 17 Dec, 2018, 23:58 Thiago Macieira <thiago.macieira at intel.com
> On Monday, 17 December 2018 02:43:36 PST Ramakanth Kesireddy wrote:
> > Why does the QApplication instance throw seg fault when created on stack?
> Because there's a bug somewhere. It's likely the problem is in your code.
> recommend trying to valgrind your application and/or reducing it until you
> find what the issue is.
> > Should the cleanup of resources be done before
> > qApp->quit() is called using aboutToQuit() signal?
> Not necessarily. You can clean up after exec() finished. Just remember
> you must clean up all widgets before the QApplication destructor and
> all QObjects before the QCoreApplication one. Depending on unload-time
> destructors is prone to problems.
> Thiago Macieira - thiago.macieira (AT) intel.com
> Software Architect - Intel Open Source Technology Center
> Interest mailing list
> Interest at qt-project.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Interest