Hi @dinhchitrung
I builded your sample, it is failed. and tried to create new project to demo.
But It also raised error "Object reference not set to an instance of an object"
Could you can show me how can fix it?
Thanks
This is Stack trace:
at SVG.Forms.Plugin.iOS.SvgImageRenderer.OnElementChanged (Xamarin.Forms.Platform.iOS.ElementChangedEventArgs1[TElement] e) [0x00028] in :0
at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].SetElement (TElement element) [0x00110] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:167 at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:116
at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Platform.cs:192
at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x00009] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:63
at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:36
at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].SetElement (TElement element) [0x000cc] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:155 at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:116
at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Platform.cs:192
at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x00009] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:63
at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:36
at Xamarin.Forms.Platform.iOS.ScrollViewRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x0008e] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\ScrollViewRenderer.cs:71
at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Platform.cs:192
at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x00009] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:63
at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:36
at Xamarin.Forms.Platform.iOS.PageRenderer.ViewDidLoad () [0x00086] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\PageRenderer.cs:105
at (wrapper managed-to-native) ObjCRuntime.Messaging:IntPtr_objc_msgSendSuper (intptr,intptr)
at UIKit.UIViewController.get_View () [0x00030] in /Users/builder/data/lanes/4691/3e5ac5ff/source/xamarin-macios/src/build/ios/native/UIKit/UIViewController.g.cs:2718
at Xamarin.Forms.Platform.iOS.PageRenderer.get_NativeView () [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\PageRenderer.cs:40
at Xamarin.Forms.Platform.iOS.PageRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x0004f] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\PageRenderer.cs:55
at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Platform.cs:192
at Xamarin.Forms.Platform.iOS.Platform.AddChild (Xamarin.Forms.VisualElement view) [0x00027] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Platform.cs:326
at Xamarin.Forms.Platform.iOS.Platform.WillAppear () [0x0003c] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Platform.cs:312
at Xamarin.Forms.Platform.iOS.PlatformRenderer.ViewWillAppear (System.Boolean animated) [0x00010] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\PlatformRenderer.cs:148
at (wrapper managed-to-native) ObjCRuntime.Messaging:void_objc_msgSend (intptr,intptr)
at UIKit.UIWindow.MakeKeyAndVisible () [0x00010] in /Users/builder/data/lanes/4691/3e5ac5ff/source/xamarin-macios/src/build/ios/native/UIKit/UIWindow.g.cs:251
at Xamarin.Forms.Platform.iOS.FormsApplicationDelegate.SetMainPage () [0x00006] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\FormsApplicationDelegate.cs:159
at Xamarin.Forms.Platform.iOS.FormsApplicationDelegate.FinishedLaunching (UIKit.UIApplication uiApplication, Foundation.NSDictionary launchOptions) [0x00028] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\FormsApplicationDelegate.cs:45
at DemoSVG.iOS.AppDelegate.FinishedLaunching (UIKit.UIApplication app, Foundation.NSDictionary options) [0x00034] in /Users/ORO-MAC028/Projects/DemoSVG/iOS/AppDelegate.cs:25
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/3e5ac5ff/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/3e5ac5ff/source/xamarin-macios/src/UIKit/UIApplication.cs:63
at DemoSVG.iOS.Application.Main (System.String[] args) [0x00001] in /Users/ORO-MAC028/Projects/DemoSVG/iOS/Main.cs:17 `
Hi @dinhchitrung I builded your sample, it is failed. and tried to create new project to demo. But It also raised error "Object reference not set to an instance of an object"
Could you can show me how can fix it? Thanks This is Stack trace::0
at Xamarin.Forms.Platform.iOS.VisualElementRenderer
at SVG.Forms.Plugin.iOS.SvgImageRenderer.OnElementChanged (Xamarin.Forms.Platform.iOS.ElementChangedEventArgs
1[TElement] e) [0x00028] in1[TElement].SetElement (TElement element) [0x00110] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:167 at Xamarin.Forms.Platform.iOS.VisualElementRenderer
1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:116 at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Platform.cs:192 at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x00009] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:63 at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:36 at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].SetElement (TElement element) [0x000cc] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:155 at Xamarin.Forms.Platform.iOS.VisualElementRenderer
1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:116 at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Platform.cs:192 at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x00009] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:63 at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:36 at Xamarin.Forms.Platform.iOS.ScrollViewRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x0008e] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\ScrollViewRenderer.cs:71 at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Platform.cs:192 at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x00009] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:63 at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:36 at Xamarin.Forms.Platform.iOS.PageRenderer.ViewDidLoad () [0x00086] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\PageRenderer.cs:105 at (wrapper managed-to-native) ObjCRuntime.Messaging:IntPtr_objc_msgSendSuper (intptr,intptr) at UIKit.UIViewController.get_View () [0x00030] in /Users/builder/data/lanes/4691/3e5ac5ff/source/xamarin-macios/src/build/ios/native/UIKit/UIViewController.g.cs:2718 at Xamarin.Forms.Platform.iOS.PageRenderer.get_NativeView () [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\PageRenderer.cs:40 at Xamarin.Forms.Platform.iOS.PageRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x0004f] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\PageRenderer.cs:55 at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Platform.cs:192 at Xamarin.Forms.Platform.iOS.Platform.AddChild (Xamarin.Forms.VisualElement view) [0x00027] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Platform.cs:326 at Xamarin.Forms.Platform.iOS.Platform.WillAppear () [0x0003c] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Platform.cs:312 at Xamarin.Forms.Platform.iOS.PlatformRenderer.ViewWillAppear (System.Boolean animated) [0x00010] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\PlatformRenderer.cs:148 at (wrapper managed-to-native) ObjCRuntime.Messaging:void_objc_msgSend (intptr,intptr) at UIKit.UIWindow.MakeKeyAndVisible () [0x00010] in /Users/builder/data/lanes/4691/3e5ac5ff/source/xamarin-macios/src/build/ios/native/UIKit/UIWindow.g.cs:251 at Xamarin.Forms.Platform.iOS.FormsApplicationDelegate.SetMainPage () [0x00006] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\FormsApplicationDelegate.cs:159 at Xamarin.Forms.Platform.iOS.FormsApplicationDelegate.FinishedLaunching (UIKit.UIApplication uiApplication, Foundation.NSDictionary launchOptions) [0x00028] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\FormsApplicationDelegate.cs:45 at DemoSVG.iOS.AppDelegate.FinishedLaunching (UIKit.UIApplication app, Foundation.NSDictionary options) [0x00034] in /Users/ORO-MAC028/Projects/DemoSVG/iOS/AppDelegate.cs:25 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/3e5ac5ff/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/3e5ac5ff/source/xamarin-macios/src/UIKit/UIApplication.cs:63 at DemoSVG.iOS.Application.Main (System.String[] args) [0x00001] in /Users/ORO-MAC028/Projects/DemoSVG/iOS/Main.cs:17 `