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

Do not crash on IsCurrent checks #14089

Merged
merged 2 commits into from
Jan 3, 2024
Merged

Do not crash on IsCurrent checks #14089

merged 2 commits into from
Jan 3, 2024

Conversation

maxkatz6
Copy link
Member

@maxkatz6 maxkatz6 commented Jan 3, 2024

What does the pull request do?

EglContext.IsCurrent currently throws an exception, if context was already lost. This behavior doesn't seem to be replicated in other IGlContext implementations, and causes issues, when surface is being disposed after context was disposed.

After this change, context.EnsureCurrent will still crash with PlatformGraphicsContextLostException, but rendering backend can handle that exception properly.

Fixed issues

Fixes #13919
Fixes #14077

@maxkatz6 maxkatz6 added bug os-windows backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch labels Jan 3, 2024
@maxkatz6 maxkatz6 requested a review from kekekeks January 3, 2024 04:42
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.1.999-cibuild0043276-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.1.999-cibuild0043288-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@kekekeks kekekeks added this pull request to the merge queue Jan 3, 2024
Merged via the queue into master with commit 72887ce Jan 3, 2024
7 checks passed
@kekekeks kekekeks deleted the do-not-crash-on-IsCurrent branch January 3, 2024 13:26
@maxkatz6 maxkatz6 added backported-11.0.x and removed backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch labels Jan 17, 2024
maxkatz6 added a commit that referenced this pull request Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants