Bug 26405 - Incremental Build setting causes Unified app crash during launch on iOS 8: "Library not loaded ... *.exe.dylib"
Summary: Incremental Build setting causes Unified app crash during launch on iOS 8: "L...
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: MSBuild ()
Version: XI 8.6.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Rolf Bjarne Kvinge [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2015-01-26 00:03 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2015-02-19 13:47 UTC (History)
5 users (show)

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


Attachments
Diagnostic build output (114.49 KB, text/plain)
2015-01-26 00:03 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-01-26 00:03:11 UTC
Created attachment 9492 [details]
Diagnostic build output

Incremental Build setting causes Unified app crash during launch on iOS 8: "Library not loaded ... *.exe.dylib"

The symptoms of this bug are _very_ similar to bug 23526, but (a) the problem is for Unified apps rather than Classic apps, and (b) the `.dylib` files appear to be getting signed correctly. This bug also seems to be different from bug 26404: manually copying `libmonosgen-2.0.dylib` into the app bundle solves bug 26404 but does not solve this bug.


Regression status: new feature: Unified API


## Steps to reproduce

1. Create a new "C# -> iOS -> Unified API -> Universal -> Single View Application" in Xamarin Studio on Mac.

2. Enable "iOS Build -> General [tab] -> Debugging options -> Enable incremental builds" (MtouchFastDev) and save the project properties.

3. Attempt to build and run the project on an iOS 8 device.


## Results: the app crashes during launch

From Xcode -> Window -> Devices -> "Device Name" -> View Device Logs [button]

> Dyld Error Message:
>   Library not loaded: @executable_path/libUnifiedSingleViewUniversal1.exe.dylib
>   Referenced from: /private/var/mobile/Containers/Bundle/Application/FD47484F-FAD4-4D30-8220-CC1DA4243A4E/UnifiedSingleViewUniversal1.app/UnifiedSingleViewUniversal1
>   Reason: no suitable image found.  Did find:
> 	/private/var/mobile/Containers/Bundle/Application/FD47484F-FAD4-4D30-8220-CC1DA4243A4E/UnifiedSingleViewUniversal1.app/libUnifiedSingleViewUniversal1.exe.dylib: no matching architecture in universal wrapper
> 	/private/var/mobile/Containers/Bundle/Application/FD47484F-FAD4-4D30-8220-CC1DA4243A4E/UnifiedSingleViewUniversal1.app/libUnifiedSingleViewUniversal1.exe.dylib: no matching architecture in universal wrapper
>   Dyld Version: 353.5


## Versions

### Windows 8.1 64-bit, in VMWare Fusion 6.0.5 (2209127)

Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51641

Xamarin   3.9.274.0 (74260cb)
Xamarin.Android   4.20.0.34 (49a04b966feb40dfdba49d57ba16249b66d606a6)
Xamarin.iOS   8.6.1.0 (dd1b996f9fab5be032c5bfc54df1bc445953e90f)

### OS X 10.9.5, MacBook Air

Xcode 6.1 (6604), Build 6A1052d

Version: 8.6.1.19 (Business Edition), Hash: 80971a6
Build date: 2015-01-21 17:42:51-0500

Xamarin Studio Version 5.7 (build 661), Hash: b70bab61d
Build date: 2015-01-05 16:31:31-05
Xamarin addins: 82f6c71490562d6cd125a09287f441902fdac3d7

Mono 3.12.0 ((detached/a813491)


Also tested: 
Xamarin.iOS 8.6.0.51 (Business Edition), Hash: dfb682f
Build date: 2015-01-08 13:39:32-0500
Comment 6 Rolf Bjarne Kvinge [MSFT] 2015-02-19 13:47:05 UTC
I can reproduce with 8.6.0 but not with maccore/master, so this is something we've already fixed.