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

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


Attachments

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)
http://forums.xamarin.com/discussion/53942/android-debugger-crashes-on-watch-condition-accessing-data#latest

# Test environment (full version information)
Windows 7 Professional SP1 64 Bit
Visual Studio 2015 14.0.23107.0 D14REL
Xamarin   4.0.0.1649 (90e1af2)
Xamarin.Android   6.0.0.27 (9d7074e)
Xamarin.iOS   9.2.1.21 (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 

choose

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
Testcase:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
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.

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.


Create a new report for Bug 35447 on Developer Community or GitHub if you have new information to add and do not yet see a matching report.

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments


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.

Related Links: