Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using EventTriggerBehavior for Pointer[Entered|Exited] triggers a crash in Microsoft.UI.Xaml.dll in UWP Release #184

Open
Sergio0694 opened this issue Apr 8, 2020 · 1 comment

Comments

@Sergio0694
Copy link
Member

Describe the bug
Opening this issue here to mirror the one in WinUI, here: microsoft/microsoft-ui-xaml#2256.

When running my app in Release mode, I get the following exception when hovering with the mouse over a template that uses some behaviors to trigger some animations. This is the exception:

Unhandled exception at 0x00007FFF1D7B2EC0 (Windows.UI.Xaml.dll) in WinUICrashRepro.exe: 0xC000027B: An internal exception occurrend in the application (parameters: 0x00000239CD4ADBE0, 0x0000000000000003).

I tried both with the 2.0.1 build and the 1.0.1 of the Microsoft.Xaml.Behaviors.Uwp.Managed package, same exact issue, in case this bit of information is of any help.

Also, as suggested by @ranjeshj, I've tried adding this to my .csproj file:

<EnableTypeInfoReflection>false</EnableTypeInfoReflection>

In order to repro the crash in Debug mode as well (in case this was similar to microsoft/microsoft-ui-xaml#1949), but that didn't work. Even with this directive, Debug builds still work perfectly fine for me.

Steps to reproduce the bug

  1. Download this repro: WinUICrashRepro_2.zip
  2. Open the solution
  3. Run the app in Debug mode, and hover with the mouse on the template being displayed
  4. Notice how the app behaves normally and the animations all work fine
  5. Run the app in Release mode
  6. Notice how the app crashes as soon as you hover on the template

Expected behavior

The app should work in Release mode just like it does in Debug mode

Screenshots

UiBcn5RMdf

Version Info

NuGet package version:

  • Microsoft.NETCore.UniversalWindowsPlatform version 6.2.10
  • Microsoft.UI.Xaml version 2.3.200213001.
  • Microsoft.Xaml.Behaviors.Uwp.Managed version 2.0.1
Windows 10 version Saw the problem?
Insider Build (xxxxx)
November 2019 Update (18363) Yes
May 2019 Update (18362)
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop Yes
Mobile
Xbox
Surface Hub
IoT

Additional context

Looks like this issue might be related to the APIs in Microsoft.Xaml.Interactivity.
In particular, the storyboard animations are triggered with these behaviors:

<interactivity:Interaction.Behaviors>
    <core:EventTriggerBehavior EventName="PointerEntered">
        <core:CallMethodAction TargetObject="{x:Bind StoryboardZoomIn}" MethodName="Begin"/>
    </core:EventTriggerBehavior>
    <core:EventTriggerBehavior EventName="PointerExited">
        <core:CallMethodAction TargetObject="{x:Bind StoryboardZoomOut}" MethodName="Begin"/>
    </core:EventTriggerBehavior>
</interactivity:Interaction.Behaviors>

Removing these lines removes the animations, but it also seems to prevent the issue from happening. Hopefully this might help a bit in investigating this issue.

Thank you for your time! 😄

@premiaware
Copy link

I have similar issue with EventTriggerBehavior
this is my stack in AppCenter crash log,

image

have you found any solutions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants