[Interest] assertion inside QQmlNotifierEndpoint::connect
Vlad Stelmahovsky
vladstelmahovsky at gmail.com
Fri Feb 9 18:51:51 CET 2018
QPointer might help you to control QObject's lifetime
On Fri, Feb 9, 2018 at 6:38 PM, Alexander Ivash <elderorb at gmail.com> wrote:
> Hi,
>
> There is a code like the following:
>
> QVariant objectNameVariant = item->property( "objectName" );
> QString objectNameString = objectNameVariant.toString();
> qDebug () << "objectNameString: " << objectNameString;
>
> QVariant keyboardEnabledVariant = item->property( "keyboardEnabled" );
> bool keyboardEnabled = keyboardEnabledVariant.toBool();
> qDebug () << "keyboardEnabled: " << keyboardEnabled;
>
> QVariant keyboardRaisedVariant = item->property( "keyboardRaised" );
> bool keyboardRaised = keyboardRaisedVariant.toBool();
> qDebug () << "keyboardRaised: " << keyboardRaised;
>
> .. and I'm investigating occasional crashes on the line "QVariant
> keyboardRaisedVariant = item->property( "keyboardRaised" );"
>
> The first crash was confronted under the Linux/Qt 5.9.1 but it is also
> reproducible on both Windows and Linux with Qt 5.10 (although not 100% of
> time).
>
> Based on what I see in DEBUG it happens because of null 'engine' inside
> QQmlNotifierEndpoint::connect. But under what conditions engine could
> become null?
>
> The only idea I have at the moment is that 'item' gets garbage-collected
> by the time of querying 'keyboardRaised' but I'm not sure how to prove it.
> What other possible theories makes sense to check?
>
> Regards, Alexander
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
--
Best regards,
Vlad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180209/8ea9b423/attachment.html>
More information about the Interest
mailing list