[Interest] assertion inside QQmlNotifierEndpoint::connect

Alexander Ivash elderorb at gmail.com
Fri Feb 9 18:38:39 CET 2018


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180209/f9e23018/attachment.html>


More information about the Interest mailing list