Forum Visual Studio
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Android Debugger Crashes on watch condition accessing "Data"

So this majorly ruined the last few days for me and nearly got me to my breaking point. I even completely reinstalled xamarin because of this and tried pretty much everything else (including updating to alpha channel).

Here's what happened: Everytime I hit a breakpoint in my android project the debugger would crash within a few seconds with the debug output:

10-16 15:04:44.255 F/ (19701): not yet implemented
10-16 15:04:44.255 F/libc (19701): Fatal signal 6 (SIGABRT), code -6 in tid 19726 (Thread-1613)
Mono.Debugger.Soft.VMDisconnectedException: Exception of type 'Mono.Debugger.Soft.VMDisconnectedException' was thrown.
at Mono.Debugger.Soft.Connection.SendReceive(CommandSet command_set, Int32 command, PacketWriter packet)
at Mono.Debugger.Soft.Connection.Assembly_GetType(Int64 id, String name, Boolean ignoreCase)
at Mono.Debugger.Soft.AssemblyMirror.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
at Mono.Debugging.Soft.SoftDebuggerAdaptor.GetType(EvaluationContext ctx, String name, Object[] typeArgs)
at Mono.Debugging.Evaluation.NRefactoryExpressionEvaluatorVisitor.VisitIdentifierExpression(IdentifierExpression identifierExpression)
at ICSharpCode.NRefactory.CSharp.IdentifierExpression.AcceptVisitor[T](IAstVisitor1 visitor) at Mono.Debugging.Evaluation.NRefactoryExpressionEvaluatorVisitor.VisitAssignmentExpression(AssignmentExpression assignmentExpression) at ICSharpCode.NRefactory.CSharp.AssignmentExpression.AcceptVisitor[T](IAstVisitor1 visitor)
at Mono.Debugging.Evaluation.NRefactoryExpressionEvaluator.Evaluate(EvaluationContext ctx, String expression, Object expectedType)
at Mono.Debugging.Evaluation.ObjectValueAdaptor.GetExpressionValue(EvaluationContext ctx, String exp)

After a few days of despair and trying everything I finally found the issue:

I had this statement in the visual studio watch window:

Data = new MyType();

Now everytime the debugger hit a breakpoint, visual studio switched to the watch windows and tried to evaluate that expression and for whatever reason this causes the crash.

I found that everything relating to "Data" will crash the android debugger (just the expression "Data" is causing the crash), except if the current class has some property called data:

public class MyClass{
  public String Data;
}

Happens in Visual Studio 2013 and 2015 with stable, beta and alpha channel (not with Xamarin Studio / iOS).

Steps to reproduce:
1) Create new Xamarin Android project
2) Hit a breakpoint with the debugger
3) Switch to watch window
4) Enter new expression "Data"

I've also attached a screenshot and the adb logs.

Sign In or Register to comment.