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

Windows. Fix a crash when we resize to zero and then to non-zero #883

Merged
merged 1 commit into from
Mar 6, 2024

Conversation

igordmn
Copy link
Collaborator

@igordmn igordmn commented Mar 6, 2024

Fixes JetBrains/compose-multiplatform#4425

It is a regression after #858

The crash was because d3dDevice->swapChain->GetBuffer didn't return the buffer to draw on if we reused the buffer from the previous frame (we didn't change surface in case of zero size).

I am not completely sure why, but I exhausted my the investigation limit and this fix is needed by other reasons (we need to wait for vsync).

Testing

An additional check in the existed test (fails before the fix)

Fixes JetBrains/compose-multiplatform#4425

It is a regression after #858

The crash was because `d3dDevice->swapChain->GetBuffer` didn't return the buffer to draw on if we reused the buffer from the previous frame (we didn't change `surface` in case of zero size).

I am not completely sure why, but I exhausted my the investigation limit
and this fix is needed by other reasons (we need vsync on swap buffers).

## Testing
An additional check in the existed test (fails before the fix)
@igordmn igordmn requested a review from MatkovIvan March 6, 2024 03:01
@igordmn igordmn merged commit c3a9008 into master Mar 6, 2024
5 checks passed
@igordmn igordmn deleted the igor.demin/fix-zero-size-crash branch March 6, 2024 12:40
@igordmn igordmn added the composeChangelog1.6.1 Temporary label Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compose 1.6.0 crashes after quick resizing (Direct3d)
2 participants