Mac, Fuse 0.11.0.6078, affected on all previews (local, iOS, Android).
I’m probably doing something wrong, but I came up with an interesting use-case that started throwing Uno.NullReferenceException: Object reference was null
at me.
You need to take following steps to reproduce the issue:
- Click on the “Show box” Button at the bottom: the red box with white panels then slides in from the top.
- Click on one of the white Panels in the red box: the red box with the white panels then slides back to the top.
- Click anywhere on the grey area: boom goes the exception.
Important note one: if you click on the “Show box” button instead of one of the white panels (step 2), the click in grey area (step 3) DOES NOT trigger an exception.
Important note two: if you remove the enclosing ScrollView from the red panel, and then follow the original 3 steps, the click in grey area also DOES NOT trigger an exception.
To keep it short, I made a small test project, here is the UX:
<App Theme="Basic" Background="#333333ff">
<ClientPanel>
<WhileTrue ux:Name="ShowingTheBox" Value="false">
<Set MultiBox.LayoutElement="ShowBox" />
</WhileTrue>
<WhileTrue ux:Name="HidingTheBox" Value="true">
<Set MultiBox.LayoutElement="HideBox" />
</WhileTrue>
<MultiLayoutPanel ux:Name="MultiBox" LayoutElement="HideBox">
<DockLayout />
<Panel Dock="Top" ux:Name="HideBox" Anchor="50%,150%">
<Placeholder Target="Box">
</Placeholder>
</Panel>
<Panel Dock="Top" ux:Name="ShowBox" Margin="0,100,0,0">
<Placeholder>
<Panel ux:Name="Box" Height="300" Background="#f00">
<LayoutAnimation>
<Move Y="1" RelativeTo="LayoutChange" Duration="1" Easing="CircularOut" />
</LayoutAnimation>
<ScrollView>
<StackPanel>
<Each Count="5">
<Panel Height="50" Margin="5" Background="#fff">
<Clicked>
<Toggle Target="ShowingTheBox" />
<Toggle Target="HidingTheBox" />
</Clicked>
</Panel>
</Each>
</StackPanel>
</ScrollView>
</Panel>
</Placeholder>
</Panel>
</MultiLayoutPanel>
<Panel Alignment="Bottom">
<Button Text="Show Box">
<Clicked>
<Toggle Target="ShowingTheBox" />
<Toggle Target="HidingTheBox" />
</Clicked>
</Button>
</Panel>
</ClientPanel>
</App>
Fuse monitor shows the following after that deadly click:
LOG:
Preview detected an unhandled exception: Uno.NullReferenceException: Object reference was null
at Fuse.Node.GetHitWindowPoint(float2)
at Fuse.Gestures.Clicker.OnPointerReleased(object,Fuse.Input.PointerReleasedArgs)
at Fuse.Input.PointerReleased.Invoke(Fuse.Input.PointerReleasedHandler,object,Fuse.Input.PointerReleasedArgs)
at Fuse.NodeEvent`2.OnRaiseEnabled(object,object[])
at Fuse.Properties.ForeachInList(Fuse.PropertyHandle,Uno.Action<object, object[]>,object[])
at Fuse.NodeEvent`2.Raise(TArgs,Fuse.NodeEventMode,bool,[Uno.Action<TArgs, Uno.Collections.IList<Fuse.Node>>])
at Fuse.NodeEvent`2.RaiseWithBubble(TArgs,[Fuse.NodeEventMode])
at Fuse.Input.Pointer.DefaultPointerEventResponder.OnPointerReleased(Fuse.Input.PointerReleasedArgs)
at Outracks.Simulator.Application.OnPointerReleased(Fuse.Input.PointerReleasedArgs)
at Fuse.Input.Pointer.RaiseReleased(Fuse.Node,Fuse.Input.PointerEventData)
at Fuse.Android.InputDispatch.RaiseReleased(Fuse.Node,Fuse.Input.PointerEventData)
at Fuse.Android.InputDispatch.RaiseEvent(Fuse.Node,Android.android.view.View,Android.android.view.MotionEvent)
at Fuse.Android.RootViewContainer.onTouchEvent(Android.android.view.MotionEvent)
ERROR: Object reference was null
Uno.NullReferenceException occured.
at Fuse.Node.GetHitWindowPoint(float2)
at Fuse.Gestures.Clicker.OnPointerReleased(object,Fuse.Input.PointerReleasedArgs)
at Fuse.Input.PointerReleased.Invoke(Fuse.Input.PointerReleasedHandler,object,Fuse.Input.PointerReleasedArgs)
at Fuse.NodeEvent`2.OnRaiseEnabled(object,object[])
at Fuse.Properties.ForeachInList(Fuse.PropertyHandle,Uno.Action<object, object[]>,object[])
at Fuse.NodeEvent`2.Raise(TArgs,Fuse.NodeEventMode,bool,[Uno.Action<TArgs, Uno.Collections.IList<Fuse.Node>>])
at Fuse.NodeEvent`2.RaiseWithBubble(TArgs,[Fuse.NodeEventMode])
at Fuse.Input.Pointer.DefaultPointerEventResponder.OnPointerReleased(Fuse.Input.PointerReleasedArgs)
at Outracks.Simulator.Application.OnPointerReleased(Fuse.Input.PointerReleasedArgs)
at Fuse.Input.Pointer.RaiseReleased(Fuse.Node,Fuse.Input.PointerEventData)
at Fuse.Android.InputDispatch.RaiseReleased(Fuse.Node,Fuse.Input.PointerEventData)
at Fuse.Android.InputDispatch.RaiseEvent(Fuse.Node,Android.android.view.View,Android.android.view.MotionEvent)
at Fuse.Android.RootViewContainer.onTouchEvent(Android.android.view.MotionEvent)