[Qt-interest] crash during QObject::connect
Thomas Ehrnhoefer
thomas.ehrnhoefer at tasktop.com
Fri Sep 9 18:09:17 CEST 2011
I was afraid of that, but at least I found the issue. Of course it's my own
stupidity :)
>From a previous version, I still had a
"taskListController->deleteLater();"in my sidebar's deconstructor. For
the changed design, this is no longer
needed, and in fact the crash only happened if I once switched from the
"tasklist" sidebar to another one, than reopened the tasklist sidebar.
I guess the "deleteLater" cause the controller to be deleted just at the
time when I called connect.
Thanks for you help anyway, sorry for wasting your time.
Thomas
On Fri, Sep 9, 2011 at 8:25 AM, Thiago Macieira <thiago at kde.org> wrote:
> On Friday, 9 de September de 2011 07:44:43 Thomas Ehrnhoefer wrote:
> > Hi
> >
> > I am experiencing a reproducable crash when
> > QObject::connect(controller, SIGNAL(onModelChanged(MyModel*)), this,
> > SLOT(onModelChanged(MyModel*)),Qt::UniqueConnection);
> > is called.
> >
> > In fact, it works once, but on a second run (same controller, but
> different
> > "this"), it crashes. I am wondering what all the thing are that happen
> > behind the scenes here, to figure out why it crashes. I do know that the
> > following line does not get executed.
>
> Please try the following, in order:
>
> 1) valgrind your application and fix any and all errors related to your own
> code. Qt errors you may ignore are in the SSSE3 QPainter code.
>
> 2) look at the backtrace of the crash and inspect all pointers used the
> line
> that crashed (or the deepest line belonging to your program, before Qt code
> is
> called). Certify that they are all valid.
>
> 3) if all else fails, make a testcase. Your target is 200 lines of C++
> code.
> Remove everything that isn't related to the crash.
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
> Software Architect - Intel Open Source Technology Center
> PGP/GPG: 0x6EF45358; fingerprint:
> E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
>
--
Thomas Ehrnhoefer
Software Developer, http://tasktop.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110909/27647eb3/attachment.html
More information about the Qt-interest-old
mailing list