Bug 21294 - "Run -> New Breakpoint" throws NRE from BreakpointPropertiesDialog.SetInitialData() when a non-textual tab has focus
Summary: "Run -> New Breakpoint" throws NRE from BreakpointPropertiesDialog.SetInitial...
Status: VERIFIED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger ()
Version: 5.2
Hardware: PC Mac OS
: High normal
Target Milestone: 5.2
Assignee: David Karlaš
URL:
Depends on:
Blocks:
 
Reported: 2014-07-14 00:50 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2014-07-15 02:00 UTC (History)
4 users (show)

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


Attachments
Log files (2.84 KB, application/zip)
2014-07-14 00:50 UTC, Brendan Zagaeski (Xamarin Team, assistant)
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 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:
VERIFIED FIXED

Description Brendan Zagaeski (Xamarin Team, assistant) 2014-07-14 00:50:47 UTC
Created attachment 7350 [details]
Log files

"Run -> New Breakpoint" throws NullReferenceException from BreakpointPropertiesDialog.SetInitialData() when a non-textual tab has focus.


## Steps to reproduce (example)

1. Create a new console C# project.

2. Double-click "References\System" to open the "System" assembly in the Assembly Browser.

3. Select "Run -> New Breakpoint".


## Result

The breakpoint properties window does not appear. Instead an error dialog pops up with the following message:

> Error while executing command: New Breakpoint...

> System.NullReferenceException: Object reference not set to an instance of an object
>   at MonoDevelop.Debugger.BreakpointPropertiesDialog.SetInitialData () [0x001d4] in /Users/builder/data/lanes/1063/008dc0b6/source/monodevelop/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/BreakpointPropertiesDialog.cs:361 
>   at MonoDevelop.Debugger.BreakpointPropertiesDialog..ctor (Mono.Debugging.Client.BreakEvent be) [0x002af] in /Users/builder/data/lanes/1063/008dc0b6/source/monodevelop/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/BreakpointPropertiesDialog.cs:203 
>   at (wrapper remoting-invoke-with-check) MonoDevelop.Debugger.BreakpointPropertiesDialog:.ctor (Mono.Debugging.Client.BreakEvent)
>   at MonoDevelop.Debugger.DebuggingService.ShowBreakpointProperties (Mono.Debugging.Client.BreakEvent& bp) [0x00003] in /Users/builder/data/lanes/1063/008dc0b6/source/monodevelop/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs:192 
>   at MonoDevelop.Debugger.NewBreakpointHandler.Run () [0x00005] in /Users/builder/data/lanes/1063/008dc0b6/source/monodevelop/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebugCommands.cs:544 
>   at MonoDevelop.Components.Commands.CommandHandler.Run (System.Object dataItem) [0x00002] in /Users/builder/data/lanes/1063/008dc0b6/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandHandler.cs:61 
>   at MonoDevelop.Components.Commands.CommandHandler.InternalRun (System.Object dataItem) [0x00003] in /Users/builder/data/lanes/1063/008dc0b6/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandHandler.cs:42 
>   at MonoDevelop.Components.Commands.CommandManager.DefaultDispatchCommand (MonoDevelop.Components.Commands.ActionCommand cmd, MonoDevelop.Components.Commands.CommandInfo info, System.Object dataItem, System.Object target, CommandSource source) [0x00086] in /Users/builder/data/lanes/1063/008dc0b6/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs:1089 
>   at MonoDevelop.Components.Commands.CommandManager.DispatchCommand (System.Object commandId, System.Object dataItem, System.Object initialTarget, CommandSource source) [0x002fc] in /Users/builder/data/lanes/1063/008dc0b6/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs:1056 


## Result in Xamarin Studio 5.1.3

The "Run -> New Breakpoint" menu item is inactive (greyed-out) unless the current tab is a text editor.

The "Run -> New Function Breakpoint" menu item works regardless of the contents of the current tab. This menu item has been merged into the "New Breakpoint" item in Xamarin Studio 5.2.


## Version information

Xamarin Studio 5.2 (build 366)
Mono 3.6.0 ((no/5ff701f)
GTK+ 2.24.23 (Raleigh theme)

Xcode 5.1 (5084), Build 5B130a

Mac OS X 10.9.3
Comment 2 Saurabh 2014-07-14 03:28:31 UTC
I have also checked this issue and I am also experiencing this issue

Exception Details: https://gist.github.com/saurabh360/c8f7bc221cd69e8c008b
IDE Log: https://gist.github.com/saurabh360/ce2cef741a5fd4e9f33e

=== Xamarin Studio ===

Version 5.2 (build 374)
Installation UUID: 2591d519-875d-4afe-a3d9-5fcf391bbd2d
Runtime:
	Mono 3.6.0 ((no/5ff701f)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 306000037

=== Apple Developer Tools ===

Xcode 4.6.3 (2068)
Build 4H1503

=== Xamarin.Android ===

Version: 4.14.0 (Enterprise Edition)
Android SDK: /Users/nischal/Desktop/android-sdk-macosx
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		3.2   (API level 13)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
Java SDK: /usr
java version "1.6.0_35"
Java(TM) SE Runtime Environment (build 1.6.0_35-b10-428-11M3811)
Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01-428, mixed mode)

=== Xamarin.iOS ===

Version: 7.2.6.22 (Enterprise Edition)
Hash: b983743
Branch: 
Build date: 2014-07-13 20:15:09-0400

=== Xamarin.Mac ===

Version: 1.8.1.4

=== Build Information ===

Release ID: 502000374
Git revision: c44bea18bd950b1696def56a793a020d49c16133
Build date: 2014-07-13 19:41:43-04
Xamarin addins: 8d7daca6f45b75639988b66d681ec7cdb9641f9b

=== Operating System ===

Mac OS X 10.7.4
Darwin nischals-Mac-mini.local 11.4.0 Darwin Kernel Version 11.4.0
    Mon Apr  9 19:32:15 PDT 2012
    root:xnu-1699.26.8~1/RELEASE_X86_64 x86_64

Regression Status: This is working fine with stable X.S 5.1.3 (0)
Comment 3 David Karlaš 2014-07-14 17:11:31 UTC
Fixed in 5.2.0.378
Comment 4 Prashant manu 2014-07-15 02:00:38 UTC
Now Run -> New Breakpoint" opens correctly without showing error, when a non-textual tab has focus.
Screencast: http://screencast.com/t/eOk28RkK

Environment Info:
Xamarin Studio
Version 5.2 (build 378)
Installation UUID: 0b7eaebc-a0ed-4b58-81df-91e378cad28c
Runtime:
	Mono 3.6.0 ((no/5ff701f)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 306000037

Apple Developer Tools
Xcode 4.6.2 (2067.2)
Build 4H1003

Xamarin.iOS
Version: 7.9.2.34 (Enterprise Edition)
Hash: 03abd79
Branch: 
Build date: 2014-07-07 16:37:04-0400

Xamarin.Android
Version: 4.14.0 (Enterprise Edition)
Android SDK: /Android SDK/android-sdk-macosx
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		3.2   (API level 13)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
Java SDK: /usr
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

Xamarin.Mac
Version: 1.8.1.0

Build Information
Release ID: 502000378
Git revision: f51502c8321aeb2e67a445ebddba4354c221c7c8
Build date: 2014-07-14 16:19:43-04
Xamarin addins: 8d7daca6f45b75639988b66d681ec7cdb9641f9b

Operating System
Mac OS X 10.10.0
Darwin Admin-Macs-Mac-mini.local 14.0.0 Darwin Kernel Version 14.0.0
    Mon Jun 30 11:54:42 PDT 2014
    root:xnu-2782.1.20~3/RELEASE_X86_64 x86_64