Animating Canvas.Left works, but throws unhandled exceptions

Please report bugs here. If you are unsure whether something is a bug or an expected behavior, please post it on the "Technical Support" forum instead, and wait for a moderator to handle/move the post.
TaterJuice
Posts: 145
Joined: Thu Mar 16, 2017 5:40 am
Contact:

Animating Canvas.Left works, but throws unhandled exceptions

Postby TaterJuice » Mon Jul 22, 2019 8:02 am

I've attempted to create a simple Transitioning Content Control by animating Opacity and Canvas.Left properties in a storyboard.

It actually works very nicely! (Yay!)
But! It causes JS errors in the output, and null reference exceptions in the simulator (boo!)
If I take out the Canvas.Left animation and just animate the opacity, there is no error. It's only an issue when animating the Canvas.Left/Canvas.Top attached properties, as far as I know.

Sample Video (show's the animation working!):
https://www.dropbox.com/s/iymhbszowvlh998/CSHTML5_CANVAS_ANIMATION_BUG.mp4?dl=0

Sample Project:
https://www.dropbox.com/s/9ovbrli3yjvr9ct/CSHTML5_CANVAS_ANIMATION_BUG.zip?dl=0

The error in the JS output is:
CSharpXamlForHtml5.js?20197220845:109562 Uncaught TypeError: Cannot read property 'get_DeclaringType' of null
at Windows_UI_Xaml_Media_Animation_DoubleAnimation.DoubleAnimation_Stop$00 [as Stop$208,34,32=void] (CSharpXamlForHtml5.js?20197220845:109562)
at Windows_UI_Xaml_Media_Animation_DoubleAnimation_Stop [as Stop] (Windows.UI.Xaml.Media.Animation.DoubleAnimation.Stop:12)
at Windows_UI_Xaml_Media_Animation_DoubleAnimation.Timeline_Stop$03 [as Stop$208,32=void] (CSharpXamlForHtml5.js?20197220845:107579)
at JSIL.MethodSignature.MethodSignature_CallVirtual$0$2$inlineCache2 [as CallVirtual] (MethodSignature.CallVirtual$0$2$inlineCache2:11)
at Windows_UI_Xaml_Media_Animation_DoubleAnimation.Timeline_OnIterationCompleted (CSharpXamlForHtml5.js?20197220845:107518)
at Windows_UI_Xaml_Media_Animation_DoubleAnimation.Timeline__animationTimer_Tick (CSharpXamlForHtml5.js?20197220845:107281)
at Windows_UI_Xaml_DispatcherTimer.Delegate_Invoke [as Tick] (JSIL.Core.js?20197220845:9346)
at Windows_UI_Xaml_DispatcherTimer.DispatcherTimer_OnTick (CSharpXamlForHtml5.js?20197220845:126698)
at Delegate_Invoke (JSIL.Core.js?20197220845:9346)


The error in the simulator is:
The following unhandled exception was raised by the application:

System.NullReferenceException: Object reference not set to an instance of an object.
at Windows.UI.Xaml.Media.Animation.DoubleAnimation.Stop(FrameworkElement frameworkElement, String groupName, Boolean revertToFormerValue)
at Windows.UI.Xaml.Media.Animation.Timeline.Stop(FrameworkElement frameworkElement, Boolean revertToFormerValue)
at Windows.UI.Xaml.Media.Animation.Timeline.OnIterationCompleted(IterationParameters parameters)
at Windows.UI.Xaml.Media.Animation.DoubleAnimation.<>c__DisplayClass1.<OnAnimationCompleted>b__0()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at DotNetForHtml5.EmulatorWithoutJavascript.SimulatorProxy.ThrowExceptionWithoutLosingStackTrace(Exception exception)
at CallSite.Target(Closure , CallSite , Object , Exception )
at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite site, T0 arg0, T1 arg1)
at CSHTML5.Internal.OnCallBack.<>c__DisplayClass6.<OnCallbackFromJavaScript>b__5()
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

JS-Support @Userware
Site Admin
Posts: 1093
Joined: Tue Apr 08, 2014 3:42 pm

Re: Animating Canvas.Left works, but throws unhandled exceptions

Postby JS-Support @Userware » Tue Jul 23, 2019 4:20 am

Thanks for reporting this issue. We are going to look into it asap and I'll keep you updated.


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 1 guest

 

 

cron