Bug 1516 - Application crashes when using Appearance with UINavigationController on Device
Summary: Application crashes when using Appearance with UINavigationController on Device
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 5.0
Hardware: Macintosh Mac OS
: --- major
Target Milestone: Untriaged
Assignee: Sebastien Pouliot
Depends on:
Reported: 2011-10-16 11:18 UTC by Chris Hardy [MSFT]
Modified: 2011-10-18 13:43 UTC (History)
2 users (show)

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

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 Chris Hardy [MSFT] 2011-10-16 11:18:26 UTC
When using UINavigationController.Appearance.TintColor on device, this API gets linked away and crashes: https://gist.github.com/e747304010bd8bb292c0

Not using the Linker fixes this issue.
Comment 1 Sebastien Pouliot 2011-10-18 09:54:04 UTC
I get a TypeLoadException when using "Link SDK assemblies only" (on the first line).
Comment 2 Sebastien Pouliot 2011-10-18 10:36:55 UTC
Look like a genuine (i.e. no usage related) linker bug. The selector fields are only used in the inner type and are linked out (and should have been marked/kept). That results in invalid code (loading an unexisting field) which throws the TLE.
Comment 3 Sebastien Pouliot 2011-10-18 13:43:05 UTC
The RemoveSelectors step was not considering nested types, which Appearance use.
05574c0550bebc550d683d6235ebcb9f7e0a7e74 (master)