Titanium JIRA Archive
Appcelerator Modules (MOD)

[MOD-2374] iOS: Ti.Map - Crash when updating multiple annotations

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2020-05-20T06:37:42.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsMap
Labelsios, ti.map
ReporterLuc-Edmond Gaspard
AssigneeVikas Goyal
Created2017-11-24T21:11:14.000+0000
Updated2020-05-20T06:37:42.000+0000

Description

When updating a large number of annotations, the application closes without any message. I attached an example, after 2 or 3 click on the update button, the app will crash.

Attachments

FileDateSize
map_ios_crash.js2017-11-24T20:54:41.000+00001334
MOD-2374_log.txt2020-05-20T06:37:30.000+000040284

Comments

  1. Sharif AbuDarda 2017-11-24

    Hello, This is a valid bug, I was able to reproduce the issue with Map 3.0.1 version in SDK 6.3.0.GA in iOS 11 Simulator. The app crash with updating annotation without showing any error in the log. Thanks.
  2. Hans Knöchel 2017-11-26

    I just validated the issue and it was never supposed to work in the past as well. The reason is because (different to Android), iOS annotations cannot change their latitude / longitude but should re-add the annotations to redraw the map. This may work for a few annotations where Titanium tries to re-append each of them, but it was never implemented to work for multiple annotations, as the re-adding will occur for each latitude / longitude setter, so in this case 600 times. We can consider supporting this, but until now, re-add the annotations with the updated location properties. Read more about this common native iOS behavior here: - https://stackoverflow.com/questions/14131345/ios-refresh-annotations-on-mapview
  3. Vikas Goyal 2020-04-16

    PR: https://github.com/appcelerator-modules/ti.map/pull/292
  4. Saumya Rai 2020-05-20

    Verified on below environment: *Mac OS X *= 10.15 *Node.js Version* = 12.16.0 *CLI Version* = 5.2.2 *iOS Simulator* = iPhone 11 Pro Max *iOS Version* = 13.3 *Xcode*=11.3.1 *SDK Version *= 9.1.0.v20200514121733 *ti.map version*= 3.3.1 (ios) Working fine so closing this ticket. (Attached log for reference)

JSON Source