You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While going over the asset server with @TekhnaeRaav, he helped me realize that the asset server was responding to changed assets, triggering a forced asset reload, but then handing the asset change without waiting for the actual asset to be re-loaded.
Maybe we need to wait on handle_change on pending_asset_changes until AssetLoadProgressis finished? Would need to persist pending_asset_changes somewhere.
Could wait until all pending are loaded and then flush handling changes, or figure out how to use a callback on each asset completing? I'm not too familiar with this code - but hopefully this might resolve issues with hot reloading sometimes crashing. Good find!
I feel like we might need another channel to listen to, maybe, that gets handles pushed to it when they finish loading. So one channel for asset source changes, which come from filesystem watchers or similar things, and another channel for asset load changes, that gets pushed to when an asset data has been loaded.
Beyond this, @TekhnaeRaav had a good point, while looking through the renderer, that we could use the asset load changes exclusively to trigger this bones_bevy_renderer image load step, instead of what we are doing now where we either have to check every frame, or we have to do all the bevy image loading up-front.
I don't want to do any major changes to the asset loader if we don't need to, because I think we probably want to integrate Iroh blobs pretty deeply into the asset server, which will be a big change that will hopefully replace our usage of dashmaps and some other things that might have been causing some problems.
So I'm not sure if it's worth trying to fix immediately, but if it's a small change, it'd probably be worth doing now.
While going over the asset server with @TekhnaeRaav, he helped me realize that the asset server was responding to changed assets, triggering a forced asset reload, but then handing the asset change without waiting for the actual asset to be re-loaded.
bones/framework_crates/bones_asset/src/server.rs
Lines 228 to 231 in 8240aea
My brain is only partially consuming this right now, but that definitely seems wrong.
The text was updated successfully, but these errors were encountered: