Bug 15797 - App crashes when deploying to device
Summary: App crashes when deploying to device
Status: RESOLVED DUPLICATE of bug 15506
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 7.0.3.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-10-29 15:21 UTC by Jon Goldberger [MSFT]
Modified: 2013-10-31 09:51 UTC (History)
3 users (show)

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


Attachments
Test project (3.97 KB, application/x-bzip2)
2013-10-29 15:21 UTC, Jon Goldberger [MSFT]
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 DUPLICATE of bug 15506

Comment 1 Jon Goldberger [MSFT] 2013-10-29 15:21:51 UTC
Created attachment 5264 [details]
Test project
Comment 2 Jon Goldberger [MSFT] 2013-10-29 15:24:06 UTC
Me and my coworker just spent a full day trying to track this bug.
We've reached a point where I can only think that we've stumbled upon
a Xamarin.iOS bug.

I'm using the alpha channel (because of the lack of
TopLayoutGuide.Length on beta and stable), see below the detailed
info.

We've been experiencing a crash that happens only if ALL the given
conditions are met:

(a) Running on a device (we only have devices with iOS 7.0.3 here).
Simulator works fine.

(b) Using Release mode. Debug mode works fine.

(c) Using the linker in "Link SDK assemblies only" mode. Not using
the linker works fine. We didn't test "Link all assemblies".

(d) Having a particular UIView.Transition(...) block on our code.
Removing the transition makes the problem go away.

(If any of these are not met, it works.)

At first we thought that the linker was removing something that was
being used. That was really strange since it worked on Debug mode.
Since disabling the linker made the problem go away, we went ahead
with trying to find what the linker was removing that it shouldn't.

We did a lot of git bisect, /* */s, etc... We tried using --linkskip
but it crashed mtouch with an exception. So we went on to using a
--xml file.

After reading most of the linker's source code, I've discovered (since
it's not documented anywhere I know) that there is a way of forcing
everything from an assembly to be preserved:

<assembly name="Foo"><type fullname="*" preserve="all" /></assembly>

Besides reading the code, I've tested this syntax and it works. So my
final step today was to write a clause like the above for all
assemblies that I'm referencing, even from my own solution. The final
binary grew from 17 to 40 MiB, but we still got the same behavior.

Since it's just on release mode, we actually don't have any idea of
what kind of crash it is (we can't attach a debugger -- remember that
it works on Debug mode even with the linker on "Link SDK assemblies
only" mode). Since we've preserved every field and method from every
assembly, we can't think of anything that is being thrown away by the
linker. But even so, the problem still arises.
================================================
=== Xamarin Studio ===

Version 4.1.12 (build 6)
Installation UUID: 75f72b13-d47d-463f-a2ab-7d141c64e7d1
Runtime:
Mono 3.2.3 ((no/8d3b4b7)
GTK+ 2.24.20 theme: Raleigh
GTK# (2.12.0.0)
Package version: 302030000

=== Xamarin.Android ===

Version: 4.10.0 (Business Edition)
Android SDK: /Users/loyful/Library/Developer/Xamarin/android-sdk-mac_x86
Supported Android versions:
2.1 (API level 7)
2.2 (API level 8)
2.3 (API level 10)
3.1 (API level 12)
4.0 (API level 14)
4.0.3 (API level 15)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

=== Apple Developer Tools ===

Xcode 5.0.1 (3335.23)
Build 5A2053

=== Xamarin.iOS ===

Version: 7.0.3.213 (Business Edition)
Hash: cea17d0
Branch:
Build date: 2013-18-10 17:54:48-0400

=== Xamarin.Mac ===

Xamarin.Mac: Not Installed

=== Build Information ===

Release ID: 401120006
Git revision: a9ae69a4bf37955e4ab4df0cec7804f574c51f72
Build date: 2013-09-25 16:59:37+0000
Xamarin addins: 761ae26f220068dda0b62f0dd2253f617589a8c6

=== Operating System ===

Mac OS X 10.9.0
Darwin alan-pogrebinschis-macbook-pro-3.local 13.0.0 Darwin Kernel
Version 13.0.0
Thu Sep 19 22:22:27 PDT 2013
root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64
==================================================
Build output:
We've tested the given project on both an iPhone 4 and an iPhone 5,
both with 7.0.3. I've tested again and I'm still seeing the bug on
the iPhone 4.

Here's the output using -v -v -v -v after Clean All:


Building: Bug (Release|iPhone)

Detecting signing identity...
Provisioning Profile: "iOS Team Provisioning Profile: *" (redacted)
Signing Identity: "iPhone Developer: redacted"
App ID: "EGHDT4T7PN.bug"
Performing main compilation...
/Library/Frameworks/Mono.framework/Versions/3.2.3/bin/mcs /noconfig
"/r:/Developer/MonoTouch/usr/lib/mono/2.1/mscorlib.dll" -nostdlib
"/out:/Users/loyful/repos/linker-bug/Bug/bin/iPhone/Release/Bug.exe"
"/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.dll"
"/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll"
"/r:/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll"
"/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll" /nologo
/warn:4 /debug:full /optimize+ /codepage:utf8
"/define:__MOBILE__;__IOS__" /t:exe
"/Users/loyful/repos/linker-bug/Bug/AppDelegate.cs"
Build complete -- 0 errors, 0 warnings

Compiling to native code
/Developer/MonoTouch/usr/bin/mtouch -sdkroot
"/Applications/Xcode.app/Contents/Developer" --cache
"/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache"
--nomanifest --nosign -dev
"/Users/loyful/repos/linker-bug/Bug/bin/iPhone/Release/Bug.app" -r
"/Developer/MonoTouch/usr/lib/mono/2.1/System.dll" -r
"/Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll" -r
"/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll" -linksdkonly
-sdk "7.0" -targetver "6.0" --abi=armv7
"--xml=/Users/loyful/repos/linker-bug/Bug/LinkerPleaseInclude.xml"
"-v" "-v" "-v" "-v"
"/Users/loyful/repos/linker-bug/Bug/bin/iPhone/Release/Bug.exe"
Xamarin.iOS 7.0.3.213 (cea17d0) Business Edition using framework:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk
A full rebuild will be performed because the cache is either
incomplete or entirely missing.
Copied /Users/loyful/repos/linker-bug/Bug/bin/iPhone/Release/Bug.exe
to /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Link/Bug.exe
Copied /Users/loyful/repos/linker-bug/Bug/bin/iPhone/Release/Bug.exe.mdb
to /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Link/Bug.exe.mdb
Copied /Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll to
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Link/monotouch.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll.mdb to
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Link/monotouch.dll.mdb
Copied /Developer/MonoTouch/usr/lib/mono/2.1/mscorlib.dll to
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Link/mscorlib.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/mscorlib.dll.mdb to
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Link/mscorlib.dll.mdb
Copied /Developer/MonoTouch/usr/lib/mono/2.1/System.dll to
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Link/System.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/System.dll.mdb to
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Link/System.dll.mdb
Copied /Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll to
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Link/System.Core.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll.mdb to
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Link/System.Core.dll.mdb
Copied /Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll to
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Link/System.Xml.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll.mdb to
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Link/System.Xml.dll.mdb
Loaded '/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Link/Bug.exe'
Loaded '/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Link/monotouch.dll'
Loaded '/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Link/mscorlib.dll'
Loaded '/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Link/System.dll'
Loaded '/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Link/System.Core.dll'
Loaded '/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Link/System.Xml.dll'
Linking SDK only for assembly
/Users/loyful/repos/linker-bug/Bug/bin/iPhone/Release/Bug.exe into
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/PreBuild
Copied /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/PreBuild/Bug.exe
to /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/Bug.exe
Copied /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/PreBuild/Bug.exe.mdb
to /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/Bug.exe.mdb
Copied /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/PreBuild/monotouch.dll
to /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/monotouch.dll
Copied /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/PreBuild/monotouch.dll.mdb
to /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/monotouch.dll.mdb
Copied /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/PreBuild/mscorlib.dll
to /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/mscorlib.dll
Copied /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/PreBuild/mscorlib.dll.mdb
to /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/mscorlib.dll.mdb
Copied /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/PreBuild/System.dll
to /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/System.dll
Copied /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/PreBuild/System.dll.mdb
to /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/System.dll.mdb
Copied /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/PreBuild/System.Core.dll
to /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/System.Core.dll
Copied /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/PreBuild/System.Core.dll.mdb
to /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/System.Core.dll.mdb
Copied /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/PreBuild/System.Xml.dll
to /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/System.Xml.dll
Copied /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/PreBuild/System.Xml.dll.mdb
to /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/System.Xml.dll.mdb
Target /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Bug.exe.armv7.s
needs to be rebuilt.
Target /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Bug.exe.armv7.o
needs to be rebuilt.
Target /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/monotouch.dll.armv7.s
needs to be rebuilt.
Target /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/monotouch.dll.armv7.o
needs to be rebuilt.
Target /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/mscorlib.dll.armv7.s
needs to be rebuilt.
Target /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/mscorlib.dll.armv7.o
needs to be rebuilt.
Target /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/System.dll.armv7.s
needs to be rebuilt.
Target /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/System.dll.armv7.o
needs to be rebuilt.
Target /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/System.Core.dll.armv7.s
needs to be rebuilt.
Target /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/System.Core.dll.armv7.o
needs to be rebuilt.
Target /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/System.Xml.dll.armv7.s
needs to be rebuilt.
Target /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/System.Xml.dll.armv7.o
needs to be rebuilt.
File '/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/registrar.m'
does not exist, creating it.
File '/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/main.armv7.m'
does not exist, creating it.
MONO_PATH=/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build
/Developer/MonoTouch/usr/bin/arm-darwin-mono-boehm --debug
-O=gsharedvt --aot=mtriple=armv7-ios,full,static,asmonly,direct-icalls,nodebug,dwarfdebug,outfile=/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/System.dll.armv7.s
"/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/System.dll"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
-gdwarf-2 -arch armv7 -std=c99
-I/Developer/MonoTouch/SDKs/MonoTouch.iphoneos.sdk/usr/include
-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk
-Qunused-arguments -miphoneos-version-min=6.0 -c -o
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/main.armv7.o
-x objective-c /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/main.armv7.m
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
-gdwarf-2 -arch armv7 -std=c99
-I/Developer/MonoTouch/SDKs/MonoTouch.iphoneos.sdk/usr/include
-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk
-Qunused-arguments -miphoneos-version-min=6.0 -c -o
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/registrar.armv7.o
-Wno-receiver-forward-class -x objective-c
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/registrar.m
MONO_PATH=/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build
/Developer/MonoTouch/usr/bin/arm-darwin-mono-boehm --debug
-O=gsharedvt --aot=mtriple=armv7-ios,full,static,asmonly,direct-icalls,nodebug,dwarfdebug,outfile=/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/System.Xml.dll.armv7.s
"/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/System.Xml.dll"
Mono Ahead of Time compiler - compiling assembly
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/System.Xml.dll
Code: 32 Info: 2 Ex Info: 3 Unwind Info: 19 Class Info: 42 PLT: 1 GOT
Info: 5 GOT: 20 Offsets: 34
Compiled: 1/1 (100%), No GOT slots: 1 (100%), Direct calls: 0 (100%)
Output file: '/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/System.Xml.dll.armv7.s'.
Linking symbol: '_mono_aot_module_System_Xml_info'.
JIT time: 0 ms, Generation time: 1 ms, Assembly+Link time: 0 ms.

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
-arch armv7 -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk
-Qunused-arguments -miphoneos-version-min=6.0 -c -o
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/System.Xml.dll.armv7.o
-x assembler /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/System.Xml.dll.armv7.s
MONO_PATH=/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build
/Developer/MonoTouch/usr/bin/arm-darwin-mono-boehm --debug
-O=gsharedvt --aot=mtriple=armv7-ios,full,static,asmonly,direct-icalls,nodebug,dwarfdebug,outfile=/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/System.Core.dll.armv7.s
"/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/System.Core.dll"
Mono Ahead of Time compiler - compiling assembly
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/System.dll
Code: 1795720 Info: 48669 Ex Info: 81716 Unwind Info: 11267 Class
Info: 44884 PLT: 5102 GOT Info: 115222 GOT: 37116 Offsets: 45225
Compiled: 9490/9490 (100%), No GOT slots: 5807 (61%), Direct calls: 10269 (122%)
Output file: '/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/System.dll.armv7.s'.
Linking symbol: '_mono_aot_module_System_info'.
JIT time: 1351 ms, Generation time: 1973 ms, Assembly+Link time: 0 ms.

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
-arch armv7 -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk
-Qunused-arguments -miphoneos-version-min=6.0 -c -o
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/System.dll.armv7.o
-x assembler /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/System.dll.armv7.s
MONO_PATH=/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build
/Developer/MonoTouch/usr/bin/arm-darwin-mono-boehm --debug
-O=gsharedvt --aot=mtriple=armv7-ios,full,static,asmonly,direct-icalls,nodebug,dwarfdebug,outfile=/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/mscorlib.dll.armv7.s
"/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/mscorlib.dll"
Mono Ahead of Time compiler - compiling assembly
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/System.Core.dll
Code: 2077056 Info: 48449 Ex Info: 138347 Unwind Info: 10483 Class
Info: 4467 PLT: 10706 GOT Info: 365010 GOT: 58056 Offsets: 47685
Compiled: 10001/10001 (100%), No GOT slots: 5325 (53%), Direct calls:
6169 (130%)
Output file: '/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/System.Core.dll.armv7.s'.
Linking symbol: '_mono_aot_module_System_Core_info'.
JIT time: 1916 ms, Generation time: 2009 ms, Assembly+Link time: 0 ms.

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
-arch armv7 -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk
-Qunused-arguments -miphoneos-version-min=6.0 -c -o
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/System.Core.dll.armv7.o
-x assembler /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/System.Core.dll.armv7.s
Mono Ahead of Time compiler - compiling assembly
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/mscorlib.dll
Code: 1682236 Info: 37403 Ex Info: 80751 Unwind Info: 10181 Class
Info: 23427 PLT: 4769 GOT Info: 146605 GOT: 30720 Offsets: 40042
Compiled: 8418/8418 (100%), No GOT slots: 5358 (63%), Direct calls: 14915 (128%)
Output file: '/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/mscorlib.dll.armv7.s'.
Linking symbol: '_mono_aot_module_mscorlib_info'.
JIT time: 1108 ms, Generation time: 2417 ms, Assembly+Link time: 0 ms.

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
-arch armv7 -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk
-Qunused-arguments -miphoneos-version-min=6.0 -c -o
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/mscorlib.dll.armv7.o
-x assembler /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/mscorlib.dll.armv7.s
MONO_PATH=/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build
/Developer/MonoTouch/usr/bin/arm-darwin-mono-boehm --debug
-O=gsharedvt --aot=mtriple=armv7-ios,full,static,asmonly,direct-icalls,nodebug,dwarfdebug,outfile=/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/monotouch.dll.armv7.s
"/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/monotouch.dll"
Mono Ahead of Time compiler - compiling assembly
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/monotouch.dll
Code: 5010120 Info: 191130 Ex Info: 145943 Unwind Info: 15900 Class
Info: 356546 PLT: 9524 GOT Info: 147737 GOT: 87540 Offsets: 181334
Compiled: 36444/36444 (100%), No GOT slots: 9771 (26%), Direct calls:
33096 (75%)
Output file: '/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/monotouch.dll.armv7.s'.
Linking symbol: '_mono_aot_module_monotouch_info'.
JIT time: 3595 ms, Generation time: 4616 ms, Assembly+Link time: 0 ms.

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
-arch armv7 -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk
-Qunused-arguments -miphoneos-version-min=6.0 -c -o
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/monotouch.dll.armv7.o
-x assembler /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/monotouch.dll.armv7.s
MONO_PATH=/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build
/Developer/MonoTouch/usr/bin/arm-darwin-mono-boehm --debug
-O=gsharedvt --aot=mtriple=armv7-ios,full,static,asmonly,direct-icalls,nodebug,dwarfdebug,outfile=/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Bug.exe.armv7.s
"/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/Bug.exe"
Mono Ahead of Time compiler - compiling assembly
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/Bug.exe
Code: 980 Info: 31 Ex Info: 24 Unwind Info: 90 Class Info: 1236 PLT:
11 GOT Info: 128 GOT: 96 Offsets: 66
Compiled: 8/8 (100%), No GOT slots: 5 (62%), Direct calls: 2 (200%)
Output file: '/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Bug.exe.armv7.s'.
Linking symbol: '_mono_aot_module_Bug_info'.
JIT time: 29 ms, Generation time: 4 ms, Assembly+Link time: 0 ms.

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
-arch armv7 -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk
-Qunused-arguments -miphoneos-version-min=6.0 -c -o
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Bug.exe.armv7.o
-x assembler /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Bug.exe.armv7.s
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
-Wl,-pie -miphoneos-version-min=6.0 -arch armv7 -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Bug.exe.armv7.o
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/monotouch.dll.armv7.o
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/mscorlib.dll.armv7.o
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/System.dll.armv7.o
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/System.Core.dll.armv7.o
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/System.Xml.dll.armv7.o
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/registrar.armv7.o
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/main.armv7.o
-o /Users/loyful/repos/linker-bug/Bug/bin/iPhone/Release/Bug.app/Bug
-framework CFNetwork -framework AVFoundation -framework Accelerate
-framework AddressBook -framework AudioToolbox -framework QuartzCore
-framework CoreBluetooth -framework CoreData -framework CoreGraphics
-framework CoreImage -framework CoreLocation -framework CoreText
-framework Foundation -framework GameKit -framework ImageIO -framework
MobileCoreServices -framework Security -framework SystemConfiguration
-framework CoreMedia -framework CoreMIDI -framework CoreVideo
-framework StoreKit -framework AssetsLibrary -framework Accounts
-framework CoreTelephony -framework EventKit -framework EventKitUI
-framework CoreMotion -framework GLKit -framework iAd -framework
MapKit -framework MediaPlayer -framework MessageUI -framework
NewsstandKit -framework OpenGLES -framework Social -framework Twitter
-framework UIKit -framework PassKit -framework AddressBookUI
-framework ExternalAccessory -framework AdSupport -framework QuickLook
-weak_framework SpriteKit -weak_framework JavaScriptCore
-weak_framework MultipeerConnectivity -weak_framework GameController
-weak_framework MediaAccessibility -weak_framework SafariServices -lz
-liconv -u _xamarin_dispose_helper -u _xamarin_init_nsthread -u
_monotouch_release_managed_ref -u _monotouch_create_managed_ref -u
_monotouch_start_wwan -u _monotouch_IntPtr_objc_msgSend_IntPtr -u
_monotouch_IntPtr_objc_msgSendSuper_IntPtr -u _CreateZStream -u
_CloseZStream -u _Flush -u _ReadZStream -u _WriteZStream -u
_monotouch_log /Developer/MonoTouch/SDKs/MonoTouch.iphoneos.sdk/usr/lib/libmonoboehm-2.0.a
/Developer/MonoTouch/SDKs/MonoTouch.iphoneos.sdk/usr/lib/libmonotouch.a
-dead_strip
/usr/bin/dsymutil
/Users/loyful/repos/linker-bug/Bug/bin/iPhone/Release/Bug.app/Bug -t 4
-z -o /Users/loyful/repos/linker-bug/Bug/bin/iPhone/Release/Bug.app.dSYM
/usr/bin/mdimport
/Users/loyful/repos/linker-bug/Bug/bin/iPhone/Release/Bug.app.dSYM
/usr/bin/strip -i -s
"/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/symbol-file"
"/Users/loyful/repos/linker-bug/Bug/bin/iPhone/Release/Bug.app/Bug"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip:
removing global symbols from a final linked no longer supported. Use
-exported_symbols_list at link time when building:
/Users/loyful/repos/linker-bug/Bug/bin/iPhone/Release/Bug.app/Bug

Stripping assembly
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/mscorlib.dll
Stripping assembly
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/System.Xml.dll
/Library/Frameworks/Mono.framework/Versions/Current/bin/mono
/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.5/mono-cil-strip.exe
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/System.Xml.dll
/Users/loyful/repos/linker-bug/Bug/bin/iPhone/Release/Bug.app/System.Xml.dll
/Library/Frameworks/Mono.framework/Versions/Current/bin/mono
/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.5/mono-cil-strip.exe
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/mscorlib.dll
/Users/loyful/repos/linker-bug/Bug/bin/iPhone/Release/Bug.app/mscorlib.dll
Mono CIL Stripper

Assembly /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/System.Xml.dll
stripped out into
/Users/loyful/repos/linker-bug/Bug/bin/iPhone/Release/Bug.app/System.Xml.dll

Stripping assembly
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/System.Core.dll
/Library/Frameworks/Mono.framework/Versions/Current/bin/mono
/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.5/mono-cil-strip.exe
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/System.Core.dll
/Users/loyful/repos/linker-bug/Bug/bin/iPhone/Release/Bug.app/System.Core.dll
Mono CIL Stripper

Assembly /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/mscorlib.dll
stripped out into
/Users/loyful/repos/linker-bug/Bug/bin/iPhone/Release/Bug.app/mscorlib.dll

Stripping assembly
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/monotouch.dll
/Library/Frameworks/Mono.framework/Versions/Current/bin/mono
/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.5/mono-cil-strip.exe
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/monotouch.dll
/Users/loyful/repos/linker-bug/Bug/bin/iPhone/Release/Bug.app/monotouch.dll
Mono CIL Stripper

Assembly /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/System.Core.dll
stripped out into
/Users/loyful/repos/linker-bug/Bug/bin/iPhone/Release/Bug.app/System.Core.dll

Stripping assembly
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/System.dll
/Library/Frameworks/Mono.framework/Versions/Current/bin/mono
/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.5/mono-cil-strip.exe
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/System.dll
/Users/loyful/repos/linker-bug/Bug/bin/iPhone/Release/Bug.app/System.dll
Mono CIL Stripper

Assembly /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/System.dll
stripped out into
/Users/loyful/repos/linker-bug/Bug/bin/iPhone/Release/Bug.app/System.dll

Mono CIL Stripper

Assembly /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/monotouch.dll
stripped out into
/Users/loyful/repos/linker-bug/Bug/bin/iPhone/Release/Bug.app/monotouch.dll

Stripping assembly
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/Bug.exe
/Library/Frameworks/Mono.framework/Versions/Current/bin/mono
/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.5/mono-cil-strip.exe
/Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/Bug.exe
/Users/loyful/repos/linker-bug/Bug/bin/iPhone/Release/Bug.app/Bug.exe
Mono CIL Stripper

Assembly /Users/loyful/repos/linker-bug/Bug/obj/iPhone/Release/mtouch-cache/Build/Bug.exe
stripped out into
/Users/loyful/repos/linker-bug/Bug/bin/iPhone/Release/Bug.app/Bug.exe

Bug.app built successfully.

Updating application manifest

Updating debug configuration file

Updating debug settings manifest

Embedding provisioning profile

Processing entitlements file

Preparing resources rules

Signing application
codesign -v -f -s "redacted"
"--resource-rules=/Users/loyful/repos/linker-bug/Bug/bin/iPhone/Release/Bug.app/ResourceRules.plist"
--entitlements "/Users/loyful/repos/linker-bug/Bug/bin/iPhone/Release/Bug.xcent"
"/Users/loyful/repos/linker-bug/Bug/bin/iPhone/Release/Bug.app"
/Users/loyful/repos/linker-bug/Bug/bin/iPhone/Release/Bug.app: signed
bundle with Mach-O thin (armv7) [bug]

---------------------- Done ----------------------
Comment 3 Sebastien Pouliot 2013-10-29 16:12:30 UTC
> (b) Using Release mode. Debug mode works fine.

The 7.0.3.213 build had an issue with Release. 

This was fixed in 7.0.3.215+ and should be shortly available in the alpha channel.

*** This bug has been marked as a duplicate of bug 15506 ***
Comment 4 Felipe Lessa 2013-10-30 14:30:55 UTC
Sebastien, so you're saying that you were able to reproduce the bug using the test case on 7.0.3.213 but not on 7.0.3.215+, is that correct?  I'm asking because Jon wasn't able to reproduce this bug using his 7.0.3.213.
Comment 5 Sebastien Pouliot 2013-10-30 19:58:35 UTC
Felipe, I did not go back to reproduce it with 7.0.3.213 - but I can't reproduce it with later versions.

The same issue was reported in several bug reports (all merged into #15506) and forum posts over the last days so I'm highly confident this is identical.

The issue is that release builds are stripped* and one symbol was not preserved.

* it's a bit similar to what the _managed_ linker does (removing unused stuff) but it's all native (happens later) and only done for release builds.

note: maybe Jon mixed up .213 and .215 as we don't generally specify the 4th part of the build number.
Comment 7 Felipe Lessa 2013-10-31 09:51:02 UTC
I see, thanks!  Looking forward to testing with the new alpha version, then.