Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 17660 [details]
Template Cycle 5 iPad project, for reference
"Stop Debugging" command causes iOS apps to crash with "Assertion at ... debugger-agent.c... condition `flags == 0' not met" rather than exiting gracefully
One ugly thing this does is fill up the device with crash logs during just any old start-and-stop debugging of an app.
Taking into consideration my observations on Bug 43929, I also have a hunch that this underlying issue might somehow account for a new cluster of bugs reported against Cycle 8: Bug 44567, Bug 44578, Bug 44301. My (wild) guess is that some timing or conditional logic might have changed in Cycle 8 in such a way that this failed assertion is now being triggered in certain environments at the _start_ of debugging rather than at the end of debugging.
## Regression status: The problem first appeared between Cycle 5 SR 5 and Cycle 6 SR 4
> BAD Cycle 8 + iOS 10.0.1 device. XamarinVS 220.127.116.110 (c4382f5) + Xamarin.iOS 10.0.0.6 (6c3fee4) + Mono 4.6.0 (746756c) + Xcode 8.0, 8A218a
> BAD Cycle 8 + iOS 8.0 device. XamarinVS 18.104.22.1680 (c4382f5) + Xamarin.iOS 10.0.0.6 (6c3fee4) + Mono 4.6.0 (746756c) + Xcode 8.0, 8A218a
> BAD Cycle 7 + iOS 8.0 device. XamarinVS 22.214.171.1240 (2e39740) + Xamarin.iOS 126.96.36.1993 (39ebb77) + Mono 4.4.0 (5995f74) + Xcode 7.3, 7D175
> BAD Cycle 6 SR 4 + iOS 8.0 device. XamarinVS 188.8.131.52 (a9c7826) + Xamarin.iOS 184.108.40.206 (d8bedd0) + Mono 4.2.4 (71b88f3) + Xcode 7.3, 7D175
> GOOD Cycle 5 SR 5 + iOS 8.0 device. XamarinVS 3.11.1594.0 (a06d6d5) + Xamarin.iOS 220.127.116.11 (1f068b4) + Mono 4.0.5 (1d8d582) + Xcode 7.3, 7D175
> GOOD Cycle 5 SR 5 + iOS 8.0 device. XamarinVS 3.11.1594.0 (a06d6d5) + Xamarin.iOS 18.104.22.168 (1f068b4) + Mono 4.0.5 (1d8d582) + Xcode 6.4, 6E35b
## Steps to replicate
1. Create a new "Visual C# > iOS > iPad > Single View App (iPad)" or "Visual C# > iOS > iPhone > Single View App (iPhone)" project. (I have also a attached a sample iPad project created using Cycle 5 SR 5 that I used for some of my tests.)
2. If needed for the current test device, 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 device in the "Debug|iPhone" configuration.
4. After the app launches successfully, select "Debug > Stop Debugging".
## BAD Results
The app exits due to a crash rather than exiting gracefully.
### The iOS device system log shows a failed assertion, followed by a stack trace, and then a message indicating that the app has crashed
> * Assertion at /Users/builder/data/lanes/3426/6c3fee4d/source/xamarin-macios/external/mono/mono/mini/debugger-agent.c:9864, condition `flags == 0' not met
> Application 'UIKitApplication:com.your-company.UnifiedSingleViewIpadC5[0x46e7]' crashed.
## GOOD Results (with Cycle 5 SR 5)
_When_ it stops the app successfully, C5SR5 produces a more graceful exit. The device logs show something "nice" like:
> Application 'UIKitApplication:com.your-company.UnifiedSingleViewIpad1[0xf3bb]' exited voluntarily.
But I should probably also note that the old build host in C5SR5 had issues with consistently quitting the app on every debugging attempt, so it did sometimes take me a couple redeploy attempts to get the IDE to close the app as expected with the "Stop Debugging" command.
## GOOD Results (with Cycle 8 Xamarin Studio 6.1 on Mac)
The device logs show the "nice" message as in C5SR5 XamarinVS:
> Application 'UIKitApplication:com.your-company.UnifiedSingleViewIpadC5[0x13e5]' exited
## Additional environment info
### Devices tested
iPhone 6s Plus, iOS 10.0.1 (14A403), English/USA locale
iPad Mini 2, iOS 8.0 (12A365), English/USA locale
Microsoft Visual Studio Professional 2015
Version 14.0.25431.01 Update 3
Windows 10 Version 10.0 (Build 10240), English/USA locale
OS X 10.11.6, English/USA locale
Created attachment 17661 [details]
IDE, build, and device logs and IDE version info
Fixed in version 22.214.171.124 (master)
Commit: bd6a3995f2c45e2efb71e064c351d43432c45c81 (xamarin/XamarinVS)
Fixed in version 126.96.36.1990 (cycle9)
Commit: 9e2570764f745fd3ff85b5bd4bd104a35cfa7988 (xamarin/XamarinVS)