Bug 7143 - MonoDevelop does not allow setting break points
Summary: MonoDevelop does not allow setting break points
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger ()
Version: 4.0.8
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2012-09-13 10:35 UTC by Jonas Sourlier
Modified: 2013-05-30 18:03 UTC (History)
2 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 Jonas Sourlier 2012-09-13 10:35:52 UTC
MonoDevelop sometimes (see below) stops accepting clicks on the 'breakpoint bar' on the left border of the editor. In this situation, I cannot add new breakpoints or remove existing ones. The breakpoint dialog window does not work either in such situations. When such a situation occurs, I can continue working in MonoDevelop for some time, but mostly it would crash some minutes after such a situation occurs.

This can happen about 2-3 times on a day when I'm working 100% in MonoDevelop, but there are days when it does not occur even once. It has happened in different projects and in different classes.

I don't know how to reproduce the problem, it seems to happen randomly.

Please tell me what information you need to resolve this.
Comment 1 Jonas Sourlier 2012-09-13 10:38:19 UTC
Oh I forgot: In these situations, when I try to quit and restart MonoDevelop, it won't quit. I click on the Quit entry in MonoDevelop's menu, and then I get the spinning rainbow ball and I have to force quit.
Comment 2 Mikayla Hutchinson [MSFT] 2012-09-13 17:08:11 UTC
When MonoDevelop is hung, could you please obtain a stack trace and attach the log file?

http://monodevelop.com/Developers/Reporting_Bugs#Managed_Hangs
 http://monodevelop.com/Developers/Reporting_Bugs#Mac_App_Bundle
Comment 3 Jonas Sourlier 2013-05-21 10:07:06 UTC
This is still unsolved after more than 8 months. When I'm working a whole day in Xamarin Studio, it happens at least 10 times during the day, and every time it happens, I have to cancel the debug session and restart Xamarin Studio.

It seems to happen randomly (no apparent cause/trigger), but I cannot believe that you guys at Xamarin don't see this behavior, it's so obvious when working with break points.

The hangs (comment #1) seem to be fixed, Xamarin Studio can be restarted instantly in such a situation, no Force Quit necessary.
Comment 4 Mikayla Hutchinson [MSFT] 2013-05-21 10:48:53 UTC
What kind of app are you debugging, iOS or Android?
Comment 5 Jonas Sourlier 2013-05-21 10:49:33 UTC
iOS, on an iPad 3.
Comment 6 Jonas Sourlier 2013-05-23 04:56:50 UTC
Also, if there is a breakpoint which has been set when Xamarin Studio still allowed setting breakpoints, this breakpoint would interrupt the debug session (code execution stops), but there is no stack trace available, no yellow line in the code editor, and no option to continue execution. In such a case, Xamarin Studio looks like it was still in 'Running' mode, but the code does not run. The same thing goes if an exception is thrown: code execution just stops, but there is no stack trace, Xamarin Studio doesn't switch to Paused/Step-by-step execution mode.

This happens on both iPad 3 and the simulator, and it happens on both my Macbook Air, as well as on an iMac, both running the latest Max OS X Mountain Lion.

By the way, I'm using the latest stable Xamarin Studio 4.0.8, but Bugzilla doesn't list that version.
Comment 7 Jeffrey Stedfast 2013-05-29 14:31:04 UTC
This seems to hinge on whether or not we can lock a mutex within 10us. So it could be that the system is bogged down enough so that 10us isn't enough... or else one of the debugging session operations is still in progress.

I've added a new breakpoint store mutex lock so that we didn't have to reuse the generic session lock for adding/removing breakpoints and I've upped the timeout to 50us.

Hopefully that fixes this.


The other possibility is that the TextEditor is somehow losing state (e.g. FileName or LineSegment info).

Since I haven't been able to reproduce this, it's hard to know. I suspect it's not the TextEditor component, though, which leaves the mutex locking as the most likely suspect.
Comment 8 Jeffrey Stedfast 2013-05-29 14:39:20 UTC
n/m, just killed that mutex try-lock completely.
Comment 9 Jonas Sourlier 2013-05-30 17:08:34 UTC
Any idea when this fix would be in the stable release channel?

This is crucial to us, I'm in the middle of some complicated debugging and I'm not able to use any breakpoints.
Comment 10 Jonas Sourlier 2013-05-30 17:12:14 UTC
Just for clarification: One of the systems where I encounter these problems is a 2012 iMac with 8-core CPU, SSD harddisk and 8 GB RAM, so it's a pretty fast thing, and there are no hangs in the system while I'm working. The other system is a one month old Macbook Air with 8 GB RAM, another not-too-slow machine.

So I don't suspect the problem in any kind of timeout because "the system is bogged down enough".
Comment 11 Jonas Sourlier 2013-05-30 17:16:10 UTC
Another comment: I'm not sure if this is the same problem, but sometimes I'm able to set breakpoints, but Xamarin Studio is not able to switch to debugging mode. When a breakpoint is hit, Xamarin Studio would just halt code execution (like it should) but it does not display any call stack or local variables, and no yellow line.

This makes those breakpoints useless again.
Comment 12 Jeffrey Stedfast 2013-05-30 17:27:50 UTC
you can try https://files.xamarin.com/~jeff/XamarinStudio-367081d754a136dc6f62b74723ae3b09978a1b93.dmg

THe other issue you listed sounds like a hang in the runtime (of the debugee) and I think there's already a bug report about that
Comment 13 Jonas Sourlier 2013-05-30 18:03:42 UTC
Thanks, I'm gonna try that.

I could not find the other bug report (at least none that matched my issue).