[iOS 12/13] VectorKit->Texture2D crashes in the tile rendering process.

Number:rdar://7408720 Date Originated:Oct 25, 2019 at 12:38 PM
Status:Reopened Resolved:NO
Product:iOS SDK + MapKit Product Version:iOS 11, 12, 13
Classification: Reproducible:Yes
Reason to reopen:

We continue to see crashes in the VectorKit code. In the last crash report, Apple mentioned that it was fixed in iOS 12.
We provided Apple the confidential files with a crash report and diagnostic overview. They show that iOS 12 and 13 still have this issue.
Now we are waiting for an explanation about the current status for this crash and any plans to fix it.

Apple Feedback number is FB7408720

↓↓↓ Old radar https://openradar.appspot.com/radar?id=6146190257160192 ↓↓↓


We found that the test app crashes when it's releasing a MKMapView object at the render process. The map has a hybrid style and rendering only the Apple's tiles.
Most of the time it happens after second attempt when tiles are cached.
Please run the attached test app and check the crash logs.

Steps to Reproduce:
1) Open app on iOS 11.
2) Tap the 'Show Map Screen' button
3) The Map View Controller is appeared
4) The map rendered all tiles
5) Tap the 'Close Map' button
6) Quickly repeat open/close the map screen

If you installed the test app first time please wait to cache Apple's tiles (You need to see them on the map). If you can not crash then re-run app and try on the device too. If you are not lucky then use the marks in the MapViewController class. Please follow them and uncomment necessary lines of code.

Expected Results:
Should not be a crash.

Actual Results:
The crash happens in 2-8 attempts.

The source code is attached.

iOS 11 on iPhone/iPad device

Project here: https://github.com/dedmakarMD/Texture2D_Crash

Email from Apple:

"Hello Anatoli,

There has been a status change for an issue you reported in Bug ID 40739139. 

The original bug report is now awaiting final verification. If you still see this issue in the latest beta releases, please file a new bug report using Bug Reporter. 

For problems logging in to Bug Reporter, contact Apple Developer Support.

For other bug reporting issues, contact the Developer Bug Reporting Team.

Developer Bug Reporting Team
Apple Worldwide Developer Relations"


Apple answered:

This code patch no longer exists in iOS 13.

By anatoli.macarov at Nov. 21, 2019, 10:49 p.m. (reply...)

My comment:

Can you validate that this crash happens in case of low memory? My conclusion comes from the crash report where the SIGSEGV exception occurs when code attempts to access memory that has recently been freed. I assume that the VectorKit tries to access an invalid memory which not mapped to object (SEGV_MAPERR) or has invalid permissions for mapped object SEGV_ACCERR. It depends on low memory because periodically our app has a heavy map-drawing process. Did you have this experience in your tests?

By anatoli.macarov at Nov. 21, 2019, 10:49 p.m. (reply...)

Apple answered:

Apple Nov 4, 2019 at 5:45 PM Please verify this issue with the iOS 13.2 GM and update your bug report with your results by logging into https://feedbackassistant.apple.com (https://feedbackassistant.apple.com/) or by using the Feedback Assistant app.

iOS 13.2 GM (17B84) https://developer.apple.com/download/ Posted Date: Oct 28th, 2019

If the issue persists, please provide a new callstack with iOS 13.2

For a complete list of logging instructions visit: https://developer.apple.com/bug-reporting/profiles-and-logs/

By anatoli.macarov at Nov. 5, 2019, 5:58 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!