Skip to content
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

See which asset is being loaded during progress tracking #108

Open
janhohenheim opened this issue Feb 21, 2023 · 4 comments
Open

See which asset is being loaded during progress tracking #108

janhohenheim opened this issue Feb 21, 2023 · 4 comments

Comments

@janhohenheim
Copy link

janhohenheim commented Feb 21, 2023

This concerns the progress_tracking feature.
I've got an issue where sometimes a single asset never finishes loading.
It's hard for me to debug this without knowing which assets already finished loading. I thought about simply querying an Option<Res<MyAsset>> for every asset and putting the .is_some() output into a struct during loading, but that feels like excessive boilerplate. Is there a better way to either know which assets are finished loading or which asset is being loaded right now?

@janhohenheim janhohenheim changed the title See which asset is being loaded during progress See which asset is being loaded during progress tracking Feb 21, 2023
@NiklasEi
Copy link
Owner

NiklasEi commented Mar 1, 2023

I don't think that there is a better way at the moment. The logging could definitely be improved here.

If an asset fails to load I would always expect the asset server or loader to report that.

@janhohenheim
Copy link
Author

janhohenheim commented Mar 1, 2023

I did it the manual way now (https://github.com/janhohenheim/foxtrot/blob/main/src/file_system_interaction/asset_loading.rs#L98) and have identified that a GLTF sometimes just loads forever, so there is no error being reported since it didn't actually fail.
It's hard to debug since it apparently happens nondeterministically and I don't think I can get any information out of the loading state for debugging :/ I have no idea if the bug happens in your plugin or the asset server.

@NiklasEi
Copy link
Owner

NiklasEi commented Mar 2, 2023

I would be surprised if that problem has anything to do with bevy_asset_loader. The actual loading of the GLTF file and it's dependencies is handled by the asset loaders/server.
Have you tested the same GLTF model in a simple Bevy app without any dependencies?

@janhohenheim
Copy link
Author

I see, that makes sense.
I didn't isolate the issue yet because it happens quite rarely and so it's quite hard to say for sure whether or not my minimal app captures it. I guess I'd have to create an App in a loop and check with a timer whether the GLTF was loaded after a while? Not sure. But yeah, there's a potential bug report for Bevy lurking in here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants