NullReferenceException inside a Frame
See original GitHub issueHi,
I tried to use this library, mainly to enable native animation for each platform. Everything seems to work as expected but i cant get it working with Frame
control and keep getting NullReferenceException
. Here is my code:
<!-- Content -->
<StackLayout
Grid.Row="1">
<Frame
Margin="20"
HasShadow="True"
IsClippedToBounds="True"
CornerRadius="5"
touch:TouchEff.NativeAnimation="True">
<Frame.Effects>
<touch:TouchEff/>
</Frame.Effects>
<StackLayout>
<Label
Text="Header"
FontSize="Medium"
Margin="0,0,0,10"/>
<Grid
Grid.Row="1">
</Grid>
</StackLayout>
</Frame>
</StackLayout>
And here is the stacktrace:
at TouchEffect.Android.PlatformTouchEff.OnAttached () [0x000a2] in <af36e72ba61f4748b6fedd0a51809462>:0
at Xamarin.Forms.Effect.SendAttached () [0x00009] in D:\a\1\s\Xamarin.Forms.Core\Effect.cs:54
at Xamarin.Forms.RoutingEffect.SendAttached () [0x00000] in D:\a\1\s\Xamarin.Forms.Core\RoutingEffect.cs:29
at Xamarin.Forms.Element.AttachEffect (Xamarin.Forms.Effect effect) [0x00045] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:538
at Xamarin.Forms.Element.set_EffectControlProvider (Xamarin.Forms.IEffectControlProvider value) [0x0007c] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:240
at Xamarin.Forms.Internals.EffectUtilities.RegisterEffectControlProvider (Xamarin.Forms.IEffectControlProvider self, Xamarin.Forms.IElementController oldElement, Xamarin.Forms.IElementController newElement) [0x0001a] in D:\a\1\s\Xamarin.Forms.Core\Internals\EffectUtilities.cs:16
at Xamarin.Forms.Platform.Android.FastRenderers.VisualElementRenderer.OnElementChanged (System.Object sender, Xamarin.Forms.Platform.Android.VisualElementChangedEventArgs e) [0x0005c] in D:\a\1\s\Xamarin.Forms.Platform.Android\FastRenderers\VisualElementRenderer.cs:102
at (wrapper delegate-invoke) System.EventHandler`1[Xamarin.Forms.Platform.Android.VisualElementChangedEventArgs].invoke_void_object_TEventArgs(object,Xamarin.Forms.Platform.Android.VisualElementChangedEventArgs)
at Xamarin.Forms.Platform.Android.FastRenderers.FrameRenderer.OnElementChanged (Xamarin.Forms.Platform.Android.ElementChangedEventArgs`1[TElement] e) [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\FastRenderers\FrameRenderer.cs:171
at Xamarin.Forms.Platform.Android.FastRenderers.FrameRenderer.set_Element (Xamarin.Forms.Frame value) [0x00018] in D:\a\1\s\Xamarin.Forms.Platform.Android\FastRenderers\FrameRenderer.cs:65
at Xamarin.Forms.Platform.Android.FastRenderers.FrameRenderer.Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00015] in D:\a\1\s\Xamarin.Forms.Platform.Android\FastRenderers\FrameRenderer.cs:86
at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Content.Context context) [0x0001f] in D:\a\1\s\Xamarin.Forms.Platform.Android\Platform.cs:350
at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren) [0x000af] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:137
at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00163] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:347
at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:109
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) [0x00007] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:449
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x000d5] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:243
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00033] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:133
at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Content.Context context) [0x0001f] in D:\a\1\s\Xamarin.Forms.Platform.Android\Platform.cs:350
at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren) [0x000af] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:137
at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00163] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:347
at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:109
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) [0x00007] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:449
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x000d5] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:243
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00033] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:133
at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Content.Context context) [0x0001f] in D:\a\1\s\Xamarin.Forms.Platform.Android\Platform.cs:350
at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren) [0x000af] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:137
at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00163] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:347
at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:109
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) [0x00007] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:449
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x000d5] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:243
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00033] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:133
at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Content.Context context) [0x0001f] in D:\a\1\s\Xamarin.Forms.Platform.Android\Platform.cs:350
at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren) [0x000af] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:137
at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00163] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:347
at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:109
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) [0x00007] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:449
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x000d5] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:243
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00033] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:133
at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Content.Context context) [0x0001f] in D:\a\1\s\Xamarin.Forms.Platform.Android\Platform.cs:350
at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren) [0x000af] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:137
at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00163] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:347
at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:109
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) [0x00007] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:449
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x000d5] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:243
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00033] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:133
at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Content.Context context) [0x0001f] in D:\a\1\s\Xamarin.Forms.Platform.Android\Platform.cs:350
at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren) [0x000af] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:137
at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00163] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:347
at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:109
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) [0x00007] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:449
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x000d5] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:243
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00033] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:133
at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Content.Context context) [0x0001f] in D:\a\1\s\Xamarin.Forms.Platform.Android\Platform.cs:350
at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren) [0x000af] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:137
at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00163] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:347
at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:109
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) [0x00007] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:449
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x000d5] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:243
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00033] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:133
at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Content.Context context) [0x0001f] in D:\a\1\s\Xamarin.Forms.Platform.Android\Platform.cs:350
at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren) [0x000af] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:137
at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00163] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:347
at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:109
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) [0x00007] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:449
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x000d5] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:243
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00033] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:133
at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Content.Context context) [0x0001f] in D:\a\1\s\Xamarin.Forms.Platform.Android\Platform.cs:350
at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren) [0x000af] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:137
at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00163] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:347
at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:109
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) [0x00007] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:449
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x000d5] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:243
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00033] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:133
at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Content.Context context) [0x0001f] in D:\a\1\s\Xamarin.Forms.Platform.Android\Platform.cs:350
at Xamarin.Forms.Platform.Android.AppCompat.Platform.AddChild (Xamarin.Forms.Page page, System.Boolean layout) [0x0000d] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:379
at Xamarin.Forms.Platform.Android.AppCompat.Platform.SetPageInternal (Xamarin.Forms.Page newRoot) [0x0005a] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:337
at Xamarin.Forms.Platform.Android.AppCompat.Platform.SetPage (Xamarin.Forms.Page newRoot) [0x000e6] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:291
at Xamarin.Forms.Platform.Android.FormsAppCompatActivity.InternalSetPage (Xamarin.Forms.Page page) [0x00039] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\FormsAppCompatActivity.cs:515
at Xamarin.Forms.Platform.Android.FormsAppCompatActivity.SetMainPage () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\FormsAppCompatActivity.cs:541
at Xamarin.Forms.Platform.Android.FormsAppCompatActivity.LoadApplication (Xamarin.Forms.Application application) [0x00140] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\FormsAppCompatActivity.cs:191
at home_server.Client.XPlat.Droid.MainActivity.OnCreate (Android.OS.Bundle savedInstanceState) [0x0004a] in C:\Users\Ivan Kara\Documents\projects\home-server\home-server.Client.XPlat\home-server.Client.XPlat.Android\MainActivity.cs:38
at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_savedInstanceState) [0x00011] in <d3b924763d4a465c85b26f6e8edc8a53>:0
at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.4(intptr,intptr,intptr)
Any help would be appreciated.
Nuget version: v4.1.30
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Switching to the default frame throws an ...
In one of my methods I would like to return to the default frame, but using driver.SwitchTo().DefaultContent(); throws a NullReferenceException ...
Read more >NullReferenceException while navigating to a UserControl ...
UI.Xaml.Controls.Frame with a parameter that is not a type that inherits from Page, a NullReferenceException is thrown. The exception message is ...
Read more >NullReferenceException Class (System)
This exception occurs if you assume that each element of the array must contain a non-null value, and the value of the array...
Read more >Cinemachine "null references exception" on every frame, ...
This error pops up whenever a frame is drawn only in editor mode. That means that whenever I enter play mode, the errors...
Read more >Null Reference Exceptions
Null Reference Exceptions. A NullReferenceException happens when you try to access a reference variable that isn't referencing any object.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Try latest version
@realivanjx reproduced. Checking it