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

Crashes when loading a decent size folder of GLTF #228

Open
ethereumdegen opened this issue Jul 9, 2024 · 2 comments
Open

Crashes when loading a decent size folder of GLTF #228

ethereumdegen opened this issue Jul 9, 2024 · 2 comments

Comments

@ethereumdegen
Copy link

So I am loading my GLTF files like this :

#[derive(AssetCollection, Resource)]
pub struct GltfAssets {
   
     #[asset(path = "models/doodads", collection(typed, mapped))]
    pub(crate) doodad_models: HashMap<String, Handle<Gltf>>,


}

And that folder (models/doodads) has a total of about 1000 gltf models in it. While my app runs this, it crashes:

 .add_loading_state(
                    LoadingState::new(AssetLoadState::GltfAssetsLoad)
                        .continue_to_state(AssetLoadState::ShaderAssetsLoad)
                        
                         .load_collection::<GltfAssets>() 
                         
                )

I assume because this crate is trying to add too much to the stack or to memory at once instead of piecing it out,

@NiklasEi
Copy link
Owner

If it's some form of out-of-memory, loading them piece by piece will not help, since you want to keep them all in memory, no?
Could you please investigate more about what the actual issue is?

If it crashes while adding the loading state, I don't think it has to do with the asset loading, since that will happen later async.

@NiklasEi
Copy link
Owner

@ethereumdegen do you have any additional information 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