Bug 1821 - NullReferenceException when disable breakpoint
Summary: NullReferenceException when disable breakpoint
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger ()
Version: 2.8.1
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2011-11-02 07:14 UTC by bugreport
Modified: 2011-12-09 17:39 UTC (History)
2 users (show)

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

Inactive breakpoint (13.35 KB, image/bmp)
2011-11-02 07:14 UTC, bugreport
possible fix (685 bytes, application/octet-stream)
2011-12-09 17:06 UTC, Jeffrey Stedfast

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 bugreport 2011-11-02 07:14:52 UTC
Created attachment 807 [details]
Inactive breakpoint

System.NullReferenceException: Object reference not set to an instance of an object.

   at MonoDevelop.Debugger.Win32.CorDebuggerSession.OnRemoveBreakEvent(BreakEventInfo bi)

   at Mono.Debugging.Client.DebuggerSession.RemoveBreakEvent(BreakEvent be)

1. Enter debug mode.
2. Create breakpoint in some place, when it look like on picture.
3. Click on it.
Comment 1 bugreport 2011-11-02 07:23:33 UTC
Upd: enter debug mode does not necessarily
Comment 2 Miguel de Icaza [MSFT] 2011-11-14 16:07:04 UTC
I can not reproduce this one
Comment 3 Jeffrey Stedfast 2011-12-09 17:06:15 UTC
Created attachment 1027 [details]
possible fix

If the breakpoint status isn't Bound (for whatever reason), then the handle will be null and that might call a NRE in that method.

The only other possibility I see is if the BreakEvent is itself null, but that doesn't seem likely.
Comment 4 Jeffrey Stedfast 2011-12-09 17:39:58 UTC
applied the patch to git master (which will eventually become 2.8.6, presumably)