<?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: ArcGISRuntime hangs when reusing a CompositeSymbol (Repro sample included) in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/arcgisruntime-hangs-when-reusing-a-compositesymbol/m-p/50171#M554</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have updated the repro project to use the latest 100.3 ArcGISRuntime and problem persists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also updated it so you don't need to restart between tests. Just hit the "Start Test" repeatedly button until the app freezes. It usually takes only a few clicks before the problem manifests.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be much appreciated.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Jul 2018 18:44:17 GMT</pubDate>
    <dc:creator>RichardMcGough</dc:creator>
    <dc:date>2018-07-11T18:44:17Z</dc:date>
    <item>
      <title>ArcGISRuntime hangs when reusing a CompositeSymbol (Repro sample included)</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/arcgisruntime-hangs-when-reusing-a-compositesymbol/m-p/50170#M553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We create a CompositeSymbol using two symbols, a SimpleMarkerSymbol for the background and a PictureMarkerSymbol created from a RuntimeImage as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SimpleMarkerSymbol background = new SimpleMarkerSymbol() { Color = this.BackgroundColor, Style = SimpleMarkerSymbolStyle.Circle, Size = this.Size };&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; ImageSource img = new BitmapImage(new Uri(@"pack://application:,," + this.IconPath, UriKind.RelativeOrAbsolute));&lt;BR /&gt; RuntimeImage runtimeimage = await img.ToRuntimeImageAsync();&lt;/P&gt;&lt;P&gt;PictureMarkerSymbol picsymbol = new PictureMarkerSymbol(runtimeimage) { Height = this.Size, Width = this.Size };&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CompositeSymbol composite = new CompositeSymbol();&lt;BR /&gt; composite.Symbols.Add(background);&lt;BR /&gt; composite.Symbols.Add(picsymbol);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We save this symbol in a dictionary so we can reuse it rather than creating a new one each time it is needed. There appears to be some kind of race condition that causes the ArcGISRuntime to hang about 33% of the time we&amp;nbsp;run the attached sample application. Pausing the Debugger during the hang shows that the application has stopped after the sample code attempts to add the graphic to the GraphicsOverlay:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this.m_Overlay.Graphics.Add(cg);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The call stack shows that the execution stopped in this method:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Esri.ArcGISRuntime.dll!RuntimeCoreNet.GeneratedWrapper.CoreVector.Insert( ....)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="412112" alt="Call stack " class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/412112_ImageCacheTest_CallStack.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When running the attached sample, you must restart it between tests. It usually only takes two or three attempts before it hangs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there something wrong with this approach to caching CompositeImages, or is it a bug in the ArcGISRuntime? Please let me know if there is a better approach or a workaround. Caching the images is important because we use thousands of them they take a lot of overhead to create (in our real app the background is a more complicated bitmap).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2018 19:13:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/arcgisruntime-hangs-when-reusing-a-compositesymbol/m-p/50170#M553</guid>
      <dc:creator>RichardMcGough</dc:creator>
      <dc:date>2018-06-22T19:13:37Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGISRuntime hangs when reusing a CompositeSymbol (Repro sample included)</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/arcgisruntime-hangs-when-reusing-a-compositesymbol/m-p/50171#M554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have updated the repro project to use the latest 100.3 ArcGISRuntime and problem persists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also updated it so you don't need to restart between tests. Just hit the "Start Test" repeatedly button until the app freezes. It usually takes only a few clicks before the problem manifests.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be much appreciated.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2018 18:44:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/arcgisruntime-hangs-when-reusing-a-compositesymbol/m-p/50171#M554</guid>
      <dc:creator>RichardMcGough</dc:creator>
      <dc:date>2018-07-11T18:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGISRuntime hangs when reusing a CompositeSymbol (Repro sample included)</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/arcgisruntime-hangs-when-reusing-a-compositesymbol/m-p/50172#M555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was not able to find a solution, but I did make the following observations:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;The problem is not CompositeSymbol, it is PictureMarkerSymbol. Using only PictureMarkerSymbol still demonstrates the issue&lt;/LI&gt;&lt;LI&gt;If you do not clear the cache, it works without hanging, and this is probably what you want to do anyway, at least until (or even if)&amp;nbsp; the cache grows too large&lt;/LI&gt;&lt;LI&gt;Caching just the RuntimeImage, but recreating the symbol for each graphic each time also works correctly&lt;/LI&gt;&lt;LI&gt;Adding Trace output statements in the loop (slowing it down) makes it work. Not a solution or workaround but perhaps a clue as the root cause of the problem.&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2018 14:09:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/arcgisruntime-hangs-when-reusing-a-compositesymbol/m-p/50172#M555</guid>
      <dc:creator>CharlesRoberts1</dc:creator>
      <dc:date>2018-07-19T14:09:46Z</dc:date>
    </item>
  </channel>
</rss>

