Bug 6082 - System.ArgumentException: Local variable doesn't belong to this frame's method.
Summary: System.ArgumentException: Local variable doesn't belong to this frame's method.
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger ()
Version: 3.0.x
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2012-07-11 14:01 UTC by Chris Hamons
Modified: 2013-11-20 13:03 UTC (History)
1 user (show)

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


Attachments
Call Stack (31.49 KB, text/plain)
2012-07-11 14:01 UTC, Chris Hamons
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:
RESOLVED FIXED

Description Chris Hamons 2012-07-11 14:01:27 UTC
Created attachment 2186 [details]
Call Stack

I've run into this multiple times while debugging MonoMac projects. Occasionally after hitting continue from a breakpoint the application will never continue and i'll see this stack.

Unable to reproduce in a test case yet.

MonoDevelop 3.0.3.2

System.ArgumentException: Local variable doesn't belong to this frame's method.
  at Mono.Debugger.Soft.StackFrame.GetValue (Mono.Debugger.Soft.LocalVariable var) [0x00000] in <filename unknown>:0 
  at Mono.Debugging.Soft.VariableValueReference.get_Value () [0x00000] in <filename unknown>:0 
  at Mono.Debugging.Evaluation.ValueReference.OnCreateObjectValue (Mono.Debugging.Client.EvaluationOptions options) [0x00000] in <filename unknown>:0 
  at Mono.Debugging.Evaluation.ValueReference.CreateObjectValue (Mono.Debugging.Client.EvaluationOptions options) [0x00000] in <filename unknown>:0 System.ArgumentException: Local variable doesn't belong to this frame's method.
  at Mono.Debugger.Soft.StackFrame.GetValue (Mono.Debugger.Soft.LocalVariable var) [0x00000] in <filename unknown>:0 
  at Mono.Debugging.Soft.VariableValueReference.get_Value () [0x00000] in <filename unknown>:0 

(rest on attachment)
Comment 1 Jeffrey Stedfast 2013-04-03 16:20:08 UTC
I've just added code to catch this (assuming it is still an issue) and convert it into some red error text in the debugger tree views.

If you see red error text saying "Local variable doesn't belong to this frame's method" it would be good to take note of what variable it is and maybe we can figure out what the issue is based on that. Perhaps a variable has been optimized out?

The fix should be included in Xamarin Studio 4.0.4
Comment 2 PJ 2013-11-19 17:04:41 UTC
This bug has been in the NEEDINFO state with no changes for the last 90 days. Can we put this back into the NEW or CONFIRMED state, or are we still awaiting response?

If there is no change in the status of this bug over the next two weeks, this bug will be marked as NORESPONSE.
Comment 3 Chris Hamons 2013-11-20 10:29:14 UTC
I'm not sure what info you need, the last comment before this notes Jeffrey added code to catch this. 

I haven't seen the issue since that in my limited use.
Comment 4 Jeffrey Stedfast 2013-11-20 13:03:55 UTC
Thanks for the update Chris.

Sounds like we can close this if the fix seems to have worked out for you.