Bug 43929 - Unable to attach debugger on iOS 8.0 device, possibly due to "Assertion at ... debugger-agent.c:9635, condition `flags == 0' not met"
Summary: Unable to attach debugger on iOS 8.0 device, possibly due to "Assertion at .....
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Debugger ()
Version: 4.1.1 (C7SR0)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Joaquin Jares
URL:
Depends on:
Blocks:
 
Reported: 2016-09-01 02:50 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2016-09-22 08:56 UTC (History)
3 users (show)

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


Attachments
Test case (9.32 KB, application/zip)
2016-09-01 02:50 UTC, Brendan Zagaeski (Xamarin Team, assistant)
Details
Log files and detailed version info (24.36 KB, application/zip)
2016-09-01 02:50 UTC, Brendan Zagaeski (Xamarin Team, assistant)
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 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 Brendan Zagaeski (Xamarin Team, assistant) 2016-09-01 02:50:03 UTC
Created attachment 17290 [details]
Test case

Unable to attach debugger on iOS 8.0 device, possibly due to "Assertion at ... debugger-agent.c:9635, condition `flags == 0' not met"


I am filing this bug just to document this scenario and the fact that is already verified fixed in Cycle 8 Beta 3 (according to my tests).




## Steps to replicate

1. Create a new "Visual C# > iOS > iPad > Single View App (iPad)".

2. Edit the `Info.plist` to set the deployment target to 8.0 or lower.

3. Select "Debug > Start Debugging" to build and run the project on an iOS 8.0 iPad (tested on iPad Mini 2) in the "Debug|iPhone" configuration.




## Verification status: Verified fixed in Cycle 8 Beta 3 (if not earlier)


### GOOD

VS 2015 Professional Update 1
XamarinVS 4.2.0.628 (f4d4600)

Xamarin.iOS 9.99.5.54 (cycle8: 974ea0b)
Mono 4.6.0 (mono-4.6.0-branch/3ed2bba)
Xcode 7.3 (10183.3), Build 7D175

Test device: iPad Mini 2, iOS 8.0


### BAD

VS 2015 Professional Update 1
XamarinVS 4.1.1.3 (34a92cd)

Xamarin.iOS 9.8.1.4 (c7sr0: 3cf8aae)
Mono 4.4.1 (mono-4.4.0-branch-c7sr0/4747417)
Xcode 7.3 (10183.3), Build 7D175

Test device: iPad Mini 2, iOS 8.0




## Results

The app installs successfully but does not launch.



### Excerpt from `*Ide.log`

> Xamarin.Messaging.Exceptions.MessagingRemoteException: An error occured on client IDB4113 while executing a reply for topic xvs/idb/4.1.1.3/launch-app ---> Xamarin.Messaging.Exceptions.MonotouchException: Xamarin.iOS: USING STAGING SERVER FOR ACTIVATION
> 
>   at Xamarin.Messaging.IDB.MTouch+<RunAsync>d__6.MoveNext () <0x75c81c0 + 0x007e3> in <filename unknown>:0 
> --- End of stack trace from previous location where exception was thrown ---
>   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x18aa010 + 0x00035> in <filename unknown>:0 
>   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x18a7830 + 0x000b7> in <filename unknown>:0 


### The iOS device system log after step 3 shows no apparent errors (and no crash logs are generated either)

> Aug 31 22:11:48 iPad-Mini-2 SpringBoard[47] <Warning>: Installed apps did change.
> 	Added: {(
> 	    "com.companyname.UnifiedSingleViewIpad1"
> 	)}
> 	Removed: {(
> 	)}
> 	Modified: {(
> 	)}



## Experiment 1 (see also attached logs)

If I attempt to launch the app by tapping the app icon on the device after step 3, then I get a crash due to a failed "`flags == 0' not met" assertion that looks similar to non-public Bug 42293.


- If tap the app icon again, then the app launches successfully.

- If I again try to start the app from Visual Studio, then it again fails without an app crash in the iOS device log.

- If I then again tap the icon, I once again hit the "Assertion at ... not met" error.



### Error from the iOS device system log after tapping the app icon the first time

> * Assertion at ../../../../../mono/mono/mini/debugger-agent.c:9635, condition `flags == 0' not met
Comment 1 Brendan Zagaeski (Xamarin Team, assistant) 2016-09-01 02:50:54 UTC
Created attachment 17291 [details]
Log files and detailed version info