Bug 3757 - [newresolver] Debugger throws an exception when hitting F5 in a loop
Summary: [newresolver] Debugger throws an exception when hitting F5 in a loop
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger ()
Version: 2.9.x
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2012-03-05 12:31 UTC by Stephen Shaw
Modified: 2012-03-05 12:38 UTC (History)
1 user (show)

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

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:
Status:
RESOLVED FIXED

Description Stephen Shaw 2012-03-05 12:31:35 UTC
If I put a breakpoint on a line in a foreach loop, start debugging my project, and hit F5 I get an exception.

Here is my test:
using System;

namespace DebuggerTest
{
	class MainClass
	{
		public static void Main (string[] args)
		{
			string[] words = {"This", "is", "a", "test", "!"};
			foreach (string s in words) {
				Console.WriteLine ("{0}", words);
			}
		}
	}
}


The exception thrown is:

System.NullReferenceException: Object reference not set to an instance of an object
  at Mono.Debugging.Soft.SoftDebuggerSession.HandleBreakEventSet (Mono.Debugger.Soft.Event[] es, Boolean dequeuing) [0x0013e] in /home/sshaw/code/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerSession.cs:1195 
  at Mono.Debugging.Soft.SoftDebuggerSession.HandleEventSet (Mono.Debugger.Soft.EventSet es) [0x00071] in /home/sshaw/code/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerSession.cs:1128 
  at Mono.Debugging.Soft.SoftDebuggerSession.EventHandler () [0x0002d] in /home/sshaw/code/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerSession.cs:1065
Comment 1 Jeffrey Stedfast 2012-03-05 12:33:52 UTC
this is already fixed in git master
Comment 2 Stephen Shaw 2012-03-05 12:38:53 UTC
awesome, thanks.  And sorry that test is off, but still showed the bug :)

mkrueger updated newresolver and it works now.