Bug 40583 - Exception thrown when loading new storyboard
Summary: Exception thrown when loading new storyboard
Alias: None
Product: iOS
Classification: Xamarin
Component: MSBuild ()
Version: XI 9.8 (tvOS / C7)
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Jeffrey Stedfast
Depends on:
Reported: 2016-04-21 03:28 UTC by Cody Beyer (MSFT)
Modified: 2016-05-12 19:31 UTC (History)
4 users (show)

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:

Description Cody Beyer (MSFT) 2016-04-21 03:28:18 UTC
# Description

When attempting to load a storyboard on iOS 8.3, an exception is thrown. The same code translated to Swift does not demonstrate this error. This only appears to occur on iOS 8.x 

# Samples

Swift: https://www.dropbox.com/s/920gcuov6uem2pn/XcodeStoryboardSample.zip?dl=0

Xamarin: https://www.dropbox.com/s/vpzd5kkf8xhuaaf/XamarinStoryboardSample.zip?dl=0

# Exception


# Steps to Reproduce

1. Download Xamarin sample
2. Deploy to iOS 8.3
3. Click “Go to next scene”

# Expected Results

Next storyboard should load

#  Actual Results

Exception is thrown

# Versions

=== Xamarin Studio Business ===

Version 6.0 (build 4968)
Installation UUID: 8de31dd3-bae5-4d28-a912-02a69acafc5b
	Mono 4.4.0 (mono-4.4.0-branch/a3fabf1) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 404000122

=== Xamarin.Profiler ===

Not Installed

=== 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/codybeyer/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3 (API level 15)
		4.3   (API level 18)
		4.4   (API level 19)
		6.0   (API level 23)

SDK Tools Version: 25.1.1
SDK Platform Tools Version: 23.1
SDK Build Tools Version: 23.0.3

Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

Android Designer EPL code available here:

=== Xamarin Android Player ===

Not Installed

=== Xamarin.Mac ===

Version: (Xamarin Business)

=== Xamarin Inspector ===

Hash: 357da8b
Branch: master
Build date: Thu Apr 14 20:41:42 UTC 2016

=== 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.4
Darwin Codys-MacBook-Pro.local 15.4.0 Darwin Kernel Version 15.4.0
	Fri Feb 26 22:08:05 PST 2016
	root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64

=== Enabled user installed addins ===

Xamarin Inspector
Comment 1 Sebastien Pouliot 2016-04-21 13:42:43 UTC
@Alex can you have a look ? thanks
Comment 2 Alex Soto [MSFT] 2016-05-09 23:33:10 UTC
I can duplicate, still investigating the reason.
Comment 3 Alan McGovern 2016-05-11 01:12:15 UTC
Jeff, this looks like an MSBuild issue. In Xcode 7.3.1 there's a second `ibtool` step which we don't appear to be running. I don't know what the 'Link Storyboards' step is, but when i look in the build output in xcode i see it and it has this log associated with it:

    cd /Users/alan/Downloads/XcodeStoryboardSample
    export PATH="/Applications/Xcode731.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode731.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    export XCODE_DEVELOPER_USR_PATH=/Applications/Xcode731.app/Contents/Developer/usr/bin/..
    /Applications/Xcode731.app/Contents/Developer/usr/bin/ibtool --errors --warnings --notices --module XcodeStoryboardSample --target-device iphone --target-device ipad --minimum-deployment-target 8.0 --output-format human-readable-text --link /Users/alan/Library/Developer/Xcode/DerivedData/XcodeStoryboardSample-ckaqmwdhrqelfidxrrhgwkcohquz/Build/Products/Debug-iphonesimulator/XcodeStoryboardSample.app /Users/alan/Library/Developer/Xcode/DerivedData/XcodeStoryboardSample-ckaqmwdhrqelfidxrrhgwkcohquz/Build/Intermediates/XcodeStoryboardSample.build/Debug-iphonesimulator/XcodeStoryboardSample.build/Base.lproj/FirstScene.storyboardc /Users/alan/Library/Developer/Xcode/DerivedData/XcodeStoryboardSample-ckaqmwdhrqelfidxrrhgwkcohquz/Build/Intermediates/XcodeStoryboardSample.build/Debug-iphonesimulator/XcodeStoryboardSample.build/Base.lproj/Main.storyboardc /Users/alan/Library/Developer/Xcode/DerivedData/XcodeStoryboardSample-ckaqmwdhrqelfidxrrhgwkcohquz/Build/Intermediates/XcodeStoryboardSample.build/Debug-iphonesimulator/XcodeStoryboardSample.build/Base.lproj/LaunchScreen.storyboardc

Could this be the thing which makes the testcase work? It's the only difference I can see which could explain it. The storyboard file seems identical between the Xamarin port and the original Obj-C, so the only thing i can think of to explain it is a build bug.
Comment 4 Jeffrey Stedfast 2016-05-11 17:55:56 UTC
Cody isn't using 7.3.1, though.
Comment 5 Alan McGovern 2016-05-11 18:46:59 UTC
I assume 7.3 is the same as 7.3.1 in this case
Comment 6 Jeffrey Stedfast 2016-05-11 19:14:51 UTC
ibtool --link simply copies the files into the app bundle. That's all it seems to do...
Comment 7 Jeffrey Stedfast 2016-05-12 19:31:15 UTC
Turns out ibtool --link does more than copy the storyboards, it also seems to combine them if they reference each other.

Fixed in master.