Cameras with RenderTarget::Image freeze when their Image is mutably accessed
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## Bevy version
0.8.1 and main branch on commit ea4aeff9ec8e204b8d4bc8cbb10c28e90fe271ff
## \[Optional\] Relevant system information
```ignore
AdapterInfo { name: "NVIDIA GeForce RTX 3080 Ti", vendor: 4318, device: 8712, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "512.15", backend: Vulkan }
```
## What you did
I modified the example [post_processing.rs](https://github.com/bevyengine/bevy/blob/ea4aeff9ec8e204b8d4bc8cbb10c28e90fe271ff/examples/shader/post_processing.rs) by adding this system:
```rust
fn break_all_render_textures_system(mut images: ResMut>) {
for _ in images.iter_mut() {}
}
```
Accessing the images with `images.get_mut` will have the same effect.
## What went wrong
I was expecting to see a spinning cube with chromatic aberration. Instead, I see a *still* cube with chromatic aberration. Bevy is only rendering the first frame and then freezing.
Expected:

Actual:

## Additional information
On 0.8.1, when using this mutable access to resize the image, I needed to use a workaround from #5595 (which seems to be fixed on main right now).
It seems like a stale render texture is being used. If the Image is resized, the shown frozen image is still at the old size.
Contributor guide
Assessment
This issue has not been assessed yet.