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

[QML Map] Application crashes when deleting MapPolygon from MapboxGL

    XMLWordPrintable

Details

    • 1ac41150501d3c5cc4a9a6ed9c93729687666553 (qt/qtlocation/dev) 24273e2249082a904b326c16a1913bcef3a37367 (qt/qtlocation/5.12.4)

    Description

      Use the attached QML to reproduce the bug.

      1. After the map is visible there is a MapPolygon on the map.
      2. 2. Click the red button to remove the polygon.

      The application crashes when the polygon is deleted because of:  libc++abi.dylib: Pure virtual function called!

      The crash is reproducible only with MapboxGL map plugin because some of the map items are store into the QGeoMapMapboxGLPrivate and they need to be removed from there.

       

      See the attached callstack for the crash.

      The problem is that a virtual function is called in the base class destructor in QDeclarativeGeoMapItemBase::~QDeclarativeGeoMapItemBase. 
      The crash appear only if the map item is not removed before destructor is called from the map. If the item _quickMap is valid it will call removeMapItem and this internally it will call a virtual method itemType(), but this is of type  QDeclarativeGeoMapItemBase => call to pure virtual function.

      Attachments

        1. debugger_stack.txt
          3 kB
        2. main.qml
          1 kB
        3. stack.tasks
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            paangele Paolo Angelelli
            mariuss Marius S
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes