MapView occasionally freezes

3036
8
12-05-2013 12:27 PM
JasonKnisley
Occasional Contributor
I've trying to diagnose an intermittent problem and I'm hoping that someone can help me out. I developed an app that is being used for offline data collection, and occasionally it freezes during panning or zooming. When I say freezes, I mean that the tiles from an ArcGISLocalTiledLayer partially load and then the MapView becomes unresponsive and ceases to load any more tiles. I've witnessed this across a variety of different tpk files used for the tiled layer.

Looking in LogCat, there are no errors being logged and gestures still trigger ArcGIS.Gesture entries. I wrote some code to zoom the map to different points every few seconds, and even when the map view freezes I still see my LogCat entries zooming to different locations on the MapView... getCenter() correctly returns the new zoom point and getScale() returns the new scale, even though the MapView tiles don't change. The rest of the UI normally remains responsive (for example, tapping a button will still open a DialogFragment) although sometimes tapping a button while the MapView is frozen will result in a dialog stating that the application has stopped responding.

I can only assume that an error is being thrown in a background thread as it is processing the bitmaps for the tiles, but it seems completely random. For example, after randomly generating 100 points and scales on the first run I put those into an array so that now the first 100 pan/zoom iterations are always the same so that I can have some consistency between tests. Sometimes it freezes after a dozen or so iterations, other times it can go well into the hundreds before finally freezing, leading me to believe it's not a problem with the tpk file itself because the error never consistently occurs in any one place.

Any ideas how I can go about debugging this, or at the very least programmatically detect when the MapView becoming unresponsive so that I can reload it without users having to close out and reload the application?
0 Kudos
8 Replies
JasonAllen
New Contributor
I have the exact same problem. Maybe Dano could respond?
0 Kudos
ArunKoul
New Contributor
Hi Jason Knisley/Jason Allen,

Did anyone of you guys resolved this problem? Even I have the same problem.
0 Kudos
teamIgal
New Contributor III
Hello,

I am having the same issue with the new SDK.
Also - i see that the events of panning and rotating map are being catched, but the GUI is not moving.

Any idea for a solution?
0 Kudos
ThomasBinu
New Contributor III
I have also been having the same issues after upgrading to the ArcGIS 10.2 SDK. Please help
0 Kudos
DanO_Neill
Occasional Contributor III
I developed an app that is being used for offline data collection, and occasionally it freezes during panning or zooming.


Do you have any code you can share from your app?  Can you isolate the issue or reproduce it with any of our samples?  Does this happen on any specific device(s)? 

Did anyone of you guys resolved this problem? Even I have the same problem.


Is this the issue you are referring to?
0 Kudos
JasonKnisley
Occasional Contributor
Dan,

Thank you for following up on this, and I apologize that it's taken a couple weeks for me to respond. Here's some more information about the specifics of the map freeze problem that I've witnessed.


  1. I have witnessed this in versions 10.1.1 and in 10.2 of the ArcGIS Runtime SDK.

  2. It seems to be more likely to occur with touch-triggered panning and zooming rather than programmatic panning and zooming, but that may just be perception.

  3. I've witnessed it on 5 different Asus Tranformer Pad Infinity TF700Ts. It's the only tablet model that we are currently using for Android ArcGIS applications.

  4. As arunkoul also mentioned, event listeners still trigger while the mapView is frozen. For example, if I make the motion to pan the map and print out the new extent in the logs, I can see that the extent changes. Likewise, I can still tap a point on the mapView and see the coordinates being logged while the mapView is frozen. Once frozen, the mapView never unfreezes. The rest of the UI remains responsive.

  5. So far I've only done extensive testing with a mapView containing offline layers. That is, an ArcGISLocalTiledLayer initialized with a tpk stored on an SD card, plus several ArcGISFeatureLayers initialized with JSON layer definitions and FeatureSets.


I don't have any specific code to share. I've never experienced the problem while the application has been in the middle of processing any custom code on the UI thread, and it has happened without any listeners set on the mapView.

I will try testing some of the samples as well. The hardest part with isolating this problem is that it's incredibly intermittent and doesn't print any errors to the logs when it does freeze. As I mentioned in my first post, it's not repeatable; it may freeze at a certain extent one time, but then I can reload the app and programmatically go back to the same extent with no problem.
0 Kudos
teamIgal
New Contributor III
I am experiencing the same issues as written above.
I tryed to build a new app with as little code as posible. I added one local TPK map from SD card as well.
I am testing on Samsung S3 with android 4.1.1 and the problem still occures.

Thanks,
Ilona
0 Kudos
BojanBukovic
New Contributor
Hello,

has anyone found a solution/workaround to this issue?
I am facing the same problem with SDK version 10.2 on different devices I've tested - Galaxy Note 10.1, Nexus 7, Transformer...
I've also tried to reinitialize the mapView after this problem occurs, but no success - it stays frozen.
In earlier versions of SDK I have noticed some other issues - lagging while panning, zooming... so downgrading is not the best option.

Kind Regards,
Bojan
0 Kudos