Skip to content

[BUG] ShowPopupAsync can hang with only the overlay visible when clicking over a SkiaSharp SKGLView #2911

@cjorgens79

Description

@cjorgens79

Is there an existing issue for this?

  • I have searched the existing issues

Did you read the "Reporting a bug" section on Contributing file?

Current Behavior

If the user is clicking in a window that contains a SkiaSharp SKGLView with a render loop while the ShowPopupAsync popup is coming up, its can intermittently hang the application. The overlay is visible, but the content is not and the app is non-responsive.

Expected Behavior

Calling ShowPopupAsync should show the specified popup and not hang the application even when a Skia Sharp SKGLView with a render loop exists on the page

Steps To Reproduce

Run this sample application provided on a Windows machine and press the [click me] button on the first page and then keep clicking repeatedly until the popup either displays (its on a short 500ms delay linked to on appearing), or a white overlay appears (without the popup content) and hangs the app. The app attempts to display 4 popups, each 500ms apart. Its usually quite simple to reproduce by just continuously clicking in the same place the [Click me] button was on the first page. If it fails to reproduce, close the second window and try again.

Link to public reproduction project repository

https://github.com/cjorgens79/MauiMCTPopupIssue/tree/master

Environment

- .NET MAUI CommunityToolkit: 12.2.0
- OS: Windows 11
- .NET MAUI: 9.0.120
- SkiaSharp: 3.119.1

Anything else?

This issue appears to be related to having an SKGLView on the page with RenderLoop=true, perhaps as something is drawing in the background while clicking and the popup trying to display over the top it causes the issue?
Also of note is that setting "CanBeDismissedByTappingOutsideOfPopup = false" also stops it crashing, presumably because its no longer trying to act on those clicks that are occurring while the popup is opening.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions