Bug 28042 - Breakpoints cause Simulator to freeze
Summary: Breakpoints cause Simulator to freeze
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: Debugger ()
Version: 4.20.0
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-03-14 22:06 UTC by Nate Cook
Modified: 2015-03-20 19:33 UTC (History)
7 users (show)

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


Attachments
the project (1.67 MB, application/zip)
2015-03-14 22:06 UTC, Nate Cook
Details
breakpoints screenshot, just in case (50.62 KB, image/png)
2015-03-14 22:07 UTC, Nate Cook
Details
frozen screenshot 1 (96.23 KB, image/png)
2015-03-14 22:07 UTC, Nate Cook
Details
frozen screenshot 2 (104.97 KB, image/png)
2015-03-14 22:07 UTC, Nate Cook
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 Nate Cook 2015-03-14 22:06:30 UTC
Created attachment 10345 [details]
the project

Since upgrading to Xamarin Studio 5.8 I have been having severe problems debugging. Basically the app appears completely frozen for long periods of time. It is intermittent and is driving me nuts.

Well I finally figured out how to reproduce the problem: it happens with breakpoints and multiple threads. More importantly I also now have a reliable way of reproducing the problem. So without further introduction I present to you the attached project, which is a slightly modified version of the Android 5.0 Navigation Drawer monodroid sample found in the monodroid-samples github repository. Note that this is an Android project but the problem happens with both iOS and Android.

To reproduce:
1. Open the attached project in Xamarin Studio 5.8. (OSX)
2. There are two breakpoints in the .userprefs file in the directory. Make sure those breakpoints are loaded and enabled. (I have a screenshot with the breakpoint information as well, in case the breakpoints are not loaded automatically. One of the breakpoints is a "break on all exceptions" breakpoint, with System.Exception and all subclasses.)
3. Run the app on a simulator. I have reproduced the problem using this project with Xamarin Android Player 0.2.5 (Nexus 5 KitKat) and GenyMotion 2.4.0 (Samsung Galaxy S5 KitKat).
4. Once the app opens click the Navigation Drawer Example button and, if you get that far, start opening and closing the navigation drawer by clicking the hamburger icon at the top left. Just keep doing that and eventually the app should freeze.
5. Once the app is in the frozen state you'll probably get a popup asking if you want to wait or close the app. (See attached screenshots.) Click to wait.
6. Go to Xamarin Studio and uncheck the two breakpoints.
7. Notice that as soon as you uncheck the two breakpoints the app begins responding again.

Important: Note that Xamarin Studio does NOT display the breakpoint as being hit. Also there is nothing in the call stack window. So for all appearances as far as Xamarin Studio is concerned the app appears to be executing, not waiting at a breakpoint or at an exception window.

My workmates and I are looking forward to hearing back about this bug as soon as possible. Thanks

=======================

Version info:

=== Xamarin Studio ===

Version 5.8 (build 443)
Installation UUID: 7ce5ffa9-646f-4545-9e71-8a00bb46f696
Runtime:
	Mono 3.12.1 ((detached/b7764aa)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312010000

=== Xamarin.Android ===

Version: 4.20.0.37 (Business Edition)
Android SDK: /Users/ncook/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Apple Developer Tools ===

Xcode 6.2 (6776)
Build 6C131e

=== Xamarin.iOS ===

Version: 8.8.0.2 (Business Edition)
Hash: ccfcd59
Branch: 
Build date: 2015-03-10 02:20:32-0400

=== Xamarin.Mac ===

Not Installed

=== Build Information ===

Release ID: 508000443
Git revision: 73883239470cbe8e261c94d95f7c3d0452fd393b
Build date: 2015-03-10 07:22:51-04
Xamarin addins: a2ff7b617f09d9c45d8bbf3d010b5db0d7d36100

=== Operating System ===

Mac OS X 10.10.2
Darwin NateCook-Insightly-MacBook-Pro.local 14.1.0 Darwin Kernel Version 14.1.0
    Thu Feb 26 19:26:47 PST 2015
    root:xnu-2782.10.73~1/RELEASE_X86_64 x86_64
Comment 1 Nate Cook 2015-03-14 22:07:09 UTC
Created attachment 10346 [details]
breakpoints screenshot, just in case
Comment 2 Nate Cook 2015-03-14 22:07:37 UTC
Created attachment 10347 [details]
frozen screenshot 1
Comment 3 Nate Cook 2015-03-14 22:07:56 UTC
Created attachment 10348 [details]
frozen screenshot 2
Comment 4 Ram Chandra 2015-03-16 07:34:30 UTC
I have check this issue and able to reproduce the reported behavior at my end.

Steps To Reproduce:
1.Download the attached sample.
2.Go to Run->View Breakpoints.
3.Check the both breakpoints checkbox.
4.Run the application on Emulator/Device.
5.Application Launch successfully  on Emulator/Device.
6.Click on "Navigation Drawer Example" button several time till it give popup asking if you want to wait or close the app.
7.Click on Wait.Uncheck the two breakpoints. 
8.Notice that as soon as you uncheck the two breakpoints the application begins
responding again.

Screencast:http://www.screencast.com/t/SYABS9nnN
IDE Log: https://gist.github.com/AkhileshKumar01/d92e34a954826b401aa3
Android Device Log: https://gist.github.com/AkhileshKumar01/9ac91b27cf9946a62226

I can reproduce the reported behavior at my end. I’ll need confirmation from the developer if this is a bug. Leaving as NEW for now.

Build Info:

=== Xamarin Studio ===

Version 5.9 (build 218)
Installation UUID: 93e693b0-b53d-40f4-b29c-b61ff5cbe892
Runtime:
	Mono 4.0.0 ((detached/565c18b)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400000068

=== Apple Developer Tools ===

Xcode 6.2 (6776)
Build 6C131e

=== Xamarin.iOS ===

Version: 8.10.0.90 (Enterprise Edition)
Hash: 01afb49
Branch: master
Build date: 2015-03-15 01:52:46-0400

=== Xamarin.Android ===

Version: 5.1.0.60 (Enterprise Edition)
Android SDK: /Users/xamarin23/Desktop/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: 2.0.0.90 (Enterprise Edition)

=== Build Information ===

Release ID: 509000218
Git revision: 908c39cbafdaf712059565e80591c06830fdf590
Build date: 2015-03-13 15:05:04-04
Xamarin addins: a87d89e3612e207fe3ccc142b1c2a2eb0deff730

=== Operating System ===

Mac OS X 10.10.0
Darwin 800BC.local 14.0.0 Darwin Kernel Version 14.0.0
    Fri Sep 19 00:26:44 PDT 2014
    root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64
Comment 5 Nate Cook 2015-03-16 11:07:32 UTC
I noticed that the product has been changed from Xamarin Studio to Android. However, this is NOT an Android bug. Freezes happens with when debugging iOS as well.
Comment 6 David Karlaš 2015-03-16 18:55:09 UTC
Hi Nate,

thank you for nice explanation of bug, I had hard time reproducing because I had setting "Debugger->Debug project code only" disabled, so as temporary workaround you can disable this setting and XS won't freeze anymore. Working on proper fix.

Regards,
David
Comment 8 David Karlaš 2015-03-19 13:30:40 UTC
Fixed in XamarinStudio 5.8.2.3
Comment 9 Nate Cook 2015-03-19 13:34:53 UTC
Hi David. Nice to see that you were able to fix the problem. Can you confirm that it was a problem on both platforms, or did you fix something specific to MonoDroid?
Comment 10 David Karlaš 2015-03-19 13:36:36 UTC
Hi Nate,

yes problem was in XS so it effected both X.iOS and X.Android. Both are fixed.

Thank you for nice bug report!
Comment 11 Nate Cook 2015-03-19 13:37:23 UTC
Thank you David!
Comment 12 David Karlaš 2015-03-20 17:30:13 UTC
Hi Nate, just wanted to let you know that version 5.8.2.5 was pushed to Alpha channel with this fix.
Comment 13 Nate Cook 2015-03-20 19:33:50 UTC
Excellent!