Bug 24584 - IMarkupExtension throws NullReferenceException if ProvideValue returns a null value
Summary: IMarkupExtension throws NullReferenceException if ProvideValue returns a null...
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.2.3
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-11-17 12:30 UTC by Vyacheslav Volkov
Modified: 2015-05-28 17:56 UTC (History)
4 users (show)

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


Attachments
Testcase (3.76 MB, application/x-zip-compressed)
2014-11-17 12:31 UTC, Vyacheslav Volkov
Details


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 Vyacheslav Volkov 2014-11-17 12:30:27 UTC
IMarkupExtension throws NullReferenceException if ProvideValue returns a null value

StackTrace:

System.NullReferenceException: Object reference not set to an instance of an object
at Xamarin.Forms.ReflectionExtensions.IsInstanceOfType (System.Type self, System.Object o) [0x00000] in <filename unknown>:0 
at Xamarin.Forms.Xaml.BaseValueNode.SetPropertyValue (System.Object xamlelement, XmlName propertyName, System.Object value, Xamarin.Forms.BindableObject rootElement) [0x00000] in <filename unknown>:0 
at Xamarin.Forms.Xaml.MarkupNode.ApplyTo (System.Object source, XmlName propertyName, Boolean dontUseLazy) [0x00000] in <filename unknown>:0 
at Xamarin.Forms.Xaml.INodeExtension.ApplyProperties (IElementNode node, System.Object source, Boolean dontUseLazy) [0x00000] in <filename unknown>:0
Comment 1 Vyacheslav Volkov 2014-11-17 12:31:28 UTC
Created attachment 8771 [details]
Testcase
Comment 2 Udham Singh 2014-11-18 05:20:06 UTC
I have checked this issue and got the same exception mentioned in bug description. To reproduce this issue I have run the sample app attached in comment 1 and got the issue. 

Screencast : 

On Windows : http://www.screencast.com/t/DT9UsRlQmhKB
On Mac : http://www.screencast.com/t/vtCyI6uX

Application Output :

On Windows :  https://gist.github.com/Udham1/ebacd665f2f9f1159238
On Mac : https://gist.github.com/Udham1/a2c7a8889298bdb3960d

Environment Info :

On Windows :

Xamarin.Forms : 1.2.3.6257

Windows 8
VS 2013
Xamarin 3.7.248.0

On Mac :

Xamarin.Forms : 1.2.3.6257

OS X 10.9.4
XS 5.5.3 (build 6)
Xamarin.Android 4.18.1.3
Comment 3 Eric Maupin 2015-05-28 17:56:06 UTC
This appears to be fixed in the current version.