Bug 6110 - Expand icon is visible even if there is nothing to expand
Summary: Expand icon is visible even if there is nothing to expand
Status: REOPENED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger (show other bugs)
Version: Trunk
Hardware: All All
: Low normal
Target Milestone: Future Cycle (TBD)
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-07-13 05:08 UTC by Marek Safar
Modified: 2017-09-01 14:03 UTC (History)
2 users (show)

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


Attachments
HasChildren.patch (14.93 KB, patch)
2012-09-06 18:00 UTC, Jeffrey Stedfast
Details | Diff

Description Marek Safar 2012-07-13 05:08:09 UTC
using System.Diagnostics;

public class Program
{
	class C
	{
		[DebuggerBrowsable (DebuggerBrowsableState.Never)]
		int a;
	}
	
	public static void Main ()
	{
		var c = new C ();
		
		return; // watch c variable, MD shows expand triangle for no reason
	}
}
Comment 1 Jeffrey Stedfast 2012-07-18 17:32:51 UTC
Fixed in git master.

Also fixed cases where a class literally has no children.
Comment 2 Jeffrey Stedfast 2012-09-06 18:00:24 UTC
Created attachment 2466 [details]
HasChildren.patch

Had to revert this patch as it was causing InvalidStackFrameExceptions when querying for the actual children later (wtf!?!?) in some cases... but not always. Weird.
Comment 3 Jeffrey Stedfast 2012-09-06 18:02:19 UTC
Sample test case for the future when I get time to track down the issue:


using System;
using System.Collections.Generic;

class C
{
	static void PopulateDict (List<int> list, Dictionary<string,string> dict)
	{
		for (int i = 0; i < 100; i++) {
			dict.Add ("Key: " + i.ToString (), "Value: " + i.ToString ());
			list.Add (i);
		}
	}

	public static void Main ()
	{
		var dict = new Dictionary<string,string> ();
		var list = new List<int> ();
		PopulateDict (list, dict);

		Console.WriteLine (list);
		Console.WriteLine (dict); // break on this line and inspect/expand 'list' - it should show an error
	}
}

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