-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Asset has LoadState::Loaded
but Assets::get
return None
#2224
Comments
There's also a chance that Edit: nvm it appears that the |
The #2226 PR makes changes: Application goes into an endless loop when assets with dependencies already have a Below are top-level assets, for them we explicitly call the INFO bevy_fluent::systems::serve: bundle_handle: AssetPathId(AssetPathId(SourcePathId(10958097973059340271), LabelId(6298619649789039366))) Loaded
INFO bevy_fluent::systems::serve: bundle_handle: AssetPathId(AssetPathId(SourcePathId(4953421844741585986), LabelId(6298619649789039366))) Loaded
INFO bevy_fluent::systems::serve: bundle_handle: AssetPathId(AssetPathId(SourcePathId(11723345319984754560), LabelId(6298619649789039366))) Loaded
INFO bevy_fluent::systems::serve: bundle_handle: AssetPathId(AssetPathId(SourcePathId(7183645651604282493), LabelId(6298619649789039366))) Loaded Below are dependent assets:
INFO bevy_fluent::systems::serve: resource_handle: AssetPathId(AssetPathId(SourcePathId(17015584791912148938), LabelId(6298619649789039366))) Loaded
INFO bevy_fluent::systems::serve: resource_handle: AssetPathId(AssetPathId(SourcePathId(2475016618522967226), LabelId(6298619649789039366))) Loaded
INFO bevy_fluent::systems::serve: resource_handle: AssetPathId(AssetPathId(SourcePathId(17610828258912988862), LabelId(6298619649789039366))) NotLoaded
INFO bevy_fluent::systems::serve: resource_handle: AssetPathId(AssetPathId(SourcePathId(17872065453730569751), LabelId(6298619649789039366))) NotLoaded Some top-level assets have a |
Thank you for trying this out! I was worried that something like this may happen. |
Is your macro only doing one click, or are you doing several to go through all languages? |
Several to go through all languages. The same effect is achieved simply by frequently clicking on one of the buttons (but harder). |
I could not reproduce with this change in
This is probably a bug in Bevy asset around asset cleanup, but I'm not completely sure to follow how handles are used in |
So you could fix it just by keeping the handles around? I have the same issue when running https://github.com/NiklasEi/bevy_asset_loader_playground with the feature asset_inconsistencies_cut.mp4 |
I couldn't reproduce running |
Yeah, chances are quite small. I think I have roughly 1 in 20 runs where the asset correctly loads and renders. |
Yes, it fixes the error for me too. The reason is as follows:
WARN bevy_fluent::systems::serve: bundle_handle: AssetPathId(AssetPathId(SourcePathId(10958097973059340271), LabelId(6298619649789039366))) Loading
WARN bevy_fluent::systems::serve: bundle_handle: AssetPathId(AssetPathId(SourcePathId(4953421844741585986), LabelId(6298619649789039366))) Loading
WARN bevy_fluent::systems::serve: bundle_handle: AssetPathId(AssetPathId(SourcePathId(11723345319984754560), LabelId(6298619649789039366))) Loaded
WARN bevy_fluent::systems::serve: bundle_handle: AssetPathId(AssetPathId(SourcePathId(7183645651604282493), LabelId(6298619649789039366))) Loaded We have just started loading 4 necessary assets for the new |
This issue has been fixed by #2226. |
Bevy version
0.5.0
.Operating system & version
Windows 10.
What you did
debug
branch):Run the ui example (
cargo run --example=ui
).If you manually click on the language change buttons, then everything is ok.
But if you use a mouse macro (or something else) for a very fast click, then the example ends with an error.
Log output:
You can see that the last two assets will have the status
Loaded
butget
method returnNone
.What you expected to happen
For each asset that has
LoadState::Loaded
status,Assets.get
always returnSome
.What actually happened
You can see that some assets will have the status
Loaded
butget
method returnNone
.The text was updated successfully, but these errors were encountered: