Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.10.0, 5.10.1
-
None
-
Os: Mac OS (10.13.3) and Ubuntu (16 LTS & 17)
Build: Debug & Release
Controls: Quick controls 2
-
1ac41150501d3c5cc4a9a6ed9c93729687666553 (qt/qtlocation/dev) 24273e2249082a904b326c16a1913bcef3a37367 (qt/qtlocation/5.12.4)
Description
Use the attached QML to reproduce the bug.
- After the map is visible there is a MapPolygon on the map.
- 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
For Gerrit Dashboard: QTBUG-67638 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
250523,2 | Fix crash when removing items from MapboxGL maps | dev | qt/qtlocation | Status: MERGED | +2 | 0 |
263218,3 | Fix crash when removing items from MapboxGL maps | 5.12.4 | qt/qtlocation | Status: MERGED | +2 | 0 |