SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

FormatException thrown when using debugger in Hex view mode for List<int> under 3.0.0.2970

Last post 09-04-2008 7:43 AM by SocratesJedi. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 09-04-2008 7:43 AM

    FormatException thrown when using debugger in Hex view mode for List<int> under 3.0.0.2970

    Hi, I have encounted a bug in the debugger, I think.

    Description: SharpDevelop throws a FormatException when trying to view numbers contained in a List<int> (or List<uint>, I assume it is all primitive numerical types) when the debugger is set to show numbers in hex mode.

    Expected behavior: When the debugger is set to hex mode, numbers in List<int> datastructures show up as 0x(number) in the debugger.
    Actual behavior: When the debugger is in hex mode, numbers in List<int> datastructures can not be viewed because an exception is thrown in the debugger.

     Reproduction steps:

     (1) Begin a new C# console application
     (2) Write the following short program:

    using System;
    using System.Collections.Generic;

    namespace HexBugInvestigation
    {
        class Program
        {
            public static void Main(string[ args)
            {
                List<int> list = new List<int>();
                list.Add(5);
                int pause = 3;
            }
        }
    }

      (3) Set a breakpoint on the line pause = 3
      (4) Run the program in the debugger
      (5) Mouse over "pause"; when it shows you that it equals 0 right click on zero and select "Show values in hexidecimal"
      (6) Mouse over list; Expand the structure in the debugger as follows: list > IList
      (7) Observe the format exception error occurs (If it was working, we'd expect it to say say "Item[0]" assigned to 0x5)

    I will moniter the forum; please let me know if I can be of further assistance or if this report was unclear.  Error message is below.

    SocratesJedi

    Error message:

    SharpDevelop Version : 3.0.0.2970
    .NET Version         : 2.0.50727.1434
    OS Version           : Microsoft Windows NT 6.0.6001 Service Pack 1
    Current culture      : English (United States) (en-US)
    Working Set Memory   : 83896kb
    GC Heap Memory       : 15155kb

    Exception thrown:
    System.FormatException: Input string was not in a correct format.
       at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
       at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
       at Debugger.AddIn.TreeModel.IListNode.<GetChildNodes>d__0.MoveNext()
       at Debugger.AddIn.TreeModel.DynamicTreeDebuggerRow.SetChildContentRecursive(IEnumerable`1 contentEnum)
       at Debugger.AddIn.TreeModel.DynamicTreeDebuggerRow.OnExpanding(DynamicListEventArgs e)
       at ICSharpCode.SharpDevelop.Widgets.TreeGrid.DynamicTreeRow.OnPlusClick(Object sender, DynamicListEventArgs e)
       at ICSharpCode.SharpDevelop.Widgets.TreeGrid.DynamicListItem.PerformClick(DynamicList list)
       at ICSharpCode.SharpDevelop.Widgets.TreeGrid.DynamicList.OnClick(EventArgs e)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ContainerControl.WndProc(Message& m)
       at System.Windows.Forms.UserControl.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    SocratesJedi
Page 1 of 1 (1 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.