Skip to content

fix: Keep currentCameras balanced when componentsAtPoint is not fully iterated - #3971

Open
hadiidbouk wants to merge 1 commit into
flame-engine:mainfrom
hadiidbouk:fix/camera-blank-render
Open

fix: Keep currentCameras balanced when componentsAtPoint is not fully iterated#3971
hadiidbouk wants to merge 1 commit into
flame-engine:mainfrom
hadiidbouk:fix/camera-blank-render

Conversation

@hadiidbouk

@hadiidbouk hadiidbouk commented Jul 29, 2026

Copy link
Copy Markdown

Description

Fixes the permanent blank-screen bug in #3972. componentsAtLocation leaks the camera onto the static currentCameras list when the caller stops iterating early, and after 4 leaks nothing renders anymore. Full details are in the issue.

The fix pushes and pops the camera around each step, inside a try/finally, so stopping early can no longer leak. Adds a regression test.

Checklist

  • I have followed the Contributor Guide when preparing my PR.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • [-] I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • [-] I have updated/added relevant examples in examples or docs.

Breaking Change?

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

Related Issues

Closes #3972

@hadiidbouk hadiidbouk changed the title fix: keep currentCameras balanced when componentsAtPoint is not fully iterated fix: Keep currentCameras balanced when componentsAtPoint is not fully iterated Jul 30, 2026
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 this pull request may close these issues.

Camera stops rendering for good when componentsAtPoint is not fully iterated

1 participant