Bug 3250 - NRE when debugging anonymous types
Summary: NRE when debugging anonymous types
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger ()
Version: Trunk
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Jeffrey Stedfast
Depends on:
Reported: 2012-02-07 09:52 UTC by Marek Safar
Modified: 2012-02-07 15:03 UTC (History)
1 user (show)

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

patch (684 bytes, patch)
2012-02-07 12:43 UTC, Atsushi Eno

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 on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Marek Safar 2012-02-07 09:52:27 UTC
class C
	public static void Main ()
		var a = new {
			Field = MM ()
	static int MM ()
		return 5;	// Set a breakpoint here and hit F11 twice

System.NullReferenceException: Object reference not set to an instance of an object
  at Mono.Debugging.Soft.SoftDebuggerSession.NormalizePath (System.String path) [0x00001] in /home/marek/git/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerSession.cs:1641 
  at Mono.Debugging.Soft.SoftDebuggerBacktrace.CreateStackFrame (Mono.Debugger.Soft.StackFrame frame) [0x0002e] in /home/marek/git/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerBacktrace.cs:86 
  at Mono.Debugging.Soft.SoftDebuggerBacktrace.GetStackFrames (Int32 firstIndex, Int32 lastIndex) [0x00028] in /home/marek/git/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerBacktrace.cs:68 
  at Mono.Debugging.Client.Backtrace.GetFrame (Int32 n) [0x00029] in /home/marek/git/monodevelop/main/src/core/Mono.Debugging/Mono.Debugging.Client/Backtrace.cs:50 
  at Mono.Debugging.Client.Backtrace..ctor (IBacktrace serverBacktrace) [0x00026] in /home/marek/git/monodevelop/main/src/core/Mono.Debugging/Mono.Debugging.Client/Backtrace.cs:26 
  at Mono.Debugging.Soft.SoftDebuggerSession.GetThreadBacktrace (Mono.Debugger.Soft.ThreadMirror thread) [0x00001] in /home/marek/git/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerSession.cs:673 
  at Mono.Debugging.Soft.SoftDebuggerSession.HandleBreakEventSet (Mono.Debugger.Soft.Event[] es, Boolean dequeuing) [0x00224] in /home/marek/git/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerSession.cs:1183 
  at Mono.Debugging.Soft.SoftDebuggerSession.HandleEventSet (Mono.Debugger.Soft.EventSet es) [0x00076] in /home/marek/git/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerSession.cs:1113 
  at Mono.Debugging.Soft.SoftDebuggerSession.EventHandler () [0x00031] in /home/marek/git/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerSession.cs:1050
Comment 1 Atsushi Eno 2012-02-07 12:43:25 UTC
Created attachment 1322 [details]

I encountered possibly same issue and wanted to fix it.
Comment 2 Jeffrey Stedfast 2012-02-07 15:03:54 UTC
Alan hit a similar issue this morning too.

Anyways, I've committed a fix to git master.