Application crash when zooming to GPS location

4750
5
05-03-2012 01:17 AM
RudolfKopriva
New Contributor
When I start GPS with default auto panning and zoomin quickly several times to the GPS location, the application tries to alloc about 50MB and it crashes on iPad 1. The allocated memory request comes from: AGSGPSAccuracyCircleLayer drawInContext:. I believe it tries to draw GPS accuracy circle without scalling it (so the circle is very large). I have tried to hide the gps on zoomin or even stop gps, but it still renders the circle and crashes. It doesn't happen if I don't start gps at all. How can I avoid the memory allocation?
0 Kudos
5 Replies
RudolfKopriva
New Contributor
Found workaround: It was probably caused by my custom implementation of TiledLayer, because it works fine for AGSTiledMapServiceLayer. The workaround was to add AGSTiledMapServiceLayer before the custom TiledLayer. It's strange, because both layers have the same tileinfo and SRS.
0 Kudos
NimeshJarecha
Esri Regular Contributor
It'll be interesting to know why it's crashing with your custom tiled layer. If possible, please share the sample application which demonstrates the issue.

Regards,
Nimesh
0 Kudos
RudolfKopriva
New Contributor
It'll be interesting to know why it's crashing with your custom tiled layer. If possible, please share the sample application which demonstrates the issue.

Regards,
Nimesh


Thank you Nimesh, you can download the sample from this link: http://dl.dropbox.com/u/37816650/ArcGIS/CustomTiledLayerCrashing.zip
It crashes on my new iPad. You can see the peak and malloc while profiling the simulator. See comments in the code.
0 Kudos
NimeshJarecha
Esri Regular Contributor
The first look at your custom tiled layer says that it's incomplete. You're not setting the _units. Just set "_units = AGSUnitsMeters;" in the init method and it should stop crashing.

Regards,
Nimesh
0 Kudos
RudolfKopriva
New Contributor
The first look at your custom tiled layer says that it's incomplete. You're not setting the _units. Just set "_units = AGSUnitsMeters;" in the init method and it should stop crashing.

Regards,
Nimesh


It works, thank you. Excellent support.
0 Kudos