Bug 14588 - NullReferenceException when casting a nullpointer to an interface (since
Summary: NullReferenceException when casting a nullpointer to an interface (since 6.4....
Status: RESOLVED DUPLICATE of bug 14552
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 6.4.4
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2013-09-10 05:07 UTC by Jeffrey Voorhaar
Modified: 2013-09-10 08:03 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 Jeffrey Voorhaar 2013-09-10 05:07:34 UTC
After updating to Xamarin.iOS yesterday, a NullReferenceException is thrown when casting a nullpointer to an interface (both generic and non-generic).

The simplest reproducible case we could find:

object o = null;
IList list = (IList)o;

This also crashes:

object o = null;
IList<int> list = (IList<int>)o;

The following works:

object o = null;
List<int> list = (List<int>)o;

Our serialization heavily relies on these kinds of statements. Please fix asap...

Comment 1 Sebastien Pouliot 2013-09-10 08:03:02 UTC
This is a duplicate of #14552* and the fix will be available shortly in 6.4.5

* to confirm you can try a release build on the simulator (it will works) and on device (it works for both debug and release)

*** This bug has been marked as a duplicate of bug 14552 ***