Access Violation exception with TiltEffect (attached property/anim)
Edit: reproduces 100% with test project below on Android phone
I have a sample that works in WPF, but not in Noesis. It's the Windows Phone Tilt Effect ported to WPF. Project attached
e.g. something like: http://www.sharpgis.net/post/2012/03/02 ... Metro-XAML
1. Unzip TiltEffectCrash.zip: https://1drv.ms/u/s!AspGCVZdWgTBuvM9qBP2uS1Tqzc7sg
2. Run on Android phone
3. Tap one button -> get "target not found" exception but no crash
4. Try to tap different button
Expected:
button tilts back and forward
Actual:
button tilts halfway then crash:
Noesis.dll caused an Access Violation (0xc0000005)
in module Noesis.dll at 0033:c1c89502.
Opened bug: https://bugs.noesisengine.com/view.php?id=1075
I have a sample that works in WPF, but not in Noesis. It's the Windows Phone Tilt Effect ported to WPF. Project attached
e.g. something like: http://www.sharpgis.net/post/2012/03/02 ... Metro-XAML
1. Unzip TiltEffectCrash.zip: https://1drv.ms/u/s!AspGCVZdWgTBuvM9qBP2uS1Tqzc7sg
2. Run on Android phone
3. Tap one button -> get "target not found" exception but no crash
4. Try to tap different button
Expected:
button tilts back and forward
Actual:
button tilts halfway then crash:
Noesis.dll caused an Access Violation (0xc0000005)
in module Noesis.dll at 0033:c1c89502.
Opened bug: https://bugs.noesisengine.com/view.php?id=1075
Re: Access Violation exception with TiltEffect (attached property/anim)
updated repro steps above
-
sfernandez
Site Admin
- Posts: 2991
- Joined:
Re: Access Violation exception with TiltEffect (attached property/anim)
Hi,
I found the source of the crash. We have a bug when Projection or RenderTransform properties are set to null, we will fix it for the next release.
You can workaround it by setting the identity:
Apart from that there is something wrong with the storyboard created in code, notifying the "Target not found" message, that I need to investigate more. I'll let you know.
I found the source of the crash. We have a bug when Projection or RenderTransform properties are set to null, we will fix it for the next release.
You can workaround it by setting the identity:
Code: Select all
private static void RevertPrepareControlForTilt(FrameworkElement element)
{
element.ManipulationDelta -= TiltEffect_ManipulationDelta;
element.ManipulationCompleted -= TiltEffect_ManipulationCompleted;
element.Projection = Projection.Identity;
element.RenderTransform = Transform.Identity;
}
Re: Access Violation exception with TiltEffect (attached property/anim)
Thanks, the crash workaround works!
Re: NoesisException: Target not found
It's baffling, when I comment out the StopStoryboard() in ResetTiltReturnStoryboard(), I don't get it. However, the effect doesn't work:
This is the call stack for the exception here:
NoesisException: Target not found
Noesis.Error.Check ()
Noesis.View.Noesis_View_TouchDown_ (HandleRef view, Int32 x, Int32 y, UInt32 touchId)
Noesis.View.TouchDown (Int32 x, Int32 y, UInt32 touchId)
NoesisView.TouchDown (Int32 x, Int32 y, UInt32 touchId)
ImagePointerEvents.ProcessPendingInputEventsIfAny (Int32 maxProcessingTimeMs) <-- this is out function that just calls <NoesisView>.TouchDown(x, y, ...) with current mouse positions. The issue will repro without it as well.
ImagePointerEvents.Update ()
Thanks for the help! Any ideas on what might cause the above issue are greatly appreciated!
Re: NoesisException: Target not found
It's baffling, when I comment out the StopStoryboard() in ResetTiltReturnStoryboard(), I don't get it. However, the effect doesn't work:
Code: Select all
private static void ResetTiltReturnStoryboard()
{
// tiltReturnStoryboard.StopStoryboard(); <------------------------ comment here
wasPauseAnimation = false;
}
NoesisException: Target not found
Noesis.Error.Check ()
Noesis.View.Noesis_View_TouchDown_ (HandleRef view, Int32 x, Int32 y, UInt32 touchId)
Noesis.View.TouchDown (Int32 x, Int32 y, UInt32 touchId)
NoesisView.TouchDown (Int32 x, Int32 y, UInt32 touchId)
ImagePointerEvents.ProcessPendingInputEventsIfAny (Int32 maxProcessingTimeMs) <-- this is out function that just calls <NoesisView>.TouchDown(x, y, ...) with current mouse positions. The issue will repro without it as well.
ImagePointerEvents.Update ()
Thanks for the help! Any ideas on what might cause the above issue are greatly appreciated!
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], Semrush [Bot] and 31 guests