bevy/crates/bevy_asset/src
Brian Reavis 7273ffcd78
Fix crash when an asset load failure event is processed after asset drop (#14123)
# Objective

This PR fixes a crash that happens when an asset failure event is
processed after the asset has already been dropped.

```
2024-07-03T17:12:16.847178Z ERROR bevy_asset::server: Encountered HTTP status 404 when loading asset
thread 'main' panicked at bevy/crates/bevy_asset/src/server/info.rs:593:18:
```

## Solution

- Update `process_asset_fail` to match the graceful behavior in
`process_asset_load` (it does not assume the state still exists).

---

## Changelog

- Fixed a rare crash that happens when an asset failed event is
processed after the asset has been dropped.
2024-07-08 00:58:55 +00:00
..
io EmptyPathStream is only used in android/wasm32 (#14200) 2024-07-07 19:54:53 +00:00
processor Fix lints introduced in Rust beta 1.80 (#13899) 2024-06-17 17:22:01 +00:00
server Fix crash when an asset load failure event is processed after asset drop (#14123) 2024-07-08 00:58:55 +00:00
assets.rs Avoid a panic when loading labelled assets (#13506) 2024-06-05 23:04:52 +00:00
direct_access_ext.rs Add methods to directly load assets from World (#12023) 2024-02-27 00:28:26 +00:00
event.rs Added AssetLoadFailedEvent, UntypedAssetLoadFailedEvent (#11369) 2024-01-17 21:12:00 +00:00
folder.rs Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
handle.rs Add a test asserting that reflected cloning a Handle increments strong count (#13961) 2024-06-24 20:54:54 +00:00
id.rs Allow phase items not associated with meshes to be binned. (#14029) 2024-06-27 16:13:03 +00:00
lib.rs Optimize common usages of AssetReader (#14082) 2024-07-01 19:59:42 +00:00
loader_builders.rs Optimize common usages of AssetReader (#14082) 2024-07-01 19:59:42 +00:00
loader.rs Optimize common usages of AssetReader (#14082) 2024-07-01 19:59:42 +00:00
meta.rs Optimize common usages of AssetReader (#14082) 2024-07-01 19:59:42 +00:00
path.rs Apply Clippy lints regarding lazy evaluation and closures (#14015) 2024-07-01 15:54:40 +00:00
reflect.rs Apply Clippy lints regarding lazy evaluation and closures (#14015) 2024-07-01 15:54:40 +00:00
saver.rs Use async-fn in traits rather than BoxedFuture (#12550) 2024-03-18 17:56:57 +00:00
transformer.rs Use async-fn in traits rather than BoxedFuture (#12550) 2024-03-18 17:56:57 +00:00