Bug 27809 - Failed assertion from ibtool "Creating an out of band arbitration unit" (related to constraints) not surfaced correctly in MSBuild build errors
Summary: Failed assertion from ibtool "Creating an out of band arbitration unit" (rela...
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: MSBuild ()
Version: XI 8.6.0
Hardware: PC All
: --- major
Target Milestone: Untriaged
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2015-03-10 00:17 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2015-03-10 14:27 UTC (History)
2 users (show)

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


Attachments
Test case (22.58 KB, application/zip)
2015-03-10 00:17 UTC, Brendan Zagaeski (Xamarin Team, assistant)
Details
Logs (22.62 KB, application/zip)
2015-03-10 00:18 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 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 FIXED

Description Brendan Zagaeski (Xamarin Team, assistant) 2015-03-10 00:17:45 UTC
Created attachment 10238 [details]
Test case

Failed assertion from ibtool "Creating an out of band arbitration unit" (related to constraints) is not surfaced correctly in the MSBuild build errors.

The build error that _is_ surfaced by this test case looks deceptively similar to the secondary problem on bug 25551, but this bug is _not_ a duplicate of bug 25551.


Regression status: "Regression" between the old `mdtool` build targets vs. the new MSBuild build targets.


## Steps to reproduce

1. Create a new "C# -> iOS -> Universal -> Single View App (iOS)". (Classic API apps show the same behavior.)

2. Replace the `UIViewController` in "MainStoryboard_iPhone.storyboard" with a `UITableViewController.`

3. Add a `UITableViewCell` to the `UITableViewController`.

4. Open "Info.plist", and change "iPhone Deployment Info -> Deployment Target" to "6.1".

5. Attempt to build the project in the "Debug|iPhoneSimulator" configuration (in either Visual Studio or Xamarin Studio).



OR just download the attached test case and skip directly to step 5.



## Results

### Excerpt of the "real" error from `ibtool` in `devenv*.log`

The problem is that `ibtool` itself quits due to a failed assertion related to constraints, but this error is not handled gracefully by the MSBuild tasks.

> 2015-03-09 23:21:04.482 ibtoold[86561:507] [MT] DVTAssertions: ASSERTION FAILURE in /SourceCache/IDEInterfaceBuilder/IDEInterfaceBuilder-6254/InterfaceBuilderKit/WidgetIntegration/View/IBViewIntegration.m:3076
> Details:  Creating an out of band arbitration unit with a view
> (<IBUITableViewCell: 0x7fdd35546f60>) as the root under another view
> (<IBUITableView: 0x7fdd35542b30>) is not yet implemented. The view would need
> to be in two arbitration units, the one above for positioning constraints,
> and the root of the one below for sizing constraints. But then that means
> that subviews cannot have constraints that affect the size of the view, so
> the view must have ibExternalTranslatesAutoresizingMaskIntoConstraints set to
> YES.
> Object:   <IBUITableViewCell: 0x7fdd35546f60>
> Method:   -ibArbitrationUnitWasCreatedWithReceiverAsRootUnderParent:
> Hints: None
> Backtrace:
>   0  0x000000010843c24a -[DVTAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in DVTFoundation)
>   1  0x000000010843bc9f _DVTAssertionHandler (in DVTFoundation)
>   2  0x000000010843bf8e _DVTAssertionFailureHandler (in DVTFoundation)
>   3  0x000000010952ebbb -[NSView(IBViewIntegration) ibArbitrationUnitWasCreatedWithReceiverAsRootUnderParent:] (in IDEInterfaceBuilderKit)


### Errors from the "Error List" window

> Failed to load output manifest for ibtool: Unrecognized property list format.	C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets	626
> Output manifest contents: 	C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets	626


### Corresponding errors from the diagnostic build output

>   Tool /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool execution started with arguments:
>     --errors --warnings --notices --output-format xml1
>     --minimum-deployment-target 6.1 --auto-activate-custom-fonts
>     --sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk
>     --compile /Volumes/Cases/macuser/Library/Caches/Xamarin/mtbs/builds/UnifiedSingleViewUniversal1/4cffa4c308b5e38c1433adc1465618c8/obj/iPhoneSimulator/Debug/ibtool/MainStoryboard_iPhone.storyboardc
>     /Volumes/Cases/macuser/Library/Caches/Xamarin/mtbs/builds/UnifiedSingleViewUniversal1/4cffa4c308b5e38c1433adc1465618c8/MainStoryboard_iPhone.storyboard
>     (TaskId:11)
>   Tool /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool execution finished. (TaskId:11)
> C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(626,3): error : Failed to load output manifest for ibtool: Unrecognized property list format.
> C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(626,3): error : Output manifest contents: 
>   IBToolTask: 2015-03-09T23:21:05.1637608-04:00 - Finished (TaskId:11)
> Done executing task "IBToolTask" -- FAILED. (TaskId:11)



## Expected results

Show a more accurate error message in the build errors. For example, the old `mdtool` build targets (for Classic apps) do print more helpful error messages.


### Error from the "Error list" when using the `mdtool` build targets

> Error: Failed to compile interface file. See Build Output for details.


### Corresponding excerpt from the "Build Output"

> /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool
>   --errors --warnings --notices --minimum-deployment-target 6.1 --output-format human-readable-text
>   --compile "/Volumes/ramdisk/IBToolConstraintErrorQuitsSilently/ClassicSingleViewUniversal1/bin/iPhoneSimulator/Debug/ClassicSingleViewUniversal1.app/MainStoryboard_iPhone.storyboardc"
>   "/Volumes/ramdisk/IBToolConstraintErrorQuitsSilently/ClassicSingleViewUniversal1/MainStoryboard_iPhone.storyboard"
>   --sdk "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk"
> ibtool exited with code 255
> Build complete -- 1 error, 0 warnings



## Version info

OS X 10.9.5, MacBook Air

=== Xamarin Studio ===

Version 5.7.2 (build 7)
Installation UUID: 2c0ea975-8f73-4920-8414-3e9ae359fbf4
Runtime:
	Mono 3.12.1 ((detached/b7764aa)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312010000

=== Apple Developer Tools ===

Xcode 6.1.1 (6611)
Build 6A2008a

=== Xamarin.iOS ===

Version: 8.6.3.3 (Business Edition)
Hash: 90e32d0
Build date: 2015-03-06 12:27:17-0500

=== Build Information ===

Release ID: 507020007
Git revision: dcf3f486177d3e625349b51a8f3be807e3fa7712
Build date: 2015-02-24 09:14:27-05
Xamarin addins: ea7c65bb7876e4a876ab365208e94acdf8f330ef
Comment 1 Brendan Zagaeski (Xamarin Team, assistant) 2015-03-10 00:18:47 UTC
Created attachment 10239 [details]
Logs
Comment 3 Jeffrey Stedfast 2015-03-10 14:27:52 UTC
I think I've fixed this in git master of maccore, but I don't know how to test it, so no clue.