FyroxEngine/Fyrox · error
Scene resource loading error
Error message
Scene resource loading error: {:?} What it means
SceneLoader::finish awaits all resources the scene depends on (models, textures, etc.) and logs this error for each one that failed to load. It aggregates underlying load errors (I/O, parse, format) so a scene resource can still be produced even when some dependencies failed.
Solutions
- Read the inner `err` in the logged message to find which dependency failed and why.
- Restore the missing/renamed asset at the path recorded in the scene file, or re-save the scene after re-linking assets.
- Check filesystem case sensitivity and permissions on the deployment machine for the asset directory.
Example fix
// before: scene references "textures/Brick.png" but file was renamed // after: restore the original path or fix the reference # mv brick.png textures/Brick.png
Defensive patterns
Strategy: validation
Validate before calling
// Before loading a scene, verify every referenced asset path exists:
fn validate_scene_assets(scene_json: &str, root: &std::path::Path) -> Vec<String> {
let missing: Vec<String> = extract_resource_paths(scene_json)
.into_iter()
.filter(|p| !root.join(p).exists())
.collect();
missing
} Try / catch
// Parse each failed dependency's error from the log message and handle:
let scene = loader.finish().await; // errors are logged per-resource
for missing in missing_assets { restore_or_relink(&missing)?; } Prevention
- Keep assets under version control together with scenes.
- Use stable relative paths and avoid renaming assets after scenes reference them.
- Deploy with case-preserving/case-correct paths; test on case-sensitive filesystems.
When it happens
Trigger: Loading a scene resource (SceneLoader::finish) where any used resource's load future resolved with Err — e.g. a referenced model or texture file missing or unreadable at its recorded path.
Common situations: Moved or renamed asset folders breaking relative paths inside saved scenes; assets deleted after the scene was authored; case-sensitivity mismatches when deploying from Windows to Linux.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- Instantiating a model from a resource that is not loaded
- Attempt to get reference to resource data while it is…
- Attempt to get reference to resource data while it is…
- Attempt to get reference to resource data which failed to…
- Unable to measure text due to unloaded fonts.
AI-assisted analysis of FyroxEngine/Fyrox@76c91aad8e (2026-09-10).
Data as JSON: /api/errors/38e09960d8328226.
Report an issue: GitHub.
Appendix: source
Thrown at fyrox-impl/src/scene/mod.rs:439
.collect::<Vec<_>>();
for excluded_resource in exclusion_list {
assert!(used_resources.remove(&excluded_resource));
}
}
let used_resources_count = used_resources.len();
Log::info(format!(
"SceneLoader::finish() - {used_resources_count} resources collected. Waiting them to load..."
));
// Wait everything.
let results = join_all(used_resources).await;
for result in results {
if let Err(err) = result {
Log::err(format!("Scene resource loading error: {:?}", err));
}
}
Log::info(format!(
"SceneLoader::finish() - All {used_resources_count} resources have finished loading."
));
// We have to wait until skybox textures are all loaded, because we need to read their data
// to re-create cube map.
let mut skybox_textures = Vec::new();
if let Some(skybox) = scene.skybox_ref() {
skybox_textures.extend(skybox.textures().iter().filter_map(|t| t.clone()));
}
join_all(skybox_textures).await;
// And do resolve to extract correct graphical data and so on.
scene.resolve();
View on GitHub (pinned to 76c91aad8e)