Bug 30143 - FitPulseTheme - NSInvalidArgumentException [__NSDictionaryM __setObject:forKey:]: object cannot be nil
Summary: FitPulseTheme - NSInvalidArgumentException [__NSDictionaryM __setObject:forKe...
Status: RESOLVED FIXED
Alias: None
Product: Components
Classification: Xamarin
Component: Xamarin Components ()
Version: Production (addons.xamarin.com)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: David Humphreys
URL:
Depends on:
Blocks:
 
Reported: 2015-05-15 15:10 UTC by Jon Douglas [MSFT]
Modified: 2015-05-15 15:44 UTC (History)
1 user (show)

Tags:
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:
Status:
RESOLVED FIXED

Description Jon Douglas [MSFT] 2015-05-15 15:10:14 UTC
*Description:

The FitPulseTheme component found in the Xamarin Component Store currently does not play nicely with Xamarin.iOS 8.10. When using the FitpuleTheme.Apply() method, it throws the following exception:

Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInvalidArgumentException Reason: *** -[__NSDictionaryM __setObject:forKey:]: object cannot be nil

Component Source: http://components.xamarin.com/view/fitpulsetheme

*Reproduction

1) Install the Component

2) Call the following method:

public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
    ...
    FitpulseTheme.Apply ();
}

*Version Information

=== Xamarin Studio ===

Version 5.9.1 (build 3)
Installation UUID: 9091fd92-0b4a-4688-960c-73bfd6f1a240
Runtime:
	Mono 4.0.0 ((detached/d136b79)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400000143

=== Apple Developer Tools ===

Xcode 6.3.1 (7703)
Build 6D1002

=== Xamarin.iOS ===

Version: 8.10.0.267 (Business Edition)
Hash: 6481535
Branch: master
Build date: 2015-04-27 04:38:13-0400

=== Xamarin.Android ===

Version: 5.1.0.115 (Business Edition)
Android SDK: /Users/jonathandouglas/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: 2.0.0.262 (Business Edition)

=== Build Information ===

Release ID: 509010003
Git revision: aad75a6e7e48f18120ce41f47d0ff2c6216f49c3
Build date: 2015-05-08 12:46:18-04
Xamarin addins: 1246b3044cbb7f56a217334f8fc5489ef8eefe3f

=== Operating System ===

Mac OS X 10.10.3
Darwin Jonathans-Mac-mini.local 14.3.0 Darwin Kernel Version 14.3.0
    Mon Mar 23 11:59:05 PDT 2015
    root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64
Comment 1 David Humphreys 2015-05-15 15:44:27 UTC
This is caused by a bug in the Xamarin.iOS where UIFont.FontWithName no longer returns an null object if the font isn't found.  https://bugzilla.xamarin.com/show_bug.cgi?id=29516

I have now updated it to correctly handle this situation so that the component will work as expected