Bug 27056 - App crashes on iOS when using OnPlatform x:TypeArguments="Thickness"
Summary: App crashes on iOS when using OnPlatform x:TypeArguments="Thickness"
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.4
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Jason Smith [MSFT]
Depends on:
Reported: 2015-02-13 13:20 UTC by werb
Modified: 2016-04-08 19:30 UTC (History)
5 users (show)

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

Log Files (12.88 KB, application/zip)
2015-02-17 05:47 UTC, werb
Project crashing (205.84 KB, application/zip)
2015-02-17 05:58 UTC, werb

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 werb 2015-02-13 13:20:22 UTC
iOS App crashes if you use OnPlatform in XAML. Android App works fine.

How to reproduce:
Create new Forms Project. Add new XAML Page, with following XAML:

<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
    <OnPlatform x:TypeArguments="Thickness"
                iOS="0, 0, 0, 0"
                Android="0, 0, 20, 0"
                WinPhone="0, 0, 0, 0" />
	<Label Text="Test" VerticalOptions="Center" HorizontalOptions="Center" />

Run on iOS -> crash

Microsoft Visual Studio Ultimate 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.5.51650

Installed Version: Ultimate

Architecture and Modeling Tools   06181-004-0449004-02007
Microsoft Architecture and Modeling Tools
UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

Team Explorer for Visual Studio 2013   06181-004-0449004-02007
Microsoft Team Explorer for Visual Studio 2013

Visual Basic 2013   06181-004-0449004-02007
Microsoft Visual Basic 2013

Visual C# 2013   06181-004-0449004-02007
Microsoft Visual C# 2013

Visual C++ 2013   06181-004-0449004-02007
Microsoft Visual C++ 2013

Visual F# 2013   06181-004-0449004-02007
Microsoft Visual F# 2013

Visual Studio 2013 Code Analysis Spell Checker   06181-004-0449004-02007
Microsoft® Visual Studio® 2013 Code Analysis Spell Checker

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

Windows Phone SDK 8.0 - ENU   06181-004-0449004-02007
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   1.0
Application Insights Tools for Visual Studio

ASP.NET and Web Tools   12.4.51016.0
Microsoft Web Developer Tools contains the following components:
Support for creating and opening ASP.NET web projects
Browser Link: A communication channel between Visual Studio and browsers
Editor extensions for HTML, CSS, and JavaScript
Page Inspector: Inspection tool for ASP.NET web projects
Scaffolding: A framework for building and running code generators
Server Explorer extensions for Microsoft Azure Websites
Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Microsoft Azure

ASP.NET Web Frameworks and Tools 2012.2   4.1.21001.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.21010.0
For additional information, visit http://www.asp.net/

Common Azure Tools   1.3
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

JetBrains ReSharper Platform 6   Build 6.0.20141219.120158 on 2014-12-19 12:56:02Z
JetBrains ReSharper Platform package for Microsoft Visual Studio. For more information about ReSharper Platform, visit http://www.jetbrains.com/resharper. Copyright © 2015 JetBrains, Inc.

Microsoft Azure Mobile Services Tools   1.3
Microsoft Azure Mobile Services Tools

NuGet Package Manager   2.8.50926.663
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PowerShell Tools   1.3
Provides file classification services using PowerShell

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   12.0.41012.0
Microsoft SQL Server Data Tools

Windows Phone 8.1 SDK Integration   1.0
This package integrates the tools for the Windows Phone 8.1 SDK into the menus and controls of Visual Studio.

Xamarin (39a70ae)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Visual Studio plugin to enable development for Xamarin.Android.

Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS Unified Migration   1.0
Automated migration for Xamarin iOS Classic projects to Unified

thanks for your help!
Comment 1 Parmendra Kumar 2015-02-16 13:30:51 UTC
I have checked this issue but I am not able to reproduce this issue. To reproduce this issue I have followed steps mentioned in the bug description.

Screencast for the same: http://www.screencast.com/t/DuEYLBejj3M3

Could you Please provide us a sample project, Application Output Log, Device Log,Mtbs Log? So that we can reproduce this issue at our end.
You can get Log via

Mtbs Log: Xamarin.iOS Build Host->View Build Host Log
AppOutput Log: View->Output

Environment info:


Microsoft Visual Studio Professional 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.5.51641

Installed Version: Professional

Comment 2 werb 2015-02-17 05:47:08 UTC
Created attachment 9870 [details]
Log Files

Log file, with Forms 1.3.1 and 1.3.4-pre4
Comment 3 werb 2015-02-17 05:58:51 UTC
Created attachment 9871 [details]
Project crashing

cleaned so it is small
Comment 4 werb 2015-02-17 06:01:58 UTC

thank you for already looking into it. I attached the logs for two different Forms versions (once for 1.3.1 and once for 1.3.4-pre4). Both versions behave the same.

I just found, that the app doesn't crash in sumulator 4s, but on physical iPhone 6. I have no other physical devices to test on.

Comment 5 werb 2015-02-24 11:51:14 UTC

any News? I did't hear anything. Is there something I have to do?

Thank you!
Comment 6 Parmendra Kumar 2015-02-24 12:11:29 UTC
Hi @werb Thanks for providing Logs file,

I have again tried to reproduce this issue but unable to reproduce it, Could you please provide a sample project? So that we reproduce this issue at our end.

Comment 7 werb 2015-02-24 12:27:28 UTC

thank you for your answer. I attached the project one week ago. Can't you see it? "project crashing" is the name of the attachment.

be aware, that it crashes only on my physical device (Iphone 6) not in the simulator (4s).

Thank you
Comment 8 Parmendra Kumar 2015-02-25 05:43:32 UTC
Hi @werb 

I have checked this issue with iPhone 6 and I am not getting and crash the application successfully deploy on device. I have checked with Xamarin.Forms,

As of above I am leaving this issue as NEW, we may have to see if a developer can figure out what's going on from the stack trace.

Comment 9 Seth Rosetter 2015-05-18 17:14:16 UTC
I have tried to reproduce with the provided sample (references on an iPhone 6 device. Additionally, I updated the project to reference the latest stable ( In both cases, I have been unable to reproduce the issue. Is this still an issue for you?
Comment 10 Samantha Houts [MSFT] 2016-04-08 19:30:41 UTC
Thank you for your bug report. As we have not received the information requested, we cannot properly triage your bug and are marking it resolved.

Warm regards,
Xamarin Forms Team