Replies: 2 comments 1 reply
-
|
Filed a bug here: #9476 9476 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
@A-Nnoyed can you comment on the bug on what the platform (windows, linux) and GPU are? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've been getting a 100% repro crash with an up-to-date sync of filament. When using the window resize handles in any of the samples, filament crashes.
I tracked this down to VulkanSwapChain::acquire(bool). During the first acquire after the has_resized() function returns true, the vkswapchain gets recreated and updated, and then mPlatform->acquire is called. That calls vkAcquireNextImageKHR which returns VK_ERROR_OUT_OF_DATE_KHR, and on my system at least, that Vulkan call doesn't write anything to &outImageSyncData->imageIndex. So mCurrentSwapIndex remains at INVALID_IMAGE_INDEX (= UINT_MAX) and mFinishedDrawing[mCurrentSwapIndex] = {}; crashes when attempting to access the array out of bounds.
I have what looks like a fix, at least on my system, so I'm passing it along in case it helps. On the line: if ((resized = mPlatform->hasResized(swapChain))), I just replaced the "if" with a "while". The thinking was that the OS was spamming window resize events so quickly that the new swapchain's surfaces were out of date before the swapchain could even be returned. Repeating the hasResized check until it returned false seems to have ensured the next image is valid when we get out of the loop and I no longer see crashes when resizing windows.
The samples now occasionally exhibit timing issues where the View's Viewport doesn't set up correctly for the final size of the window, but I figure I can work around that at the application level.
Beta Was this translation helpful? Give feedback.
All reactions