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

Raytracing example crash in autorelease #319

Closed
xorza opened this issue May 14, 2024 · 0 comments · Fixed by #320
Closed

Raytracing example crash in autorelease #319

xorza opened this issue May 14, 2024 · 0 comments · Fixed by #320

Comments

@xorza
Copy link

xorza commented May 14, 2024

I was playing with Raytracing demo and updated winit dependency to 0.30, which requires different approach of persisting some objects. Migrating demo revealed some problem hidden in Renderer::new() method. Basically to reproduce it without making too many changes and updating winit, just change:

    let mut renderer = renderer::Renderer::new(device);
    renderer.window_resized(cg_size);

to

    let mut renderer = autoreleasepool(|| {
        let mut renderer = renderer::Renderer::new(device);
        renderer.window_resized(cg_size);
        renderer
    });
image

Any advice, I'm not familiar with obj-c intricacies?

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