Bug 17728 - Soft Debugger Index out of bounds error
Summary: Soft Debugger Index out of bounds error
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Debugger ()
Version: 1.10.x
Hardware: PC Mac OS
: --- critical
Target Milestone: ---
Assignee: Joaquin Jares
URL:
Depends on:
Blocks:
 
Reported: 2014-02-12 11:21 UTC by dean.ellis
Modified: 2017-05-31 18:32 UTC (History)
10 users (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 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 dean.ellis 2014-02-12 11:21:18 UTC
This issue was raised by a customer in case #60832

This error seems to always occur on a specific break point. Trying to get a sample app to repro the issue.

02-09 07:06:38.467 W/Mono ( 5348): The request to load the assembly System v2.0.5.0 was remapped to v2.0.0.0
02-09 07:06:38.477 D/Mono ( 5348): Unloading image System.dll [0x3227998].
02-09 07:06:38.477 D/Mono ( 5348): Image addref System[0x2f864d0] -> System.dll[0x1969300]: 22
02-09 07:06:38.477 D/Mono ( 5348): Assembly Ref addref Woot.Views[0x154dc80] -> System[0x19e9718]: 21
Resolved pending breakpoint at 'D:\TFS\Woot\Sources\Woot.Views.Android\Activities\Framework\ActionBarActivity.cs:23,1' to void Woot.Views.Activities.ActionBarActivity.InitActionBarFromLayout () [0x0004e].
Resolved pending breakpoint at 'D:\TFS\Woot\Sources\Woot.Views.Android\Activities\Framework\ActionBarActivity.cs:23,1' to void Woot.Views.Activities.ActionBarActivity.<>c__DisplayClass2.<InitActionBarFromLayout>b__0 (string iconString) [0x0000a].
02-09 07:06:42.791 W/Mono ( 5348): The request to load the assembly System.Core v2.0.5.0 was remapped to v3.5.0.0
02-09 07:06:42.801 D/Mono ( 5348): Unloading image System.Core.dll [0x32c6240].
02-09 07:06:42.801 D/Mono ( 5348): Image addref System.Core[0x32d75e8] -> System.Core.dll[0x1826c48]: 17
02-09 07:06:42.801 D/Mono ( 5348): Assembly Ref addref nVentive.Umbrella.Client[0x1507728] -> System.Core[0x1827120]: 16
02-09 07:06:43.842 D/Mono ( 5348): Assembly Ref addref Woot.Business.Android[0x14d7ce0] -> System.Reactive.Interfaces[0x1545330]: 16
02-09 07:06:43.972 D/Mono ( 5348): Assembly Ref addref Woot.Business.Android[0x14d7ce0] -> System.Reactive.Linq[0x14bf778]: 10
02-09 07:06:43.982 D/Mono ( 5348): Assembly Ref addref Woot.Presentation[0x1508d28] -> nVentive.Umbrella.Web[0x154b558]: 8
02-09 07:06:45.123 D/Mono ( 5348): Assembly Ref addref Woot.Support.Android[0x13e8f08] -> ApplicationFramework.Android[0x14fc648]: 6
02-09 07:06:45.553 D/Mono ( 5348): Assembly Ref addref Woot.Presentation[0x1508d28] -> nVentive.Umbrella.Services.Contracts[0x14c9130]: 8
Mono.IOS.VisualStudio.MonoTouchPackage Error: 0 : MonoAndroidDebuggerSession
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Mono.Debugging.Soft.SoftDebuggerBacktrace.CreateStackFrame(StackFrame frame, Int32 frameIndex)
at Mono.Debugging.Soft.SoftDebuggerBacktrace.GetStackFrames(Int32 firstIndex, Int32 lastIndex)
at Mono.Debugging.Client.Backtrace.GetFrame(Int32 n)
at Mono.Debugging.Client.Backtrace..ctor(IBacktrace serverBacktrace)
at Mono.Debugging.Soft.SoftDebuggerSession.GetThreadBacktrace(ThreadMirror thread)
at Mono.Debugging.Soft.SoftDebuggerSession.HandleBreakEventSet(Event[] es, Boolean dequeuing)
at Mono.Debugging.Soft.SoftDebuggerSession.HandleEventSet(EventSet es)
at Mono.Debugging.Soft.SoftDebuggerSession.EventHandler()
Mono.IOS.VisualStudio.MonoTouchPackage Error: 0 : MonoToolsSession.OnDebuggerException ()
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Mono.Debugging.Soft.SoftDebuggerBacktrace.CreateStackFrame(StackFrame frame, Int32 frameIndex)
at Mono.Debugging.Soft.SoftDebuggerBacktrace.GetStackFrames(Int32 firstIndex, Int32 lastIndex)
at Mono.Debugging.Client.Backtrace.GetFrame(Int32 n)
at Mono.Debugging.Client.Backtrace..ctor(IBacktrace serverBacktrace)
at Mono.Debugging.Soft.SoftDebuggerSession.GetThreadBacktrace(ThreadMirror thread)
at Mono.Debugging.Soft.SoftDebuggerSession.HandleBreakEventSet(Event[] es, Boolean dequeuing)
at Mono.Debugging.Soft.SoftDebuggerSession.HandleEventSet(EventSet es)
at Mono.Debugging.Soft.SoftDebuggerSession.EventHandler()
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Mono.Debugging.Soft.SoftDebuggerBacktrace.CreateStackFrame(StackFrame frame, Int32 frameIndex)
at Mono.Debugging.Soft.SoftDebuggerBacktrace.GetStackFrames(Int32 firstIndex, Int32 lastIndex)
at Mono.Debugging.Client.Backtrace.GetFrame(Int32 n)
at Mono.Debugging.Client.Backtrace..ctor(IBacktrace serverBacktrace)
at Mono.Debugging.Soft.SoftDebuggerSession.GetThreadBacktrace(ThreadMirror thread)
at Mono.Debugging.Soft.SoftDebuggerSession.HandleBreakEventSet(Event[] es, Boolean dequeuing)
at Mono.Debugging.Soft.SoftDebuggerSession.HandleEventSet(EventSet es)
at Mono.Debugging.Soft.SoftDebuggerSession.EventHandler()
Comment 1 Sadik Ali 2014-03-11 09:32:07 UTC
To check this issue I need some scenario/details or piece of code on which break points generate error as mentioned in bug description.
Comment 2 Jerome Laban 2014-03-11 09:35:52 UTC
Hi Ali,

I'm not able to reproduce this issue with a small sample. Is it possible make Mono.Debugging.Soft.SoftDebuggerBacktrace.CreateStackFrame to "fail safe" ?

Thanks,
Comment 3 George Cook 2015-09-02 18:15:09 UTC
I get this constantly tooo.. I can't debug anything from Frozen mountain due to it. Very very irritating.

oaded assembly: Anonymously Hosted DynamicMethods Assembly
Resolved pending breakpoint at 'SpacesDAO.cs:97,1' to bool Giganet.ConferenceServer.Persistence.SpacesDAO.AddPanel (Giganet.Space.Model.Space space, Giganet.Space.Model.Panel panel, bool updateVersion) [0x00085].
Resolved pending breakpoint at 'SpacesDAO.cs:92,1' to bool Giganet.ConferenceServer.Persistence.SpacesDAO.AddPanel (Giganet.Space.Model.Space space, Giganet.Space.Model.Panel panel, bool updateVersion) [0x00054].
Thread started: <Thread Pool> #11
Thread started: <Thread Pool> #12
Loaded assembly: /Users/georgecook/Documents/twin/GEM/gitConferenceServer/ConferenceServer.Tests/bin/Debug/FM.dll
Loaded assembly: /Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/gac/System.Xaml/4.0.0.0__b77a5c561934e089/System.Xaml.dll
Thread finished: TestRunnerThread #9
Thread finished: EventPumpThread #8
ERROR [2015-09-02 17:11:25Z]: Debugger operation failed
System.IndexOutOfRangeException: Array index is out of range.
  at Mono.Debugging.Soft.SoftDebuggerBacktrace.CreateStackFrame (Mono.Debugger.Soft.StackFrame frame, Int32 frameIndex) [0x0010a] in /Users/builder/data/lanes/1980/48d16bc4/source/monodevelop/main/external/debugger-libs/Mono.Debugging.Soft/SoftDebuggerBacktrace.cs:135 
  at Mono.Debugging.Soft.SoftDebuggerBacktrace.GetStackFrames (Int32 firstIndex, Int32 lastIndex) [0x00032] in /Users/builder/data/lanes/1980/48d16bc4/source/monodevelop/main/external/debugger-libs/Mono.Debugging.Soft/SoftDebuggerBacktrace.cs:85 
  at Mono.Debugging.Client.Backtrace.GetFrame (Int32 n) [0x0003e] in /Users/builder/data/lanes/1980/48d16bc4/source/monodevelop/main/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/Backtrace.cs:52 
  at Mono.Debugging.Client.Backtrace..ctor (IBacktrace serverBacktrace) [0x00028] in /Users/builder/data/lanes/1980/48d16bc4/source/monodevelop/main/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/Backtrace.cs:26 
  at Mono.Debugging.Soft.SoftDebuggerSession.GetThreadBacktrace (Mono.Debugger.Soft.ThreadMirror thread) [0x00008] in /Users/builder/data/lanes/1980/48d16bc4/source/monodevelop/main/external/debugger-libs/Mono.Debugging.Soft/SoftDebuggerSession.cs:703 
  at Mono.Debugging.Soft.SoftDebuggerSession.HandleBreakEventSet (Mono.Debugger.Soft.Event[] es, Boolean dequeuing) [0x00364] in /Users/builder/data/lanes/1980/48d16bc4/source/monodevelop/main/external/debugger-libs/Mono.Debugging.Soft/SoftDebuggerSession.cs:1726 
  at Mono.Debugging.Soft.SoftDebuggerSession.HandleEventSet (Mono.Debugger.Soft.EventSet es) [0x0007e] in /Users/builder/data/lanes/1980/48d16bc4/source/monodevelop/main/external/debugger-libs/Mono.Debugging.Soft/SoftDebuggerSession.cs:1447 
  at Mono.Debugging.Soft.SoftDebuggerSession.EventHandler () [0x00034] in /Users/builder/data/lanes/1980/48d16bc4/source/monodevelop/main/external/debugger-libs/Mono.Debugging.Soft/SoftDebuggerSession.cs:1387
Comment 4 Jose Gallardo 2016-12-22 17:57:01 UTC
Hi George, 

There were several fixes on debugging which should be addressed this issue.
Assigning the issue to Joaquin so he can confirm.

Thanks!
Comment 5 Joaquin Jares 2017-05-31 18:32:00 UTC
This has been fixed in runtime. Marking as fixed for internal verification. Please reopen if you're still seeing it.