bevy/crates
Manuel Brea Carreras 56bdd5c3c1 Fix #19219 by moving observer triggers out of resource_scope (#19221)
# Objective

Fixes #19219 

## Solution

Instead of calling `world.commands().trigger` and
`world.commands().trigger_targets` whenever each scene is spawned, save
the `instance_id` and optional parent entity to perform all such calls
at the end. This prevents the potential flush of the world command queue
that can happen if `add_child` is called from causing the crash.

## Testing

- Did you test these changes? If so, how?
- Verified that I can no longer reproduce the bug with the instructions
at #19219.
  - Ran `bevy_scene` tests
- Visually verified that the following examples still run as expected
`many_foxes`, `scene` . (should I test any more?)
- Are there any parts that need more testing?
- Pending to run `cargo test` at the root to test that all examples
still build; I will update the PR when that's done
- How can other people (reviewers) test your changes? Is there anything
specific they need to know?
  - Run bevy as usual
- If relevant, what platforms did you test these changes on, and are
there any important ones you can't test?
  - N/a (tested on Linux/wayland but it shouldn't be relevant)

---
2025-05-30 23:53:51 +02:00
..
bevy_a11y Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_animation Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_app Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_asset Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_audio Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_color Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_core_pipeline Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_derive Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_dev_tools Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_diagnostic Diagnostic reset sum ema (#19337) 2025-05-30 22:59:10 +02:00
bevy_dylib Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_ecs Fix EntityCloner replacing required components. (#19326) 2025-05-30 23:53:51 +02:00
bevy_encase_derive Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_gilrs Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_gizmos Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_gltf Make sure that serde_json::Map::into_values exists (#19229) 2025-05-30 22:59:10 +02:00
bevy_image Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_input Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_input_focus Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_internal Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_log Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_macro_utils Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_math Fix rotate_by implementation for Aabb2d (#19015) 2025-05-30 22:59:09 +02:00
bevy_mesh Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_mikktspace Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_pbr Fix spot light shadow glitches (#19273) 2025-05-30 22:59:10 +02:00
bevy_picking Removed conversion from pointer physical coordinates to viewport local coordinates in bevy_picking make_ray function (#18870) 2025-05-30 22:59:09 +02:00
bevy_platform Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_ptr Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_reflect Make sure that serde_json::Map::into_values exists (#19229) 2025-05-30 22:59:10 +02:00
bevy_remote Make sure that serde_json::Map::into_values exists (#19229) 2025-05-30 22:59:10 +02:00
bevy_render doc(render): fix incorrectly transposed view matrix docs (#19317) 2025-05-30 23:53:51 +02:00
bevy_scene Fix #19219 by moving observer triggers out of resource_scope (#19221) 2025-05-30 23:53:51 +02:00
bevy_sprite Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_state Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_tasks Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_text Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_time Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_transform Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_ui Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_utils Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_window Release 0.16.0 2025-04-21 23:14:00 +02:00
bevy_winit Add WakeUp event to App (#19212) 2025-05-30 22:59:10 +02:00