Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] NullReferenceException Closing Window During Animation #7061

Closed
spencerbaer opened this issue Aug 3, 2019 · 1 comment
Closed

[Bug] NullReferenceException Closing Window During Animation #7061

spencerbaer opened this issue Aug 3, 2019 · 1 comment

Comments

@spencerbaer
Copy link

Description

On WPF, if the window is closed while an animation is running, then a NullReferenceException will be thrown.

Steps to Reproduce

  1. Start an animation using one of the ScaleTo, TranslateTo, etc. extensions.
  2. Close the window while the animation is active

Expected Behavior

The application exits without issue.

Actual Behavior

A NullReferenceException is thrown:

System.NullReferenceException
HResult=0x80004003
Message=Object reference not set to an instance of an object.
Source=Xamarin.Forms.Platform.WPF
StackTrace:
at Xamarin.Forms.Platform.WPF.WPFPlatformServices.BeginInvokeOnMainThread(Action action)
at Xamarin.Forms.Internals.Ticker.Remove(Int32 handle)
at Xamarin.Forms.Tweener.Finalize()

Basic Information

  • Version with issue: v4.1.0

  • IDE: VS 2019

  • Platform Target Frameworks:

    • WPF: .NET Framework 4.7.2

Reproduction Link

AnimationOnExitDemo.zip

Application has a long-running animation that activates when the window appears, so just close the window after it opens to reproduce the issue. UWP project is also included for comparison.

@spencerbaer spencerbaer added s/unverified New report that has yet to be verified t/bug 🐛 labels Aug 3, 2019
@pauldipietro pauldipietro added this to New in Triage Aug 3, 2019
@jfversluis jfversluis added a/animation 🎬 Animation stuff p/WPF and removed s/unverified New report that has yet to be verified labels Aug 5, 2019
@jfversluis
Copy link
Member

Tried the repro project and confirmed it happens. There is a UWP project in the repro which doesn't show this behavior.

@jfversluis jfversluis added this to the 4.2.0 milestone Aug 5, 2019
@samhouts samhouts added this to To do in v4.2.0 Aug 5, 2019
@jfversluis jfversluis moved this from New to External in Triage Aug 5, 2019
@jfversluis jfversluis moved this from External to Ready For Work in Triage Aug 5, 2019
@samhouts samhouts moved this from To do to In Progress in v4.2.0 Aug 5, 2019
@samhouts samhouts removed this from Ready For Work in Triage Aug 5, 2019
@samhouts samhouts moved this from In Progress to Done in v4.2.0 Aug 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
v4.2.0
  
Done
Development

No branches or pull requests

2 participants