Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.1
-
None
Description
This is somewhat related to the comment here
http://bugreports.qt.nokia.com/browse/QTBUG-9670?focusedCommentId=113191&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_113191
and seen with QML compiled from qt/qt-qml and HEAD at 5eb8e749bdd60ce93737b96f8f736796dfa77281
It seems a QML item that was added to a javascrip array and then deleted turn the
array element into something that is neither null nor the string "null" yet its toString() return "null".
(I guess it's some kind of tombstone QObject...)
If dropTargets is a javascrip array containing QML items, of which the first three has been deleted and its toString() return
"null,null,null,DragAndDropArea_QMLTYPE_94_QML_97(0x9ba2378),DragAndDropArea_QMLTYPE_171_QML_187(0x9abbbe0)"
then
var target = dropTargets[0]; if(target.toString() == "null")
is true, but
if(!target || target === null || target === undefined)
is not, and
if(target == "null")
cause this crash
ASSERT: "scriptClass(scopeNode) == enginePrivate->contextClass" in file qml/qdeclarativeobjectscriptclass.cpp, line 171