Bug 42750

Summary: Deploying an iOS app to iPhone 6S crashes when a breakpoint is set
Product: iOS Reporter: Manish Sinha <masinha>
Component: DebuggerAssignee: Bugzilla <bugzilla>
Status: VERIFIED FIXED    
Severity: blocker CC: atinc, gouri.kumari, luis.aguilera, mono-bugs+monodevelop, mono-bugs+monotouch, oleg.demchenko, rustam.zaitov, vargaz, vincent.dondain
Priority: High    
Version: XI 9.10 (C8)   
Target Milestone: 10.0.0 (C8)   
Hardware: Macintosh   
OS: Mac OS   
Tags: DefectEscapeReview_Done Is this bug a regression?: Yes
Last known good build: Xamarin.iOS 9.10.0.5 (cycle8: f085b17)

Description Manish Sinha 2016-07-22 16:34:43 UTC
Steps to reproduce

1. Connect an iPhone 6S with iOS 9.1
2. Create an iOS app with target 9.1
3. Set a breakpoint at AppDelegate.cs FinishedLaunching method
4. Deploy to device

Expected: App is deployed to device with breakpoint set and the breakpoint is hit
Actual: The deployment crashes if a breakpoint is set. Deployment works if breakpoint is removed

Screencast: http://screencast.com/t/NdElqlEC
XS Info and Logs: https://gist.github.com/cc607cd2a70825fd64b611f2aab84e8b

Application Output: https://gist.github.com/manish-sinha/b0408d129148421a1e1fef1b94235822
Comment 1 Manish Sinha 2016-07-22 16:51:51 UTC
Also happens with iOS 9.3 on an iPhone 6S with 9.3
Comment 5 Manish Sinha 2016-07-22 18:33:41 UTC
*** Bug 42636 has been marked as a duplicate of this bug. ***
Comment 6 Zoltan Varga 2016-07-22 19:01:57 UTC
Can you check whenever disabling the 'Enable incremental builds' option in Project Options/iOS Build, then rebuilding fixes the problem ?
Comment 8 Manish Sinha 2016-07-25 16:03:18 UTC
I have tried it with disabling incremental builds and even tried disabled incremental builds with all three linker options.

I can still reproduce this issue.
Comment 9 Zoltan Varga 2016-07-25 19:04:49 UTC
It looks like its reproducible for some people or on some machines, but not on others. So this might be a platform/os specific problem, or a just a problem which happens randomly.
Comment 10 Zoltan Varga 2016-07-25 19:14:23 UTC
Could somebody add 'Zoltan's Iphone6' to their provisioning profile, and upload the .app directory built with that profile ?
Comment 12 Manish Sinha 2016-07-26 18:33:55 UTC
Can reproduce it on tvOS 9.2 device too
Comment 14 Zoltan Varga 2016-07-27 00:40:55 UTC
Fixed in mono master 941573a76499373f962edb28b0ddb40234b6b2f6. Will backport to 4.6. Thanks for all the help.
Comment 15 Zoltan Varga 2016-07-27 05:13:00 UTC
https://github.com/xamarin/xamarin-macios/pull/499
Comment 16 Zoltan Varga 2016-07-27 13:07:43 UTC
This build will hopefully have the fix:
https://wrench.internalx.com/Wrench/ViewLane.aspx?lane_id=3508&host_id=243&revision_id=789239
Comment 17 Manish Sinha 2016-07-27 16:14:18 UTC
Verified the fix on C8 branch builds

https://gist.github.com/57b2b5555d567e71310d6c372c2b6de4