Bug 39297 - Objective-C exception thrown specifically on iOS 9.0 and 9.1
Summary: Objective-C exception thrown specifically on iOS 9.0 and 9.1
Status: RESOLVED ANSWERED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: XI 9.4 (iOS 9.2)
Hardware: PC Mac OS
: Low minor
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-03-02 15:18 UTC by Adam Hartley [MSFT]
Modified: 2016-03-10 18:19 UTC (History)
5 users (show)

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

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 ANSWERED

Description Adam Hartley [MSFT] 2016-03-02 15:18:32 UTC
## Steps to reproduce

1. Download attached sample
2. Run "FakeLocation" project on iOS 9.0 or 9.1 simulator / device

## Expected result

No crash - app should launch

## Actual result

https://gist.github.com/BytesGuy/4cee0301fddc62a03f01

## Notes

Tested on iOS 8.0, 8.1, 8.2, 8.3, 8.4, 9.2 where no crash occurs (see XTC test run link in next comment)

=== Xamarin Studio ===

Version 6.0 (build 4520)
Installation UUID: 11a26d86-0d21-407a-8da9-8c197ecc0ad1
Runtime:
	Mono 4.3.2 (mono-4.3.2-branch/ba2e5e4) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 403020467

=== Xamarin.Profiler ===

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

=== Apple Developer Tools ===

Xcode 7.2.1 (9548.1)
Build 7C1002

=== Xamarin.Mac ===

Version: 2.7.0.334 (Business Edition)

=== Xamarin.iOS ===

Version: 9.7.0.334 (Business Edition)
Hash: a8da28f
Branch: master
Build date: 2016-02-24 16:50:28-0500

=== Xamarin.Android ===

Version: 6.0.99.544 (Business Edition)
Android SDK: /Users/Adam/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3 (API level 15)
		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.1

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

=== Xamarin Android Player ===

Not Installed

=== Build Information ===

Release ID: 600004520
Git revision: a354b2cb9df4b96f50b0ccb960dbdd5a9155510c
Build date: 2016-02-18 14:52:07-05
Xamarin addins: 8e54979f23feee160d245a3c33e43e77779b1eb4
Build lane: monodevelop-lion-master

=== Operating System ===

Mac OS X 10.11.3
Darwin Adams-Retina-MacBook-Pro.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 2 Brendan Zagaeski (Xamarin Team, assistant) 2016-03-02 18:56:49 UTC
Just at a quick first glance, the crash looks like it could be caused by a change in iOS itself, so that an equivalent Objective-C app might hit the same problem. If possible, it would be nice to have a line-by-line port of some equivalent code on Xamarin and Objective-C that shows a problem in Xamarin and no problem in Objective-C.
Comment 3 Sebastien Pouliot 2016-03-02 19:56:07 UTC
Solution is incomplete (missing projects) and does not compile.

	Indicator.cs(3,7): error CS0246: The type or namespace name `BigTed' could not be found. Are you missing an assembly reference?
	MyInAppPurchaseManager.cs(11,7): error CS0246: The type or namespace name `Xamarin' could not be found. Are you missing an assembly reference?
	MyInAppPurchaseManager.cs(22,10): error CS0246: The type or namespace name `InAppPurchaseManager' could not be found. Are you missing an assembly reference?
	MyInAppPurchaseManager.cs(242,15): error CS0246: The type or namespace name `InAppProduct' could not be found. Are you missing an assembly reference?


Like Brendan mentioned "Objective C" exceptions comes from the OS and we cannot shield you from changes across different version of iOS.

The stacktrace makes it look like the storyboard is the culprit and might need to be set to something newer (e.g. Xcode version) to be compiled correctly. We can have a 2nd look if you provide a working solution (or instructions) but it does not look like it's an XI bug.
Comment 5 Adam Hartley [MSFT] 2016-03-02 21:51:19 UTC
@Sebastien there are a few packages for that sample, so it looks like they did not install before building. 

I have had some time to reduce the sample down to the bare minimum and produce an obj-c version.

The obj-c version displays the same behaviour on iOS 9.1, stack trace here:

https://gist.github.com/BytesGuy/019ae9b5cc062fcf71e1

So this shows that it is a bug in iOS rather than something our side.

It must have something to do with the storyboard itself as the neither minimal samples have any code that could cause this.