# Unknown exception when first diplay the maps

**URL:** <https://community.thinkgeo.com/t/unknown-exception-when-first-diplay-the-maps/2705>\
**Category:** WPF\
**Created:** [June 28, 2010, 6:39am UTC](https://community.thinkgeo.com/t/unknown-exception-when-first-diplay-the-maps/2705 "2010-06-28T06:39:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guillaume](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/g/c67d28/32.png) [@Guillaume](https://community.thinkgeo.com/u/Guillaume)\
**Post date:** [June 28, 2010, 6:39am UTC](https://community.thinkgeo.com/t/unknown-exception-when-first-diplay-the-maps/2705/1 "2010-06-28T06:39:48Z")

</div>

Hello,

I'm&nbsp;trying&nbsp;to&nbsp;integrate&nbsp;your&nbsp;new&nbsp;component&nbsp;in&nbsp;our&nbsp;application.&nbsp;

I&nbsp;use&nbsp;a&nbsp;WmsOverlay&nbsp;in&nbsp;order&nbsp;to&nbsp;display&nbsp;the&nbsp;maps&nbsp;from&nbsp;a&nbsp;WsmServer.&nbsp;Sometimes,&nbsp;when&nbsp;starting&nbsp;the&nbsp;map,&nbsp;I&nbsp;get&nbsp;this&nbsp;exception&nbsp;:

Unknown&nbsp;Exception&nbsp;:

System.InvalidOperationException:&nbsp;Der&nbsp;Enumerator&nbsp;ist&nbsp;ungültig,&nbsp;da&nbsp;sich&nbsp;die&nbsp;Auflistung&nbsp;geändert&nbsp;hat.  
  
&nbsp;&nbsp;&nbsp;bei&nbsp;System.Windows.Media.VisualCollection.Enumerator.MoveNext()  
  
&nbsp;&nbsp;&nbsp;bei&nbsp;ThinkGeo.MapSuite.WpfDesktopEdition.TileOverlay.xe960bd1c67737f90(Object&nbsp;xe0292b9ed559da7d,&nbsp;EventArgs&nbsp;xfbf34718e704c6bc)  
  
&nbsp;&nbsp;&nbsp;bei&nbsp;ThinkGeo.MapSuite.WpfDesktopEdition.Tile.OnOpened(EventArgs&nbsp;args)  
  
&nbsp;&nbsp;&nbsp;bei&nbsp;ThinkGeo.MapSuite.WpfDesktopEdition.Tile.set\_IsOpened(Boolean&nbsp;value)  
  
&nbsp;&nbsp;&nbsp;bei&nbsp;ThinkGeo.MapSuite.WpfDesktopEdition.UriTile.xe06cd10e03ff9f1d(MemoryStream&nbsp;xd3b1b0f69a96cdf8)  
  
&nbsp;&nbsp;&nbsp;bei&nbsp;ThinkGeo.MapSuite.WpfDesktopEdition.UriTile.x72e495c788ab064e(Object&nbsp;xe0292b9ed559da7d,&nbsp;RunWorkerCompletedEventArgs&nbsp;xfbf34718e704c6bc)  
  
&nbsp;&nbsp;&nbsp;bei&nbsp;System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs&nbsp;e)  
  
&nbsp;&nbsp;&nbsp;bei&nbsp;System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(Object&nbsp;arg)  
  
&nbsp;&nbsp;&nbsp;bei&nbsp;System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate&nbsp;callback,&nbsp;Object&nbsp;args,&nbsp;Boolean&nbsp;isSingleParameter)  
  
&nbsp;&nbsp;&nbsp;bei&nbsp;System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object&nbsp;source,&nbsp;Delegate&nbsp;callback,&nbsp;Object&nbsp;args,&nbsp;Boolean&nbsp;isSingleParameter,&nbsp;Delegate&nbsp;catchHandler)  
  
&nbsp;

If&nbsp;I&nbsp;translate&nbsp;the&nbsp;message&nbsp;in&nbsp;English,&nbsp;it&nbsp;means&nbsp;that&nbsp;the&nbsp;enumerator&nbsp;is&nbsp;invalid,&nbsp;because&nbsp;the&nbsp;collection&nbsp;was&nbsp;modified&nbsp;while&nbsp;we&nbsp;are&nbsp;looping&nbsp;on&nbsp;it.

Sorry,&nbsp;but&nbsp;I&nbsp;cannot&nbsp;give&nbsp;you&nbsp;more&nbsp;informations,&nbsp;because&nbsp;I&nbsp;can&nbsp;not&nbsp;break&nbsp;into&nbsp;code...

Any&nbsp;suggestion&nbsp;?  
  
Many&nbsp;thanks,  
  
Guillaume.

---

<div class="post-metadata">

**Author:** ![Howard](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/h/90ced4/32.png) [@Howard](https://community.thinkgeo.com/u/Howard)\
**Post date:** [June 28, 2010, 8:34pm UTC](https://community.thinkgeo.com/t/unknown-exception-when-first-diplay-the-maps/2705/2 "2010-06-28T20:34:05Z")

</div>

Hi&nbsp;Guilaume,

Thanks&nbsp;for&nbsp;evaluating&nbsp;Wpf&nbsp;Desktop&nbsp;Edition.&nbsp;I&nbsp;cannot&nbsp;recreate&nbsp;your&nbsp;issue;&nbsp;but&nbsp;when&nbsp;I&nbsp;track&nbsp;the&nbsp;code&nbsp;by&nbsp;the&nbsp;pasted&nbsp;information,&nbsp;I&nbsp;think&nbsp;it&nbsp;has&nbsp;high&nbsp;risk&nbsp;to&nbsp;have&nbsp;the&nbsp;same&nbsp;issue&nbsp;you&nbsp;have&nbsp;in&nbsp;multi-thread.&nbsp;So&nbsp;I&nbsp;optimize&nbsp;the&nbsp;code&nbsp;and&nbsp;it&nbsp;might&nbsp;fix&nbsp;it.

Please&nbsp;access&nbsp;[helpdesk.thinkgeo.com/](http://helpdesk.thinkgeo.com/);&nbsp;then&nbsp;download&nbsp;our&nbsp;latest&nbsp;version&nbsp;which&nbsp;is&nbsp;later&nbsp;than&nbsp;4.0.55.&nbsp;If&nbsp;it&nbsp;still&nbsp;cannot&nbsp;fix&nbsp;your&nbsp;issue,&nbsp;please&nbsp;provide&nbsp;us&nbsp;your&nbsp;WmsServer&nbsp;uri&nbsp;and&nbsp;your&nbsp;OS&nbsp;information&nbsp;so&nbsp;that&nbsp;I&nbsp;can&nbsp;recreate&nbsp;your&nbsp;issue.

Thanks,  
  
Howard

---

<div class="post-metadata">

**Author:** ![Guillaume](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/g/c67d28/32.png) [@Guillaume](https://community.thinkgeo.com/u/Guillaume)\
**Post date:** [June 29, 2010, 2:06am UTC](https://community.thinkgeo.com/t/unknown-exception-when-first-diplay-the-maps/2705/3 "2010-06-29T02:06:29Z")

</div>

Hello&nbsp;Howard,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thansk&nbsp;for&nbsp;you&nbsp;help.&nbsp;  
&nbsp;&nbsp;  
&nbsp;The&nbsp;Problem&nbsp;is&nbsp;that&nbsp;I&nbsp;don’t&nbsp;have&nbsp;any&nbsp;access&nbsp;the&nbsp;the&nbsp;daily&nbsp;development&nbsp;Build&nbsp;downloads&nbsp;for&nbsp;this&nbsp;new&nbsp;WpfControl.&nbsp;I&nbsp;only&nbsp;see&nbsp;the&nbsp;DesktopFullEdition&nbsp;and&nbsp;the&nbsp;Silverlight&nbsp;Edition&nbsp;in&nbsp;the&nbsp;daily&nbsp;build&nbsp;dowloads.&nbsp;  
&nbsp;However&nbsp;I&nbsp;have&nbsp;acces&nbsp;to&nbsp;the&nbsp;Wpf&nbsp;Desktop&nbsp;Edition&nbsp;in&nbsp;the&nbsp;Purchased&nbsp;products&nbsp;downloads&nbsp;section.&nbsp;  
&nbsp;Therefore&nbsp;I&nbsp;can&nbsp;only&nbsp;download&nbsp;the&nbsp;4.0.40.0&nbsp;version&nbsp;for&nbsp;this&nbsp;new&nbsp;component.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Can&nbsp;you&nbsp;please&nbsp;do&nbsp;something&nbsp;for&nbsp;that&nbsp;?&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks,&nbsp;  
&nbsp;Guillaume.&nbsp;

---

<div class="post-metadata">

**Author:** ![Howard](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/h/90ced4/32.png) [@Howard](https://community.thinkgeo.com/u/Howard)\
**Post date:** [June 29, 2010, 3:09am UTC](https://community.thinkgeo.com/t/unknown-exception-when-first-diplay-the-maps/2705/4 "2010-06-29T03:09:25Z")

</div>

Hello&nbsp;Guillaume,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Sorry&nbsp;for&nbsp;the&nbsp;inconvenience;&nbsp;Wpf&nbsp;Desktop&nbsp;Edition&nbsp;is&nbsp;a&nbsp;new&nbsp;control&nbsp;in&nbsp;MapSuite&nbsp;product&nbsp;family;&nbsp;it&nbsp;cannot&nbsp;be&nbsp;downloaded&nbsp;from&nbsp;the&nbsp;address&nbsp;I&nbsp;posted&nbsp;above.&nbsp;I’ll&nbsp;contact&nbsp;our&nbsp;support&nbsp;and&nbsp;send&nbsp;you&nbsp;the&nbsp;latest&nbsp;build&nbsp;tomorrow.&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;letting&nbsp;us&nbsp;know.&nbsp;  
&nbsp;Howard

---

<div class="post-metadata">

**Author:** ![Guillaume](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/g/c67d28/32.png) [@Guillaume](https://community.thinkgeo.com/u/Guillaume)\
**Post date:** [June 29, 2010, 3:45am UTC](https://community.thinkgeo.com/t/unknown-exception-when-first-diplay-the-maps/2705/5 "2010-06-29T03:45:16Z")

</div>

Hello&nbsp;Howard,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Many&nbsp;thanks,&nbsp;I’ll&nbsp;wait&nbsp;tomorow.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;Guillaume.

---

<div class="post-metadata">

**Author:** ![Howard](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/h/90ced4/32.png) [@Howard](https://community.thinkgeo.com/u/Howard)\
**Post date:** [June 29, 2010, 4:25am UTC](https://community.thinkgeo.com/t/unknown-exception-when-first-diplay-the-maps/2705/6 "2010-06-29T04:25:30Z")

</div>

Hi&nbsp;Guillaume,&nbsp;  
&nbsp;&nbsp;  
&nbsp;You&nbsp;are&nbsp;welcome,&nbsp;please&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;me&nbsp;know&nbsp;if&nbsp;you&nbsp;have&nbsp;any&nbsp;more&nbsp;queries.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks,&nbsp;  
&nbsp;Howard
