Bug 35447 - Android Debugger Crashes on watch condition accessing "Data"
Summary: Android Debugger Crashes on watch condition accessing "Data"
Alias: None
Product: Runtime
Classification: Mono
Component: General (show other bugs)
Version: 4.2.0 (C6)
Hardware: PC Windows
: --- blocker
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-11-02 02:37 UTC by Benjamin Gmeiner
Modified: 2015-11-18 00:07 UTC (History)
8 users (show)

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


Description Benjamin Gmeiner 2015-11-02 02:37:22 UTC
# Steps to reproduce
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"

# Expected behavior
Data object is evaluated or an error is shown if Data doesn't exist in the current context

# Actual behavior
Visual Studio crashes if "Data" doesn't exist in the current Context

# Supplemental info (logs, images, videos)

# Test environment (full version information)
Windows 7 Professional SP1 64 Bit
Visual Studio 2015 14.0.23107.0 D14REL
Xamarin (90e1af2)
Xamarin.Android (9d7074e)
Xamarin.iOS (9ce9e8b)

Also occurs on VS 2013 and Xamarin stable branch.
Comment 3 Benjamin Gmeiner 2015-11-05 05:34:30 UTC
It seems to only happen on Xamarin Forms Projects...

So instead of 

File -> New -> Project -> Blank App Android 


File -> New -> Project -> Blank App (Xamarin.Forms.Portable)

I thought it also occured on native Android Apps but it seems that I was mistaken.
Comment 4 Benjamin Gmeiner 2015-11-10 10:31:31 UTC
Where you able to reproduce it using Xamarin Forms?
Comment 5 Joaquin Jares 2015-11-16 14:55:41 UTC
We reproed. 

I'm moving the bug to Runtime, since this also affects XS and the root cause of the failure is in a runtime component. The fail is related to trying to find symbols for Façade Assemblies (always present in Forms, and that's why it doesn't repro in non-forms apps).

This line throws an exception when referencing facades in Android, not sure about iOS: https://github.com/mono/debugger-libs/blob/master/Mono.Debugging.Soft/SoftDebuggerAdaptor.cs#L1346
Comment 6 Zoltan Varga 2015-11-16 22:35:27 UTC
Why is this a mono runtime problem ?
Comment 7 Joaquin Jares 2015-11-17 06:10:43 UTC
Spoke with Zoltan. We have a possible fix. I'll try it in a few hours.
Comment 8 Zoltan Varga 2015-11-17 08:39:22 UTC
This actually only happens for 'Data', because there is global type with that name in System.Globalization, and the runtime has a problem loading it.
Comment 9 Zoltan Varga 2015-11-17 08:44:30 UTC
using System;
using System.Reflection;

public class Tests
	public static void Main (String[] args) {
		var a = Assembly.Load ("System.Globalization");
		a.GetType ("Data");
Comment 10 Zoltan Varga 2015-11-18 00:07:29 UTC
Fixed in mono master a2c475bcbee3a2739b91fe535a58253f755540bb.

Note You need to log in before you can comment on or make changes to this bug.