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

Taking a Mixed Reality Capture crashes the app #830

Closed
rgerd opened this issue Jul 13, 2021 · 0 comments · Fixed by #831
Closed

Taking a Mixed Reality Capture crashes the app #830

rgerd opened this issue Jul 13, 2021 · 0 comments · Fixed by #831
Assignees

Comments

@rgerd
Copy link
Member

rgerd commented Jul 13, 2021

It seems that even opening the MRC preview in the device portal for HoloLens 2 will crash the app.

It was due to some incorrect logic in the secondary view configuration setup that wasn't initializing swapchains because the recommended view dimensions were the same, disregarding the fact that the swapchains hadn't been initialized.

This comment was to remind us that we still needed to initialize the secondary view config swapchains when they're needed:

// Create the swapchains for the primary view configuration type. Secondary view configuration type swapchains will be populated once activated.
PopulateSwapchains(primaryRenderResource.ViewState);

But when we get to this bit, we don't see any resizing because the secondary view configurations were already initialized with the correct recommended dimensions, we just don't check if the swapchains have been initialized yet:

if (IsRecommendedSwapchainSizeChanged(viewState.ViewConfigViews, viewConfigViews))
{
viewState.ViewConfigViews = std::move(viewConfigViews);
sessionImpl.PopulateSwapchains(viewState);
}

@rgerd rgerd self-assigned this Jul 13, 2021
@rgerd rgerd transferred this issue from BabylonJS/BabylonReactNative Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant