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

[BUG] SkiaSharp crashes in WebAssembly if building with non-Release/Debug build config #2847

Closed
1 task done
RPGillespie6 opened this issue Apr 26, 2024 · 1 comment
Closed
1 task done
Labels

Comments

@RPGillespie6
Copy link

Description

Not actually sure if this is specifically a dotnet issue or a Skia issue, but since everything was working until adding Skia, I'm opening an issue in both places.

Essentially the problem is that you cannot use custom build configurations if using SkiaSharp + WASM or it will mysteriously crash at runtime on SKPaint dispose (after a using block). But it usually doesn't crash right away, it takes around 79 dispose calls in the repro code before the crash:

image

Code

Repro repo: https://github.com/RPGillespie6/dotnet_skia_wasm_crash

Build with Release build configuration and observe that the code runs to completion. Build with Release_WASM build configuration and observe that the code crashes on SKPaint dispose after 79 iterations. Confirmed this repo reproduces the problem on 2 different PCs (one with Intel i9, one with AMD Ryzen 7).

We use custom build configurations to set different #if flags, so it's kind of annoying to work around.

Expected Behavior

I expected SkiaSharp not to crash at runtime if using a build config other than Debug or Release in conjunction with webassembly build

Actual Behavior

SkiaSharp crashes at runtime when using a build config other than Debug or Release in conjunction with webassembly build

Version of SkiaSharp

2.88.3 (Current)

Last Known Good Version of SkiaSharp

2.88.2 (Previous)

IDE / Editor

Visual Studio (Windows)

Platform / Operating System

Other (Please indicate in the description)

Platform / Operating System Version

Windows 11 + Chrome or Firefox

Devices

Desktop PC

Relevant Screenshots

No response

Relevant Log Output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant