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)

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


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 for Bug 6110 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • 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

Related Links:
Status:
REOPENED

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
	}
}