Bug 1253 - Hex editor crashes MD when deleting everything
Summary: Hex editor crashes MD when deleting everything
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: Trunk
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Mike Krüger
Depends on:
Reported: 2011-10-05 07:30 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2011-10-11 10:52 UTC (History)
1 user (show)

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:

Description Rolf Bjarne Kvinge [MSFT] 2011-10-05 07:30:19 UTC

echo abc > data

open the 'data' file using the hex editor in MD.
select everything (ctrl-a)
hit backspace

System.NullReferenceException: Object reference not set to an instance of an object
  at Mono.MHex.Data.PieceTable.Remove (Int64 offset, Int64 length) [0x0006c] in /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.HexEditor/Mono.MHex.Data/PieceTable.cs:275 
  at Mono.MHex.Data.HexEditorData.Remove (Int64 offset, Int64 count) [0x00011] in /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.HexEditor/Mono.MHex.Data/HexEditorData.cs:171 
  at Mono.MHex.Data.HexEditorData.Remove (ISegment segment) [0x00000] in /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.HexEditor/Mono.MHex.Data/HexEditorData.cs:164 
  at Mono.MHex.Data.HexEditorData.DeleteSelection () [0x0003b] in /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.HexEditor/Mono.MHex.Data/HexEditorData.cs:266 
  at Mono.MHex.DeleteActions.Backspace (Mono.MHex.Data.HexEditorData data) [0x0000b] in /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.HexEditor/Mono.MHex/DeleteActions.cs:37 
  at Mono.MHex.SimpleEditMode.HandleKeypress (Key key, UInt32 unicodeChar, ModifierType modifier) [0x00019] in /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.HexEditor/Mono.MHex/SimpleEditMode.cs:183 
  at Mono.MHex.Data.EditMode.InternalHandleKeypress (Mono.MHex.HexEditor editor, Key key, UInt32 unicodeChar, ModifierType modifier) [0x00007] in /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.HexEditor/Mono.MHex.Data/EditMode.cs:46 
  at Mono.MHex.HexEditor.OnKeyPressEvent (Gdk.EventKey evt) [0x00016] in /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.HexEditor/Mono.MHex/HexEditor.cs:683 
  at Gtk.Widget.keypressevent_cb (IntPtr widget, IntPtr evnt) [0x00000] in <filename unknown>:0 

and MD exits.
Comment 1 Mike Krüger 2011-10-11 10:52:15 UTC