{"record":{"id":"38e09960d8328226","repo":"FyroxEngine/Fyrox","slug":"scene-resource-loading-error","errorCode":null,"errorMessage":"Scene resource loading error: {:?}","messagePattern":"Scene resource loading error: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"fyrox-impl/src/scene/mod.rs","lineNumber":439,"sourceCode":"                .collect::<Vec<_>>();\n\n            for excluded_resource in exclusion_list {\n                assert!(used_resources.remove(&excluded_resource));\n            }\n        }\n\n        let used_resources_count = used_resources.len();\n\n        Log::info(format!(\n            \"SceneLoader::finish() - {used_resources_count} resources collected. Waiting them to load...\"\n        ));\n\n        // Wait everything.\n        let results = join_all(used_resources).await;\n\n        for result in results {\n            if let Err(err) = result {\n                Log::err(format!(\"Scene resource loading error: {:?}\", err));\n            }\n        }\n\n        Log::info(format!(\n            \"SceneLoader::finish() - All {used_resources_count} resources have finished loading.\"\n        ));\n\n        // We have to wait until skybox textures are all loaded, because we need to read their data\n        // to re-create cube map.\n        let mut skybox_textures = Vec::new();\n        if let Some(skybox) = scene.skybox_ref() {\n            skybox_textures.extend(skybox.textures().iter().filter_map(|t| t.clone()));\n        }\n        join_all(skybox_textures).await;\n\n        // And do resolve to extract correct graphical data and so on.\n        scene.resolve();\n","sourceCodeStart":421,"sourceCodeEnd":457,"githubUrl":"https://github.com/FyroxEngine/Fyrox/blob/76c91aad8eca488ce527b1af707be8b3b24ad72d/fyrox-impl/src/scene/mod.rs#L421-L457","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before: scene references \"textures/Brick.png\" but file was renamed\n// after: restore the original path or fix the reference\n# mv brick.png textures/Brick.png","handlingStrategy":"validation","validationCode":"// Before loading a scene, verify every referenced asset path exists:\nfn validate_scene_assets(scene_json: &str, root: &std::path::Path) -> Vec<String> {\n    let missing: Vec<String> = extract_resource_paths(scene_json)\n        .into_iter()\n        .filter(|p| !root.join(p).exists())\n        .collect();\n    missing\n}","typeGuard":null,"tryCatchPattern":"// Parse each failed dependency's error from the log message and handle:\nlet scene = loader.finish().await; // errors are logged per-resource\nfor missing in missing_assets { restore_or_relink(&missing)?; }","preventionTips":["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."],"tags":["resource-loading","scene","async","missing-assets"],"backgroundTag":"file-not-found","analyzedSha":"76c91aad8eca488ce527b1af707be8b3b24ad72d","analyzedAt":"2026-09-10T16:04:01.633Z","contentChangedAt":"2026-09-10T16:04:01.633Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}