<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: AGSZipException occurs when using retrieveImageAsyncForTile, crashing application in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agszipexception-occurs-when-using/m-p/276252#M2535</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK, I found the issue. Some of my tile requests were not coming from the main thread and this is what was causing the leak.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Jun 2012 15:20:13 GMT</pubDate>
    <dc:creator>JasonScharf</dc:creator>
    <dc:date>2012-06-22T15:20:13Z</dc:date>
    <item>
      <title>AGSZipException occurs when using retrieveImageAsyncForTile, crashing application</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agszipexception-occurs-when-using/m-p/276246#M2529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The exception thrown is an AGSZipException and it is thrown at AGSZipFile.m line 83.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My call stack looks like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;AGSZipFile initWithFileName&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AGSFileStream initWithPath&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AGSFileStream fileStreamForReadingAtPath&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AGSVFileReader open&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AGSLocalTileRequestOperation main&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am dispatching my tile requests one at a time and waiting the the requests to complete before proceeding. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Why do I get an exception that the TPK can't be opened after I have successfully fetched many tiles?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can someone tell me what is the specific error condition causing this exception?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there any way I can trap this exception so it at least does not bring down my entire app?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jason&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2012 18:10:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agszipexception-occurs-when-using/m-p/276246#M2529</guid>
      <dc:creator>JasonScharf</dc:creator>
      <dc:date>2012-06-20T18:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: AGSZipException occurs when using retrieveImageAsyncForTile, crashing application</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agszipexception-occurs-when-using/m-p/276247#M2530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK, so the 128th call to retrieveImageAsyncForTile crashes the application every time. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Examining an IO trace shows the TPK file being opened and read, but not closed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Either the TPK file is mistakenly being re-opened by the local tile layer many times, or it is simply not being closed properly.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2012 18:32:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agszipexception-occurs-when-using/m-p/276247#M2530</guid>
      <dc:creator>JasonScharf</dc:creator>
      <dc:date>2012-06-20T18:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: AGSZipException occurs when using retrieveImageAsyncForTile, crashing application</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agszipexception-occurs-when-using/m-p/276248#M2531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If possible, could you please post the tpk file and a crash dump so we can look at the issue?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nimesh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2012 14:49:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agszipexception-occurs-when-using/m-p/276248#M2531</guid>
      <dc:creator>NimeshJarecha</dc:creator>
      <dc:date>2012-06-21T14:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: AGSZipException occurs when using retrieveImageAsyncForTile, crashing application</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agszipexception-occurs-when-using/m-p/276249#M2532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Nimesh,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The TPK is probably too large to post here, but I'll try and get a crash dump for you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can confirm that the problem is the TPK file being opened every time retrieveImageAsyncForTile is called, leading to an exhaustion of file handles.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only time that the TPK file is closed is when the AGSLocalTileRequestOperation is disposed. I have verified this by manually disposing it. Manually disposing it is not an option, of course, because it is owned by the API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My question now is this: Does the map itself use retrieveImageAsyncforTile to fetch tiles, or some other method when using AGSLocalTiledLayer? If an alternate, private method is used, would it be possible to post the signature of the method so I can invoke it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2012 15:23:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agszipexception-occurs-when-using/m-p/276249#M2532</guid>
      <dc:creator>JasonScharf</dc:creator>
      <dc:date>2012-06-21T15:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: AGSZipException occurs when using retrieveImageAsyncForTile, crashing application</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agszipexception-occurs-when-using/m-p/276250#M2533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi Nimesh,&lt;BR /&gt;&lt;BR /&gt;The TPK is probably too large to post here, but I'll try and get a crash dump for you.&lt;BR /&gt;&lt;BR /&gt;I can confirm that the problem is the TPK file being opened every time retrieveImageAsyncForTile is called, leading to an exhaustion of file handles.&lt;BR /&gt;&lt;BR /&gt;The only time that the TPK file is closed is when the AGSLocalTileRequestOperation is disposed. I have verified this by manually disposing it. Manually disposing it is not an option, of course, because it is owned by the API.&lt;BR /&gt;&lt;BR /&gt;My question now is this: Does the map itself use retrieveImageAsyncforTile to fetch tiles, or some other method when using AGSLocalTiledLayer? If an alternate, private method is used, would it be possible to post the signature of the method so I can invoke it?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Do I understand correctly: you are manually kicking off tile requests? If so, this is not how the AGSLocalTiledLayer is intended to be used. You should just instantiate it and add it to the map. The map will handle retrieving the tiles and closing the file handle when needed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Eric&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2012 16:43:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agszipexception-occurs-when-using/m-p/276250#M2533</guid>
      <dc:creator>EricIto</dc:creator>
      <dc:date>2012-06-21T16:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: AGSZipException occurs when using retrieveImageAsyncForTile, crashing application</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agszipexception-occurs-when-using/m-p/276251#M2534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Eric,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using it to pull out a number of tiles from a TPK, I don't necessarily need the map. What I need is the tiles. How does the map fetch tiles from the layer? Does it use retrieveImageAsyncForTile or some other undocumented method?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2012 17:02:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agszipexception-occurs-when-using/m-p/276251#M2534</guid>
      <dc:creator>JasonScharf</dc:creator>
      <dc:date>2012-06-21T17:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: AGSZipException occurs when using retrieveImageAsyncForTile, crashing application</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agszipexception-occurs-when-using/m-p/276252#M2535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK, I found the issue. Some of my tile requests were not coming from the main thread and this is what was causing the leak.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2012 15:20:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agszipexception-occurs-when-using/m-p/276252#M2535</guid>
      <dc:creator>JasonScharf</dc:creator>
      <dc:date>2012-06-22T15:20:13Z</dc:date>
    </item>
  </channel>
</rss>

