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

Incubator crashing when being destroyed

XMLWordPrintable

    • 82eac57ce (dev), e77cb2e38 (6.10), 180506956 (6.9), c60fb1f7f (tqtc/lts-6.8), cf94725ad (tqtc/lts-6.5)

      Incubator can crash when being destroyed because there is no valid pointer check inside QQmlIncubatorPrivate::clear() if called twice. Crash found in the attached back trace file.

      Checking the backtrace, we can find the filename and line number for better understanding.

      In qqmlincubator.cpp:112, where the crash happens, we can see the pointer enginePriv being used without being validated, in the same function line 117 this pointer receives nullptr, so if this function is called twice we have this crash!

      This function, QQmlIncubatorPrivate::clear(), is also called from the destructor, line 101, so calling this function and destroying this class, this function will be called twice causing this crash.

      This is a very difficult issue to reproduce, so it is not possible to provide an example, but the back trace attached is very clear to see the issue, also just checking this pointer in this function.

      Please, provide pointer checker or another way to avoid this function to crash when called twice.

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            cidorvan Cidorvan Leite
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: