Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 9649 [details]
Project Exhibiting Issue
As per a customer:
See the attached project project that exhibits the crash on iOS devices.
Just compile and deploy the project.
It shows a button “Press me” that calls the necessary code.
It runs fine on Android, WinPhone and the iOS simulator.
Confirmed to crash on iPad.
It seems that the framework has trouble to load a type while getting attributes via reflection. It may be that this is related to the project structure as well (maybe the linker is involved):
The version you now have builds the portable library to the bin folder and the iOS-application to bin\iphone. This exhibits the problem. If I build everything into the same folder, the build succeeds on the iPhone.
I have checked this issue and able to reproduce this. To reproduce this issue I have followed the steps and instruction provided in bug description.
I observed that after deploying the application on device, and then pressing the button the application get crashed. Please refer the screencast for the same.
Application Out: https://gist.github.com/Rajneesh360Logica/91cff9bfd23acbfcd2e2
Ide logs: https://gist.github.com/Rajneesh360Logica/f0c33ba58e9ac547fc18
Build Output: https://gist.github.com/Rajneesh360Logica/d4d969080df7a31bdb79
Device Logs: https://gist.github.com/Rajneesh360Logica/5048655adb98507661d7
iOS designer Logs: https://gist.github.com/Rajneesh360Logica/2ff78469efcc0f3cb975
=== Xamarin Studio ===
Xamarin.Forms Version: 18.104.22.16821-pre1
Version 5.7.1 (build 17)
Installation UUID: 011d70a5-dede-428b-ab04-ef451c2e539d
Mono 3.12.0 ((detached/a813491)
GTK+ 2.24.23 (Raleigh theme)
Package version: 312000068
=== Xamarin.Android ===
Version: 22.214.171.124 (Business Edition)
Android SDK: /Users/MM/Desktop/android-sdk-macosx
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)
4.1 (API level 16)
4.2 (API level 17)
4.3 (API level 18)
4.4 (API level 19)
4.4.87 (API level 20)
5.0 (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
=== Apple Developer Tools ===
Xcode 6.1 (6604)
=== Xamarin.iOS ===
Version: 126.96.36.199 (Business Edition)
Build date: 2015-01-24 09:42:21-0500
=== Xamarin.Mac ===
Version: 188.8.131.52 (Business Edition)
=== Build Information ===
Release ID: 507010017
Git revision: 0bc7d3550b6b088ac25b08dcf7bbe73bcc8658b3
Build date: 2015-02-03 19:43:29-05
Xamarin addins: f7b7d34419c9ec24501bfa7c658e80a6305613e0
=== Operating System ===
Mac OS X 10.9.5
Darwin MacMini.local 13.4.0 Darwin Kernel Version 13.4.0
Sun Aug 17 19:50:11 PDT 2014
This looks to be an issue unrelated to forms, redirecting to ios.
> (maybe the linker is involved)
FYI that's an easy assertion to confirm/deny. You can enable the linker on the simulator (fails) and disable it on devices (works).
> Could not load type System.String, System.Runtime, Version=184.108.40.206, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a while decoding custom attribute
^ that's a reference to a facade assembly (not where the type resides).
So there's an extra reference to `System.Runtime` (which has not been resolved to `mscorlib` since it's looking for `System.String`) that needs to be tracked down. It's likely a missing case (custom attributes only?) where our PCL support is incomplete.
Note: setting the linker to "Link all" solves the issue (but you might run into different issues).
> [MessageProperty(0, TypeInBuffer = typeof(string))]
since this is inside a PCL assembly the custom attribute is encoded with a reference to System.Runtime (not mscorlib) as the assembly that provides `string`. The way custom attributes are encoded means this is not a _normal_ type reference (and not one being resolved).
In general "Link SDK" does no (normally) change user code except for some stuff (like forwarding). That code is different from "Link all" and (I'm pretty sure) is not custom attribute aware.
Fixed in mono/master d07822286c01a072a36f8cfd678abb99b41e27f3
and backported to mono/mono-3.12.0-branch 53274401f4e10a3c494cb88405bcf324fb0d0271 for XI 8.10