_js

AGSZipException occurs when using retrieveImageAsyncForTile, crashing application

Discussion created by _js on Jun 20, 2012
Latest reply on Jun 22, 2012 by _js
Hi,

I'm using an AGSLocalTiledLayer to extract numerous tiles from a TPK package. I'm able to extract a number of tiles but after requesting some the application crashes saying it cannot open by TPK file.

The exception thrown is an AGSZipException and it is thrown at AGSZipFile.m line 83.

My call stack looks like this:

AGSZipFile initWithFileName
AGSFileStream initWithPath
AGSFileStream fileStreamForReadingAtPath
AGSVFileReader open
...
AGSLocalTileRequestOperation main

I am dispatching my tile requests one at a time and waiting the the requests to complete before proceeding.

Why do I get an exception that the TPK can't be opened after I have successfully fetched many tiles?
Can someone tell me what is the specific error condition causing this exception?
Is there any way I can trap this exception so it at least does not bring down my entire app?


Thanks,
Jason

Outcomes