Details
-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
5.6.3
-
None
Description
There is a ListView with a big amount of items. Each item has string property and it is updated with high intensity (let's assume each 200 ms). A crash observed after scrolling it up and down (from left to right) several times. The crash happens when the list tries to write into the string property in qqmlvmemetaobject.cpp
void QQmlVMEMetaObject::writeProperty(int id, const QString& v) { QV4::MemberData *md = propertiesAsMemberData(); if (md) *(md->data() + id) = cache->engine->newString(v);//<---here }
If modify this method like this:
void QQmlVMEMetaObject::writeProperty(int id, const QString& v) { QV4::MemberData *md = propertiesAsMemberData(); if (md) { QV4::Value *dataPointer = md->data(); auto s = cache->engine->newString(v); *(dataPointer + id) = s; } }
the crash is not observed any more. But, if change the order of getting dataPointer and creating the string it appears again.
void QQmlVMEMetaObject::writeProperty(int id, const QString& v) { QV4::MemberData *md = propertiesAsMemberData(); if (md) { auto s = cache->engine->newString(v);//another order QV4::Value *dataPointer = md->data();// *(dataPointer + id) = s; } }
As far as I see something happens when allocator calls garbage collector and it changes content of "md".