Skip to content

Error on unloaded ImageRenderTarget #20503

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ecoskey
Copy link
Contributor

@ecoskey ecoskey commented Aug 11, 2025

Objective

When using RenderTarget::Image with an image set to use in the render world only, the camera_system is unable to get its render target info and fails silently, breaking things down the line. From what I saw the view uniforms stopped updating, but there might be other things it broke as well.

Solution

At least make it fail loudly :)

Not sure if it should panic here, or return a better error enum that the caller can decide what to do with. Should all failures to update the render target info be hard errors?

Testing

Error gets printed when running the project I found the bug with

@ecoskey ecoskey added C-Bug An unexpected or incorrect behavior A-Rendering Drawing game state to the screen S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Aug 11, 2025
Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to return a Result rather than an Option here TBH. Programatically handling error cases is much nicer than just sprinkling in logging.

@alice-i-cecile alice-i-cecile added S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Aug 11, 2025
@ecoskey ecoskey added S-Needs-Review Needs reviewer attention (from anyone!) to move forward and removed S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels Aug 11, 2025
@ecoskey ecoskey added this to the 0.17 milestone Aug 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior S-Needs-Review Needs reviewer attention (from anyone!) to move forward
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants