Bug 16175 - VS2012 crash with System.ArgumentNullException / related to Mono debugger
Summary: VS2012 crash with System.ArgumentNullException / related to Mono debugger
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: dean.ellis
: 17067 ()
Depends on:
Reported: 2013-11-13 00:49 UTC by baramuse
Modified: 2016-08-03 15:23 UTC (History)
8 users (show)

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

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:

Description baramuse 2013-11-13 00:49:04 UTC

lately I'm experiencing crashes when stopping a debug session of an Xamarin.Android project.
Happens randomly but would say at least once a day..

Value cannot be null.
Parameter name: key

The stacktrace is :

   at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
   at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
   at Mono.Debugging.Client.DebuggerSession.RemoveBreakEvent(BreakEvent be)
   at Mono.Debugging.Client.DebuggerSession.<>c__DisplayClass35.<OnBreakpointRemoved>b__33()
   at Mono.Debugging.Client.DebuggerSession.<>c__DisplayClassb.<Dispatch>b__9(Object param0)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

Hope this is enough.

Comment 1 Dominique Louis 2013-11-13 06:39:21 UTC
  Could you please provide some more detailed repro steps to help us identify what might be causing this.

Just to confirm you are using the 4.10.1 Alpha release?
Comment 2 baramuse 2013-11-13 19:26:09 UTC

I'm using Xamarin.Android 4.10.01057 (62077ce0).

The crash really is random so hard to give you repro steps.
It only happens when I lauched the app in debug mode, and the later hit the "stop" button though. 
Crashes say 1/10 times.

Comment 3 baramuse 2013-11-18 00:08:19 UTC
4th time today... and I loose all my user preferences until last visual studio launch with every crash.

Starts to be really annoying.
Comment 4 PJ 2013-11-19 16:38:21 UTC
This bug was targeted for a past milestone, moving to the next active non-hotfix milestone.
Comment 5 dean.ellis 2013-11-22 09:33:11 UTC
Looks like under certain circumstances we attempt to Delete a breakpoint twice, the second time around the breakpoint is already null. 

Fixed in XamarinVS/master/258fd9d
Comment 6 dean.ellis 2014-01-06 09:30:49 UTC
*** Bug 17067 has been marked as a duplicate of this bug. ***
Comment 7 marcelo.garciacasil 2014-02-10 04:24:58 UTC

I'm having exactly the same issue described by baramuse. However, I'm using Xamarin.iOS for VS and not the Android one. The stack trace is identical and the frequency of the crashes is the same too.

It's crashed 7 times today so far... it's extremely annoying and it decreases my productivity.

I'm using version 1.10.39

Any help on the matter would be greatly appreciated.

Comment 8 dean.ellis 2014-02-10 04:28:54 UTC
This bug has been fixed and will be in the next release. There is currently no way to work around the issue since its intermittent.
Comment 9 marcelo.garciacasil 2014-02-10 04:30:29 UTC
Do you have an ETA for the next release please?
Comment 10 baramuse 2014-02-11 23:50:05 UTC
10 days to fix the bug, that's great !
3 months and still not released...that's REALLY annoying!
Comment 11 baramuse 2014-04-14 21:17:29 UTC
Guys ?
Still having the bug with VS2013 & Xamarin.Android 4.12.03003 (7f0e3d3c)

Are you ever going publish the fix or do you just don't want us to use Visual studio with Xamarin ?
Comment 12 marcelo.garciacasil 2014-04-21 23:32:18 UTC
My VS keeps crashing about 10 times per day due to this bug - this is a huge drag on productivity.

Is there any concrete plan to ever fixing it?
Comment 13 Pete Davis 2014-04-23 15:21:45 UTC
Same as Marcelo. This bug is a huge productivity killer. PLEASE deploy it ASAP.
Comment 14 Arpit Jha 2015-07-15 01:52:53 UTC
I have checked this issue with XVS 3.11.666 + XI and its working fine
at my end.

For now I am closing this issue Feel free to reopen this issue if you are
facing again.