rafx icon indicating copy to clipboard operation
rafx copied to clipboard

Panic when running demo. "coundn't find directory"

Open windwhiterain opened this issue 10 months ago • 1 comments

traceback:

thread 'main' panicked at C:\Users\17124.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\hydrate-loader-0.0.2\src\disk_io.rs:372:49: called Result::unwrap() on an Err value: Os { code: 3, kind: NotFound, message: "系统找不到指定的路径。" } stack backtrace: 0: std::panicking::begin_panic_handler at /rustc/6067b36314ab5eb2eb47cecc464545ba58e1ad24/library\std\src\panicking.rs:695 1: core::panicking::panic_fmt at /rustc/6067b36314ab5eb2eb47cecc464545ba58e1ad24/library\core\src\panicking.rs:75 2: core::result::unwrap_failed at /rustc/6067b36314ab5eb2eb47cecc464545ba58e1ad24/library\core\src\result.rs:1704 3: enum2$<core::result::Resultstd::fs::ReadDir,std::io::error::Error >::unwrap at C:\Users\17124.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\result.rs:1109 4: hydrate_loader::disk_io::find_latest_toc at C:\Users\17124.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\hydrate-loader-0.0.2\src\disk_io.rs:372 5: hydrate_loader::disk_io::DiskArtifactIO::new at C:\Users\17124.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\hydrate-loader-0.0.2\src\disk_io.rs:427 6: hydrate_loader::ArtifactManager::new at C:\Users\17124.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\hydrate-loader-0.0.2\src\lib.rs:47 7: rafx_renderer::renderer_builder::RendererBuilder::build at C:\resource\rafx\rafx-renderer\src\renderer_builder.rs:75 8: demo::init::rendering_init at .\src\init.rs:175 9: demo::DemoApp::init at .\src\lib.rs:161 10: demo::update_loop at .\src\lib.rs:597 11: demo::main_native::main_native at .\src\main_native.rs:13 12: demo::main at .\src\main.rs:51 13: core::ops::function::FnOnce::call_once<void (*)(),tuple$<> > at C:\Users\17124.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\ops\function.rs:250 14: core::hint::black_box at C:\Users\17124.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\hint.rs:475
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace. error: process didn't exit successfully: C:\resource\rafx\target\debug\demo.exe (exit code: 101)

When I first encounter this, I think the demo requires the directory under "rafx/demo-editor" which doesn't exist. Then i run demo-editor, some directors were generated, but the required "rafx/demo-editor/data/build-data/tog" is still missing. I don't know what to do. Thanks if there is clearer way to run this demo!

windwhiterain avatar Feb 27 '25 16:02 windwhiterain

After launching the demo-editor, click "Build" in the bottom-right corner, close the editor, and then run the main demo again.

Clicking "Build" is mentioned in the Hydrate readme. I believe it should also be mentioned in the Rafx readme.

graivoron avatar Mar 13 '25 11:03 graivoron

Thanks for responding to this one @graivoron , this is correct. I'll update the readme to mention this when I can. (Been too busy with "real" work to do open source stuff!)

Leaving the editor open is fine though, in fact if you build while the game is running, it should hot-reload everything.

aclysma avatar Mar 17 '25 00:03 aclysma