Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-72347

Crash in ListView

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 5.6.3
    • None
    • Linux/Other display system

    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".

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            apriadka Alexandr Pryadka
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes