Bug 38560 - Ghost breakpoints causing app to hang on splash screen.
Summary: Ghost breakpoints causing app to hang on splash screen.
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Inspector Integration ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Sandy Armstrong [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2016-02-09 03:15 UTC by Jon Goldberger [MSFT]
Modified: 2018-02-16 15:40 UTC (History)
9 users (show)

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


Attachments
FitpulseTheme.Sample.iOS project (7.64 MB, application/zip)
2016-10-13 06:28 UTC, Arpit Jha
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 NOT_REPRODUCIBLE

Description Jon Goldberger [MSFT] 2016-02-09 03:15:50 UTC
## Description

I have seen this with one of my own older samples and with the Fitpulse and Industrial Theme component sample apps (Unified API). Basically the app hangs on the splash screen until you clear all breakpoints even though it would seem none are set. 

## Steps to reproduce

1. Download the Industrial Theme component from:
https://components.xamarin.com/view/industrial-theme

2. Open the IndustrialTheme.Sample.iOS-Component-Unified solution in Xamarin Studio (I can not reproduce this issue in Visual Studio)

3. Deploy to a simulator (Note this step here because I could not reproduce the ghost breakpoint issue without doing this first)

Expected result: App will launch.

Actual result: App crashes immediately with no error or indication as to why, just this in the Mac OS X system console:

>2/8/16 4:41:34.967 PM com.apple.CoreSimulator.CoreSimulatorService[11215]: Error Domain=FBSOpenApplicationErrorDomain Code=1 "(null)"


4. Open the Project Options and change the iOS Build->Supported Architectures to:
i386 + x86_64

5. Clean and rebuild and deploy to the simulator again.

Expected result: App will launch.

Actual result: App hangs on start screen.(This is due to the ghost breakpoint I believe)

6. Open the breakpoints pad (View->Debug Windows->Breakpoints)

7. Note that no breakpoints are shown, but the Clear All Breakpoints button is enabled.

8. Click the Clear All Breakpoints button. 

9. Relaunch the app.

Expected result: App will launch.

Actual result: As expected (app launches and UI is displayed... success!)


## Note

If I skip step 3 above, then the app deploys as expected. So it seems that somehow changing the supported architecture after a build has already occurred and then redeploying, even after cleaning, causes this ghost breakpoint to appear and pause the app at the splash screen. However note that there is no option to continue or step through code in Xamarin Studio when this hang occurs. 


## Environment

=== Xamarin Studio ===

Version 5.10.2 (build 56)
Installation UUID: 964c531b-d928-456b-a9ae-e1f82266b360
Runtime:
	Mono 4.2.2 (explicit/996df3c)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402020030

=== Xamarin.Profiler ===

Version: 0.22.0.0
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 7.2.1 (9548.1)
Build 7C1002

=== Xamarin.iOS ===

Version: 9.4.1.25 (Business Edition)
Hash: 962a050
Branch: master
Build date: 2016-01-29 16:59:11-0500

=== Xamarin.Mac ===

Version: 2.4.1.6 (Business Edition)

=== Xamarin.Android ===

Version: 6.0.1.10 (Business Edition)
Android SDK: /Users/apple/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		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)
		5.0   (API level 21)
		5.1   (API level 22)
		6.0   (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.1
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Xamarin Inspector ===

Version: 0.3.2.3
Hash: 1b526e6
Branch: master
Build date: Tue Nov 17 20:54:30 UTC 2015

=== Build Information ===

Release ID: 510020056
Git revision: bb74ff467c62ded42b7b7ac7fdd2edc60f8647b0
Build date: 2016-01-26 16:24:41-05
Xamarin addins: 8b797d7ba24d5abab226c2cf9fda77f666263f1b
Build lane: monodevelop-lion-cycle6-c6sr1

=== Operating System ===

Mac OS X 10.11.3
Darwin Jons-iMac.local 15.3.0 Darwin Kernel Version 15.3.0
    Thu Dec 10 18:40:58 PST 2015
    root:xnu-3248.30.4~1/RELEASE_X86_64 x86_64
Comment 1 David Karlaš 2016-02-09 03:55:01 UTC
About steps 1-3? So in VisualStudio you have i386 selected and you successfully deploy to same Mac over network that is x64 machine which is running simulator?(I think that shouldn't work)

I unfortunately can't reproduce what you are seeing in step 5.

Do you have Inspector AddIn installed? That could explain ghost breakpoint... Maybe try removing it?
Comment 2 Jon Goldberger [MSFT] 2016-02-09 18:19:40 UTC
@David

No, I can not deploy to the iO Simulator from VS _until_ I change the supported architectures to x86_64. What does not occur in VS is the ghost breakpoint issue in step 5. 

However I did uninstall Inspector and the ghost breakpoint issue went away, so good call on that. Now I just ave to change the architecture to get that sample working. 

Should this be changed to a Inspector bug then? This issue when it occurs could be quite frustrating as when the ghost breakpoint issue occurs there is no indication as to what is going on, the app just hangs with no error message and no seeming breakpoints set.
Comment 3 Sandy Armstrong [MSFT] 2016-02-09 20:20:00 UTC
@Jon

Can you see if you can reproduce if the latest version (0.5.0) of the Inspector is installed? https://developer.xamarin.com/releases/inspector/preview/inspector-0.5.0/
Comment 4 Jon Goldberger [MSFT] 2016-02-09 21:05:57 UTC
@Sandy

Yes, I can still reproduce with Inspector 0.5.0.

Screencast:
http://screencast.com/t/OQ9WeVkW
Comment 5 Sandy Armstrong [MSFT] 2016-02-09 21:57:03 UTC
@Jon

The first crash happens regardless of the Inspector being installed, fwiw. File that one separately.

@David

Something about the way the app terminates, even though the Inspector addin's cleanup code runs (which is supposed to clear away the breakpoints we set), the entry point breakpoint is still there for the next run.

I'm still investigating.
Comment 7 Sandy Armstrong [MSFT] 2016-02-09 22:27:29 UTC
I do think this might be a bug in the debugger. I sent a screencast to David, will follow up.
Comment 9 Arpit Jha 2016-10-13 06:14:44 UTC
I have checked this issue with latest stable build + Workbooks 0.10.0.627 and I am not able to reproduce this issue as mentioned in bug description.

#Steps I have followed to reproduce:
1. Download sample from https://github.com/dquijada/Resume/tree/master/Components/fitpulsetheme-1.0/samples/FitpulseTheme.Sample.iOS

2. Migrate to Unified project as the downloaded project is Classic project.
3. Add FitpulseTheme component.
4. Execute project with i386 architecture support.

In my case app deploy successfully without any hang.

@Jon, Could you please check this issue with latest builds and let me know if you are facing this issue again.

Supplement Info
Screencast : http://www.screencast.com/t/OQJXt8656Lt
XS About & Ide log: https://gist.github.com/Arpit360/5ed0437511ecc8c79dc3bd64ad44f14f
Comment 10 Arpit Jha 2016-10-13 06:28:51 UTC
Created attachment 18015 [details]
FitpulseTheme.Sample.iOS project
Comment 11 Aaron Bockover [MSFT] 2017-01-13 17:20:17 UTC
Closing due to no response and not being able to reproduce the issue.
Comment 12 Niels 2018-02-16 10:15:39 UTC
Just spent hours on this same issue: iOS app hangs in splashscreen when deploying to a real device: iPhone 6s and iPad. App works as expected when deploying to simulator, app works as expected when running on Android device.

breakpoint in AppDelegate on LoadApplication(new App()); is hit, but nothing happens thereafter.

removed bin/obj folders, rebuilt the project, rebooted device, rebooted mac, doens't work.

I also tried another project to see if it caused by VS mac, but my other project ran as expected. Luckily I came across this bug report and removing all breakpoints solved this issue. THANKS @Jon Goldberger [MSFT]!!!

More info:
Xamarin.Forms app (xamarin.Forms 2.5.0.122203)

=== Visual Studio Enterprise 2017 for Mac ===

Version 7.3.2 (build 12)
Installation UUID: 4483d0e1-4909-4f5e-bc97-f9d6f3d4bf06
Runtime:
	Mono 5.4.1.7 (2017-06/e66d9abbb27) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 504010007

=== NuGet ===

Version: 4.3.1.4445

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Version: 2.0.4
SDK: /usr/local/share/dotnet/sdk/2.1.3/Sdks
SDK Version: 2.1.3
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.6.0
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 9.2 (13772)
Build 9C40b

=== Xamarin.iOS ===

Version: 11.6.1.2 (Visual Studio Enterprise)
Hash: 6857dfcc
Branch: xcode9.2
Build date: 2017-12-04 21:20:41-0500

=== Xamarin.Android ===

Version: 8.1.0.25 (Visual Studio Enterprise)
Android SDK: /Users/nielscup/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.4   (API level 19)
		5.0   (API level 21)
		5.1   (API level 22)
		6.0   (API level 23)
		7.0   (API level 24)
		7.1   (API level 25)
		8.0   (API level 26)

SDK Tools Version: 25.2.5
SDK Platform Tools Version: 27.0.1
SDK Build Tools Version: 25.0.2

Java SDK: /usr
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin.Mac ===

Version: 4.0.0.214 (Visual Studio Enterprise)

=== Xamarin Inspector ===

Version: 1.3.2
Hash: 461f09a
Branch: 1.3-release
Build date: Tue, 03 Oct 2017 18:26:57 GMT
Client compatibility: 1

=== Build Information ===

Release ID: 703020012
Git revision: 7d0c9d7ad46b125cf4b7bbf9532c0531b6433ce6
Build date: 2017-12-12 14:03:18-05
Xamarin addins: 6dddaa49fbecb2695fcdcd6b712eb269e288518c
Build lane: monodevelop-lion-d15-5

=== Operating System ===

Mac OS X 10.12.6
Darwin 16.7.0 Darwin Kernel Version 16.7.0
    Thu Jun 15 17:36:27 PDT 2017
    root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64

=== Enabled user installed addins ===

MvvmCross Template pack 2.0.1
AddinMaker 1.4.1
Comment 13 Niels 2018-02-16 10:59:44 UTC
Looks like I can reproduce this issue by adding a breakpoint anywhere in the App.xaml.cs constructor and then run it on a real iOS device. Running it on  a simulator works as expected.
Comment 14 Sandy Armstrong [MSFT] 2018-02-16 15:40:47 UTC
Niels, have you tried disabling the Inspector extension in the Extensions Manager to confirm this is actually caused by our extension?