Bug 3927 - runtime gets stuck trying to evaluate GetType from sdb
Summary: runtime gets stuck trying to evaluate GetType from sdb
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger ()
Version: unspecified
Hardware: PC Mac OS
: Highest major
Target Milestone: ---
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2012-03-15 19:36 UTC by Jeffrey Stedfast
Modified: 2012-03-28 18:13 UTC (History)
3 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 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 Jeffrey Stedfast 2012-03-15 19:36:41 UTC
In some scenarios, hovering your mouse over, for example, "RectangleF" in the expression: "new RectangleF (..." shows an "Evaluating..." tooltip that never completes.

I've tracked it down to SoftDebuggerAdaptor's ForceLoadType() trying to invoke GetType() on "System" on line 923 in git master. This invocation never returns.
Comment 2 Jeffrey Stedfast 2012-03-21 16:27:52 UTC
Zoltan: can you look into this?

Let me know if MonoDevelop is doing something wrong, if it is.
Comment 3 Zoltan Varga 2012-03-24 05:46:56 UTC
So the problem here is that two threads hit the same breakpoint concurrently, so the runtime suspend count becomes 2, but it is only resumed once by the invoke code, causing this hang.
Comment 4 Zoltan Varga 2012-03-25 11:08:21 UTC
The invoke issue is now fixed, but 'continue' still doesn't work in this situation. This is because md receives two Breakpoint events, so the runtime is suspended two times, but md only resumes it once, so it remains suspended.
Comment 5 Jeffrey Stedfast 2012-03-25 18:23:28 UTC
Okay, so I just need to fix MonoDevelop to keep track of the suspend count so that we can resume that number of times?
Comment 6 Zoltan Varga 2012-03-26 00:18:51 UTC
Yes.
Comment 7 Zoltan Varga 2012-03-26 10:38:16 UTC
Another problem is that the GetType () method is not invoked with the IgnoreBreakpoints+SingleThreaded  InvokeOptions, so if a breakpoint is hite during the invoke, the runtime will get suspended, and the invoke never completes. Normal property evaluation passes these options, but when hovering over
a class name, like 'Console', it doesn't.
Comment 8 Jeffrey Stedfast 2012-03-26 11:47:47 UTC
Thanks Zoltan! I will look into fixing these issues in MonoDevelop.
Comment 9 Jeffrey Stedfast 2012-03-26 12:23:30 UTC
Okay, I've fixed the InvokeOptions to pass DisableBreakpoints | SingleThreaded

next I'll fix MD to resume for each suspend.
Comment 10 Jeffrey Stedfast 2012-03-28 18:13:19 UTC
So it turns out that MonoDevelop already handles resuming the correct number of times.

At this point, this bug is fixed - but hitting the breakpoint after the first time through the loop, MonoDevelop often doesn't highlight the breakpoint line (which is confusing in the UI). This is cause by bug #4023