<?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: AccessViolationException - LocalRouteTask on the same geodatabase file in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/accessviolationexception-localroutetask-on-the/m-p/661629#M8324</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lina,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to run similar case with 10.2.5 and 10.2.6 but I cannot reproduce the issue. Can you send me a small reproducer to check? You can mail it to akajanus () esri.com. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Jul 2015 09:25:07 GMT</pubDate>
    <dc:creator>AnttiKajanus1</dc:creator>
    <dc:date>2015-07-13T09:25:07Z</dc:date>
    <item>
      <title>AccessViolationException - LocalRouteTask on the same geodatabase file</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/accessviolationexception-localroutetask-on-the/m-p/661628#M8323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using ArcGIS Runtime .NET 10.2.5, and investigating the behaviour of running multiple analysis on different LocalRouteTask instances.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, either following behaviour will occur frequently:&lt;/P&gt;&lt;P&gt;- exception "AccessViolationException" was thrown (based on the code below) and will kill my test application&lt;/P&gt;&lt;P&gt;- NetworkAnalystException was thrown but could be caught. Subsequent execution on route analysis has no issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: the following codes were just for reference, as it is supposed to measure time taken to complete 2 analysis on different LocalRouteTask instances. After&lt;SPAN style="color: #e23d39;"&gt; line X&lt;/SPAN&gt; was executed, then then above behaviours will occur.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am speculating that if more than one LocalRouteTask references the same .geodatabase, and calling SolveAsync() on both tasks simultaneously will cause some issues like above?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;public async void ButtonClick(object sender, EventArgs e)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LocalRouteTask routeTask1 = new LocalRouteTask(Constants.&lt;SPAN style="color: #eb7a3d;"&gt;NetworkDB&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RouteParameters param1 = await routeTask1.GetDefaultTaskParameters();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LocalRouteTask routeTask2 = new LocalRouteTask(Constants.&lt;SPAN style="color: #eb7a3d;"&gt;NetworkDB&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RouteParameters param2 = await routeTask2.GetDefaultTaskParameters();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Task t1 = Task.Run(()=&amp;gt; SolveRoute(routeTask1, param1);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Task t2 = Task.Run(()=&amp;gt; SolveRoute(routeTask2, param2); &lt;SPAN style="color: #e23d39;"&gt; // line X&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; await t1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; await t2;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;public async Task SolveRoute(LocalRouteTask task, RouteParameters param)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; await task.SolveAsync(param);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 06:29:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/accessviolationexception-localroutetask-on-the/m-p/661628#M8323</guid>
      <dc:creator>LinaYap1</dc:creator>
      <dc:date>2015-07-13T06:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: AccessViolationException - LocalRouteTask on the same geodatabase file</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/accessviolationexception-localroutetask-on-the/m-p/661629#M8324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lina,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to run similar case with 10.2.5 and 10.2.6 but I cannot reproduce the issue. Can you send me a small reproducer to check? You can mail it to akajanus () esri.com. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 09:25:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/accessviolationexception-localroutetask-on-the/m-p/661629#M8324</guid>
      <dc:creator>AnttiKajanus1</dc:creator>
      <dc:date>2015-07-13T09:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: AccessViolationException - LocalRouteTask on the same geodatabase file</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/accessviolationexception-localroutetask-on-the/m-p/661630#M8325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you please test with 10.2.6 which got just released&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/net/" title="https://developers.arcgis.com/net/"&gt;https://developers.arcgis.com/net/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if possible please provide a simple repro case here.&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, 17 Jul 2015 17:45:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/accessviolationexception-localroutetask-on-the/m-p/661630#M8325</guid>
      <dc:creator>nakulmanocha</dc:creator>
      <dc:date>2015-07-17T17:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: AccessViolationException - LocalRouteTask on the same geodatabase file</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/accessviolationexception-localroutetask-on-the/m-p/661631#M8326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, right now I am using 10.2.6 to test... The code segment below (&lt;STRONG&gt;ORIGINAL&lt;/STRONG&gt;) also produces the AccessViolationException with 10.2.6 occasionally.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Note if the Exception do not happen on the first run, restart application again. I seem to get this exception 1 out of 5 times.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;I made some slight changes to the original code, and AccessViolationException seems to be eliminated. I have not done rigorous testing yet to ensure that this behave safely...:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;Changes (See &lt;STRONG&gt;UPDATED&lt;/STRONG&gt; code segment below):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;- Remove LocalRouteTask instance creation in Parallel() method.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;- Create LocalRouteTask instance in the SolveAsync() method, and then use that instance to solve route problem.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;This somehow seems eliminates the AccessViolationException.&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="text-decoration: line-through;"&gt;NetworkAnalystException is still thrown sometimes on the first run, with message "Cannot solve".&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;I am guessing that in the original code segment, LocalRouteTask was created in another thread (eg. ThreadID = 10), and then was used to solve routing problem in other threads (eg. ThreadID=15 and ThreadID=16) which might cause the Exception to happen(?). Just my guess - would be nice to know exactly why AccessViolationException happens.&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The following will also cause the AccessViolationException to occur. Don't really suppose it is thread issue...&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void Parallel()&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp; LocalRouteTask task1 = new LocalRouteTask(Constants.NetworkDB);&lt;/P&gt;&lt;P&gt;&amp;nbsp; RouteParameters param1 = await GetParam(...);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; LocalRouteTask task2 = new LocalRouteTask(Constants.NetworkDB);&lt;/P&gt;&lt;P&gt;&amp;nbsp; RouteParameters param2 = await GetParam(...);&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp; for (int i = 0; i &amp;lt; 5; i++)&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; Task t1 = task1.SolveAsync(param1);&lt;/P&gt;&lt;P&gt;&amp;nbsp; Task t2 = task2.SolveAsync(param2);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; await t1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; await t2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ORIGINAL---&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;private async Task&amp;lt;RouteParameters&amp;gt; GetParam(LocalRouteTask task, string dirStyle, bool includeBarrier)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; RouteParameters routeParams = await task.GetDefaultParametersAsync();&lt;/P&gt;&lt;P&gt;&amp;nbsp; routeParams.FindBestSequence = false;&lt;/P&gt;&lt;P&gt;&amp;nbsp; routeParams.PreserveFirstStop = false;&lt;/P&gt;&lt;P&gt;&amp;nbsp; routeParams.PreserveLastStop = false;&lt;/P&gt;&lt;P&gt;&amp;nbsp; routeParams.OutputLines = OutputLine.TrueShapeWithMeasure;&lt;/P&gt;&lt;P&gt;&amp;nbsp; routeParams.DirectionsLengthUnit = LinearUnits.Meters;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;&amp;nbsp; routeParams.DirectionsStyleName = dirStyle;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; routeParams.DirectionsLanguage = new CultureInfo("en-US"); ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; routeParams.ReturnStops = true;&lt;/P&gt;&lt;P&gt;&amp;nbsp; routeParams.ReturnRoutes = true;&lt;/P&gt;&lt;P&gt;&amp;nbsp; routeParams.ReturnDirections = true;&lt;/P&gt;&lt;P&gt;&amp;nbsp; routeParams.ReturnPointBarriers = true;&lt;/P&gt;&lt;P&gt;&amp;nbsp; routeParams.ReturnPolygonBarriers = true;&lt;/P&gt;&lt;P&gt;&amp;nbsp; routeParams.ReturnPolylineBarriers = true;&lt;/P&gt;&lt;P&gt;&amp;nbsp; routeParams.IgnoreInvalidLocations = false;&lt;/P&gt;&lt;P&gt;&amp;nbsp; return routeParams;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;private async void Parallel(object sender, RoutedEventArgs e)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; try&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; MapPoint mp0 = new MapPoint(11541840.7711455, 146578.730235322, SpatialReference.Create(102100));&lt;/P&gt;&lt;P&gt;&amp;nbsp; MapPoint mp1 = new MapPoint(11570869.2480698, 146689.314909319, SpatialReference.Create(102100));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; List&amp;lt;Graphic&amp;gt; stops = new List&amp;lt;Graphic&amp;gt;() { new Graphic(mp0), new Graphic(mp1) };&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; LocalRouteTask task1 = new LocalRouteTask(Constants.NetworkDB);&lt;/P&gt;&lt;P&gt;&amp;nbsp; RouteParameters param1 = await GetParam(task1, Constants.NADesktop, false);&lt;/P&gt;&lt;P&gt;&amp;nbsp; param1.SetStops(stops);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; LocalRouteTask task2 = new LocalRouteTask(Constants.NetworkDB);&lt;/P&gt;&lt;P&gt;&amp;nbsp; RouteParameters param2 = await GetParam(task2, Constants.NADesktop, false);&lt;/P&gt;&lt;P&gt;&amp;nbsp; param2.SetStops(stops);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Stopwatch stopwatch = new Stopwatch();&lt;/P&gt;&lt;P&gt;&amp;nbsp; stopwatch.Start();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; for (int i = 0; i &amp;lt; 5; i++)&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; Task t1 = Task.Run(async () =&amp;gt; { await SolveRouteAsync(1, stopwatch, task1, param1); });&lt;/P&gt;&lt;P&gt;&amp;nbsp; Task t2 = Task.Run(async () =&amp;gt; { await SolveRouteAsync(2, stopwatch, task2, param2); });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; await t1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; await t2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; //stopwatch.Stop();&lt;/P&gt;&lt;P&gt;&amp;nbsp; Console.WriteLine("Parallel timing: " + stopwatch.ElapsedMilliseconds);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; task1.Dispose();&lt;/P&gt;&lt;P&gt;&amp;nbsp; task2.Dispose();&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; catch (AggregateException ex)&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; Console.WriteLine(ex.ToString());&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; catch (Exception ex)&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; Console.WriteLine(ex.ToString());&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;private async Task SolveRouteAsync(int id, Stopwatch stopwatch, LocalRouteTask task, RouteParameters param)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; Console.WriteLine("elapsed run {0}: {1} ", id, stopwatch.ElapsedMilliseconds);&lt;/P&gt;&lt;P&gt;&amp;nbsp; RouteResult t1 = await task.SolveAsync(param).ConfigureAwait(false);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ORIGINAL END---&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&lt;STRONG&gt;UPDATED---&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;private async void Parallel(object sender, RoutedEventArgs e)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; try&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; MapPoint mp0 = new MapPoint(11541840.7711455, 146578.730235322, SpatialReference.Create(102100));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; MapPoint mp1 = new MapPoint(11570869.2480698, 146689.314909319, SpatialReference.Create(102100));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; List&amp;lt;Graphic&amp;gt; stops = new List&amp;lt;Graphic&amp;gt;() { new Graphic(mp0), new Graphic(mp1) };&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; Stopwatch stopwatch = new Stopwatch();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; stopwatch.Start();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; for (int i = 0; i &amp;lt; 5; i++)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; Task t1 = Task.Run(async () =&amp;gt; { await SolveRouteAsync(1, stopwatch, stops); });&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; Task t2 = Task.Run(async () =&amp;gt; { await SolveRouteAsync(2, stopwatch, stops); });&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; await t1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; await t2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; //stopwatch.Stop();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; Console.WriteLine("Parallel timing: " + stopwatch.ElapsedMilliseconds);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; catch (AggregateException ex)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; Console.WriteLine(ex.ToString());&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; catch (Exception ex)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; Console.WriteLine(ex.ToString());&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;private async Task SolveRouteAsync(int id, Stopwatch stopwatch, List&amp;lt;Graphic&amp;gt; stops)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; LocalRouteTask task = new LocalRouteTask(Constants.NetworkDB);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; RouteParameters param = await GetParam(task, Constants.NADesktop, false);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; param.SetStops(stops);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; Console.WriteLine("elapsed run {0}: {1} ", id, stopwatch.ElapsedMilliseconds);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; RouteResult t1 = await task.SolveAsync(param).ConfigureAwait(false);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp; task.Dispose();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2015 06:53:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/accessviolationexception-localroutetask-on-the/m-p/661631#M8326</guid>
      <dc:creator>LinaYap1</dc:creator>
      <dc:date>2015-07-20T06:53:29Z</dc:date>
    </item>
  </channel>
</rss>

