Bug 40572 - Unable to debug in simulator using XS 6 build 4968
Summary: Unable to debug in simulator using XS 6 build 4968
Status: RESOLVED DUPLICATE of bug 40318
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: XI 9.8 (tvOS / C7)
Hardware: Macintosh Mac OS
: High normal
Target Milestone: (C7)
Assignee: Jeffrey Stedfast
Depends on:
Reported: 2016-04-20 20:53 UTC by Joseph Hanna
Modified: 2016-04-21 20:36 UTC (History)
3 users (show)

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

Build log from XS 6 build 4901 (good) (309.25 KB, text/plain)
2016-04-20 20:53 UTC, Joseph Hanna
Build log from XS 6 build 4968 (dud) (309.96 KB, text/plain)
2016-04-20 20:53 UTC, Joseph Hanna
License screenshot showing Business License is present and recognised. (56.62 KB, image/png)
2016-04-20 21:00 UTC, Joseph Hanna

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:

Description Joseph Hanna 2016-04-20 20:53:05 UTC
Created attachment 15792 [details]
Build log from XS 6 build 4901 (good)

Description of Problem:

After upgrading to the latest alpha channel build (XS 6 build 4968), I am unable to debug one of my apps in the simulator. I can still debug on the device, but the Application Output pad shows nothing.

Steps to reproduce the problem:
1. Upgrade workstation from XS 6 build 4901 to 4968
2. Clean the solution
3. Select Run => Start Debugging
4. Build starts, simulator starts, simulator screen flashes and XS exists debug mode.

Actual Results:

* Simulator starts and app deploys but the app does not start on the simulator.  I set a breakpoint in Main and it never hits it.
* Debugging on the device is still possible but Console.WriteLine does not appear in the Application Output pad.

Expected Results:

* To debug the app in the simulator as it did in XS 6 build 4901.
* When debugging on the device, 

How often does this happen? 

Every time.

Additional Information:

* I have 3 workstations running Xamarin. I upgraded 2 of them to build 4968 and both fail in the same way. My third workstation is still using XS 6 build 4901 and it is working fine.
* I have performed resets on the simulator.
* I have switched back to the Stable Channel on one of the workstations and the app debugs correctly.

I have attached two files showing the Build Logs from XS 6 build 4901 (build_good.txt) and the latest alpha channel XS 6 build 4968 (build_dud.txt).

I have attached the “Error Pad => Build Output” text on the good workstation running XS 6 build 4901 (build_good.txt) and from the troublesome workstation running XS6 build 4968 (build_dud.txt).  Performing a file-diff on these build outputs interestingly shows these differences (amongst others) below.  There are noticeable omissions from the "dud" build that are present in the good build.

GOOD (XS 6 build 4901)

Using Xcode 7.3 found in /Applications/Xcode.app/Contents/Developer
Xamarin.iOS (cycle7: f51047c) Business Edition using framework: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk
Copied /Users/joe/Projects/ACR/vantage-salestalk.acr/bin/iPhoneSimulator/Debug/SalesTALK.exe to /Users/joe/Projects/ACR/vantage-salestalk.acr/obj/iPhoneSimulator/Debug/mtouch-cache/PreBuild/SalesTALK.exe
Copied /Users/joe/Projects/ACR/vantage-salestalk.acr/bin/iPhoneSimulator/Debug/SalesTALK.exe.mdb to /Users/joe/Projects/ACR/vantage-salestalk.acr/obj/iPhoneSimulator/Debug/mtouch-cache/PreBuild/SalesTALK.exe.mdb
Copied /Users/joe/Projects/ACR/vantage-salestalk.acr/obj/iPhoneSimulator/Debug/mtouch-cache/PreBuild/SalesTALK.exe to /Users/joe/Projects/ACR/vantage-salestalk.acr/obj/iPhoneSimulator/Debug/mtouch-cache/Build/SalesTALK.exe
Copied /Users/joe/Projects/ACR/vantage-salestalk.acr/obj/iPhoneSimulator/Debug/mtouch-cache/PreBuild/SalesTALK.exe.mdb to /Users/joe/Projects/ACR/vantage-salestalk.acr/obj/iPhoneSimulator/Debug/mtouch-cache/Build/SalesTALK.exe.mdb
Copied /Users/joe/Projects/ACR/vantage-salestalk.acr/obj/iPhoneSimulator/Debug/mtouch-cache/Build/SalesTALK.exe to /Users/joe/Projects/ACR/vantage-salestalk.acr/bin/iPhoneSimulator/Debug/SalesTALK.app/SalesTALK.exe
Copied /Users/joe/Projects/ACR/vantage-salestalk.acr/obj/iPhoneSimulator/Debug/mtouch-cache/Build/SalesTALK.exe.mdb to /Users/joe/Projects/ACR/vantage-salestalk.acr/bin/iPhoneSimulator/Debug/SalesTALK.app/SalesTALK.exe.mdb
/Users/joe/Projects/ACR/vantage-salestalk.acr/bin/iPhoneSimulator/Debug/SalesTALK.app built successfully.

DUD (XS 6 build 4968)

Using Xcode 7.3 found in /Applications/Xcode.app/Contents/Developer
Xamarin.iOS (cycle7: 977921b) using framework: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk
/Users/joe/Projects/ACR/vantage-salestalk.acr/bin/iPhoneSimulator/Debug/SalesTALK.app built successfully.

=== Xamarin Studio Business ===

Version 6.0 (build 4968)
Installation UUID: d9833162-ff6d-444c-b4ca-0dc133c18699
	Mono 4.4.0 (mono-4.4.0-branch/a3fabf1) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 404000122

=== Xamarin.Profiler ===

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

=== Apple Developer Tools ===

Xcode 7.3 (10183.3)
Build 7D175

=== Xamarin.iOS ===

Version: (Xamarin Business)
Hash: 977921b
Branch: cycle7
Build date: 2016-04-07 14:20:17-0400

=== Xamarin.Android ===

Version: (Xamarin Business)
Android SDK: /Users/joe/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.3   (API level 18)
		4.4   (API level 19)
		5.1   (API level 22)
		6.0   (API level 23)

SDK Tools Version: 25.1.1
SDK Platform Tools Version: 1602
SDK Build Tools Version: 19.1

Java SDK: /usr
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

Android Designer EPL code available here:

=== Xamarin Android Player ===

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

=== Xamarin.Mac ===

Version: (Xamarin Business)

=== Build Information ===

Release ID: 600004968
Git revision: ab7092ce63351276394f283e4f9c8646baf51fce
Build date: 2016-04-08 09:30:34-04
Xamarin addins: be0a0aef6ec8b075b4ba4690bd147d1e33c2abd7
Build lane: monodevelop-lion-cycle7

=== Operating System ===

Mac OS X 10.11.5
Darwin Josephs-CH-iMac.local 15.5.0 Darwin Kernel Version 15.5.0
    Mon Apr  4 19:07:49 PDT 2016
    root:xnu-3248.50.20~6/RELEASE_X86_64 x86_64
Comment 1 Joseph Hanna 2016-04-20 20:53:44 UTC
Created attachment 15793 [details]
Build log from XS 6 build 4968 (dud)
Comment 2 Joseph Hanna 2016-04-20 20:59:36 UTC
Note also that the "good" build log mentions I have a *Business Edition* license, but the "dud" does not:

Using Xcode 7.3 found in /Applications/Xcode.app/Contents/Developer
Xamarin.iOS (cycle7: f51047c) Business Edition using framework: /Applica....

Using Xcode 7.3 found in /Applications/Xcode.app/Contents/Developer
Xamarin.iOS (cycle7: 977921b) using framework: /Applica....

I guess it this may be fine considering the new licensing model... or not.
Comment 3 Joseph Hanna 2016-04-20 21:00:13 UTC
I also tried logging out of my Account and back in again in XS.
Comment 4 Joseph Hanna 2016-04-20 21:00:52 UTC
Created attachment 15794 [details]
License screenshot showing Business License is present and recognised.
Comment 5 Jeffrey Stedfast 2016-04-21 15:46:14 UTC
The output that you say is different comes from the mtouch tool, so refiling -> Xamarin.iOS
Comment 6 Jeffrey Stedfast 2016-04-21 16:00:26 UTC
Most likely your app is crashing on startup. You should probably check your Console.app logs to see why it is crashing.
Comment 7 Sebastien Pouliot 2016-04-21 18:00:44 UTC
That happens because the newest package try to code sign the sim app (to include the entitlements) and the simulator does not like that.

@Jeff already fixed that in #40318 and a newer XI build will have the fix available.

@Joseph depending on your app you might be able to disable this (remove Entitlements.plist from your project's options, under Custom Entitlements)

*** This bug has been marked as a duplicate of bug 40318 ***
Comment 8 Joseph Hanna 2016-04-21 20:36:12 UTC
Hi guys,

Thanks for looking into this. 

I looked at the other bug (duplicate reference) and the detail regarding entitlements.  It reminded me that after installating of a recent Alpha build (I think it was XS build 4091), my AppGroup stopped working in the simulator.  The following call returns null in the simulator but works fine on the device.

    var appGroupContainer = filemanager.GetContainerUrl (mAppGroupID);

Given that this is also controlled by Entitlements.plist I thought I should tell you in case it impacts the outcome. 

I can't remove entitlements from my app, I have too many things that rely on it.