Bug 31965 - System.ArgumentException: An item with the same key has already been added.
Summary: System.ArgumentException: An item with the same key has already been added.
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Debugger ()
Version: 3.11 (C5)
Hardware: Macintosh Mac OS
: Highest normal
Target Milestone: 4.0.0 (C6)
Assignee: Bugzilla
URL:
: 32361 ()
Depends on:
Blocks:
 
Reported: 2015-07-15 07:42 UTC by arx iT
Modified: 2016-05-10 17:04 UTC (History)
12 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Screenshot of the error (84.16 KB, image/png)
2015-07-15 07:42 UTC, arx iT
Details
Application Source Code (23 bytes, text/plain)
2015-07-15 07:59 UTC, arx iT
Details
Source Code (43 bytes, text/plain)
2015-08-17 04:18 UTC, arx iT
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description arx iT 2015-07-15 07:42:05 UTC
Created attachment 12037 [details]
Screenshot of the error

Hi,

I'm facing a bug while debugging an ios application with Visual Studio.

After a few play with the application with the debugger connected, I have an error message in visual studio (see in attachement).
It seems to happen when a new thread is running with a number already used before (thread #10 in the example below).
I'm using the Google maps component in my project, so the map tiles fetching system must be the one which generate so uch threads.

When using the application without the debugger attached, I have no problems. But it's impossible to debug, because the problem appear whithin some seconds after the application launch.

Here's an extract from the output window :

Thread started:  #8
Thread started:  #9
Thread started:  #10
Thread started:  #11
Thread started:  #12
Thread started:  #13
Thread started:  #14
Thread started:  #15
Thread started:  #16
Thread started:  #17
Thread started: <Thread Pool> #18
Thread started:  #19
Thread started:  #20
Thread started:  #21
Thread started:  #22
Thread started:  #23
Thread started:  #24
Thread started:  #25
Thread started:  #26
Thread started:  #27
Thread started:  #28
Thread started:  #29
Thread started:  #30
Thread started:  #31
Thread started:  #32
Thread started:  #10
System.ArgumentException: An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at Xamarin.VisualStudio.Debugger.Process.OnThreadStart(Object sender, TargetEventArgs args)
   at Mono.Debugging.Client.DebuggerSession.OnTargetEvent(TargetEventArgs args)
   at Mono.Debugging.Soft.SoftDebuggerSession.HandleThreadStartEvents(ThreadStartEvent[] events)
   at Mono.Debugging.Soft.SoftDebuggerSession.HandleEventSet(EventSet es)
   at Mono.Debugging.Soft.SoftDebuggerSession.EventHandler()
Comment 2 Arpit Jha 2015-08-06 09:35:08 UTC
I have checked this issue with XVS 3.11.666 + XI 8.10.3.2 and unable to reproduce this issue.

Could you please provide us sample project,So that we can able to reproduce this issue at our end.

For now, Sample Project removed from stored location.
Comment 4 arx iT 2015-08-17 04:19:09 UTC
Comment on attachment 12530 [details]
Source Code

Here's the source code
Comment 5 Rand Lennox 2015-09-02 11:19:34 UTC
*** Bug 32361 has been marked as a duplicate of this bug. ***
Comment 6 Rand Lennox 2015-09-02 11:21:18 UTC
Additional information may be available in bug https://bugzilla.xamarin.com/show_bug.cgi?id=32361 

I closed that one as a duplicate of this.
Comment 7 Joaquin Jares 2015-09-16 08:54:23 UTC
This has now been fixed in master and will be available in the next alpha refresh.
Comment 8 Danish Akhtar 2015-10-09 06:15:25 UTC
I have tried to verify this issue with latest C6 builds, but getting another issue while the running the app with this builds, so I have Reported another Bug 34711 for the same.