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

Intermittent crash when calling mouseEventsWebView.MouseEvent with WebViewMouseEventData.EventType.MouseWheel #3739

Closed
RubenGarcia opened this issue Aug 25, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@RubenGarcia
Copy link

Description

When calling the code to scroll webpages (see below), I am getting an intermittent crash of either the WebView or unity.
This is also seen by other people, e.g. see
#3705

    private void Wheel(int x, int y)
    {
        var w = webViewComponent.GetWebView();
        IWithMouseEvents mouseEventsWebView = w as IWithMouseEvents;
        WebViewMouseEventData mouseEvent = new WebViewMouseEventData
        {
            WheelX = x,
            WheelY = y,
            WheelHint = WebViewMouseEventData.WheelBehaviorHint.RelativeAndButtonDown,
            Type = WebViewMouseEventData.EventType.MouseWheel,
            TertiaryAxisDeviceType = WebViewMouseEventData.TertiaryAxisDevice.PointingDevice
        };
        mouseEventsWebView.MouseEvent(mouseEvent);
    }

Version
SDK: Webview2 0.17.1.pre3 and Webview2 0.17.1.pre5
Runtime: 115.0.1901.203
Framework: Unknown
OS: Hololens Windows version 22621.1125.arm64fre.ni_release_svc_sydney_rel_prod.230802-0616

Regression
Was this working before but has regressed? no

Repro Steps
Create a Webview2, and call Wheel(0,-1) and Wheel (0,1) a few times (map it to a button or a keypress)

Expected: The webpage scrolls up and down, as appropriate
Actual: The webpage may scroll, the webpage may disappear, or Unity may crash.

@RubenGarcia RubenGarcia added the bug Something isn't working label Aug 25, 2023
@novac42
Copy link
Contributor

novac42 commented Aug 25, 2023

Thanks for reporting the issue and sorry you are running into it. I've assigned this to a dev who can help follow up on this.

@champnic
Copy link
Member

@RubenGarcia Is this different from #3705? I'm going to close this one and I've updated the title of #3705 and changed it to a bug. But let me know if you think this should be separate. Thanks!

@RubenGarcia
Copy link
Author

RubenGarcia commented Aug 26, 2023

It is the same bug.
The old title of #3705 did not make it clear this was a bug, so I wanted to bring the issue to your attention for priorization.
You can close this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants