[Interest] Segmentation fault on exiting Qt event loop

Ramakanth Kesireddy rama.kesi at gmail.com
Tue Jan 1 17:48:59 CET 2019


Hi,

Please find the sample application attached which throws segmentation fault
on click of Quit button in the UI.

However, in the actual application, if we delete the custom widget and
QApplication instance, then it throws segmentation fault on qApp->quit().

If we destroy any QObject without parent, then there is no seg error on
qApp->quit().

Does this error occurs because of double destroy that we manually destroy
objects and later qt also tried to destroy them?

Please let me know if it is correct to say that widgets(custom widgets with
parent) are destroyed by qt but any QObject created without parent needs to
be destroyed manually?

Best Regards,
Ramakanth

On Fri, Dec 21, 2018 at 4:24 AM Thiago Macieira <thiago.macieira at intel.com>
wrote:

> On Wednesday, 19 December 2018 16:34:55 -02 Thiago Macieira wrote:
> >  1) Short: 200 lines or less
> >  2) Self-contained: single file, no #includes other than Qt's and STL's
> >  3) Compileable: unless you meant to show a compilation problem
> >  4) Example: demonstrates your problem.
> >
> > http://sscce.org/
>
> One more thing:
> 5) is tested with a *supported* Qt version. That's 5.9 or 5.12 today.
>
> I understand you're working with 4.8. I don't care.
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
>
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20190101/d73ce1bc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_slot_quit.zip
Type: application/x-zip-compressed
Size: 34450 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20190101/d73ce1bc/attachment.bin>


More information about the Interest mailing list