Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
at XamSvg.XamForms.SvgImage.FireClicked () [0x0002c] in <4775e47341e64ee9964bf80fe3344bf2>:0
at XamSvg.XamForms.iOS.SvgImageRenderer.<.ctor>b__6_0 () [0x00006] in <6aa8dc0c37694c5c8c0eae7ff51e0149>:0
at UIKit.UIGestureRecognizer+ParameterlessDispatch.Activated () [0x00000] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/UIKit/UIGestureRecognizer.cs:71
at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/UIKit/UIApplication.cs:79
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/4691/d22
70eec/source/xamarin-macios/src/UIKit/UIApplication.cs:63
at AltigMobileNative.iOS.Application.Main (System.String[] args) [0x00001] in C:\P\AltigMobileNative\AMN_V31_HA\AltigMobileNative\AltigMobileNative.iOS\Main.cs:20
2017-07-27 12:51:33.661 AltigMobileNativeiOS[17345:240488] Unhandled managed exception:
Object reference not set to an instance of an object (System.NullReferenceException)
at XamSvg.XamForms.SvgImage.FireClicked () [0x0002c] in <4775e47341e64ee9964bf80fe3344bf2>:0
at XamSvg.XamForms.iOS.SvgImageRenderer.<.ctor>b__6_0 () [0x00006] in <6aa8dc0c37694c5c8c0eae7ff51e0149>:0
at UIKit.UIGestureRecognizer+ParameterlessDispatch.Activated () [0x00000] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/UIKit/UIGestureRecognizer.cs:71
at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/4
691/d2270eec/source/xamarin-macios/src/UIKit/UIApplication.cs:79
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/UIKit/UIApplication.cs:63
at AltigMobileNative.iOS.Application.Main (System.String[] args) [0x00001] in C:\P\AltigMobileNative\AMN_V31_HA\AltigMobileNative\AltigMobileNative.iOS\Main.cs:20
Environment
Vapolia.XamSvg.Forms 2.2.0
Xamarin.Forms 2.3.4.247
Steps to reproduce
Add following control on a view
<controls:SvgImage Svg="res:Assets.svg.play106" HeightRequest="100" ColorMapping="#4d4d4d=#5dd255"/>
Click on the icon and it will crash
Work Around
Bind an empty command with on ClickedCommand or set IsEnabled="False"
<controls:SvgImage Svg="res:Assets.svg.play106" HeightRequest="100" ColorMapping="#4d4d4d=#5dd255" ClickedCommand={Binding EmptyComment}/>public Command EmptyCommand { get { return new Command(async () => { }); } }
Crash Log
Environment
Steps to reproduce
<controls:SvgImage Svg="res:Assets.svg.play106" HeightRequest="100" ColorMapping="#4d4d4d=#5dd255"/>
Work Around
<controls:SvgImage Svg="res:Assets.svg.play106" HeightRequest="100" ColorMapping="#4d4d4d=#5dd255" ClickedCommand={Binding EmptyComment}/>
public Command EmptyCommand { get { return new Command(async () => { }); } }