Inspirateur / riverbed

A Minecraft-inspired Bevy game
MIT License
28 stars 1 forks source link

Crash with latest commit #8

Closed nerdachse closed 5 months ago

nerdachse commented 5 months ago

Hey there!

Trying to run the latest commit I get:

2024-04-12T10:34:27.882966Z  INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Linux rolling Arch Linux", kernel: "6.8.4-arch1-1", cpu: "AMD Ryzen 9 5950X 16-Core Processor", core_count: "16", memory: "62.7 GiB"thread 'Compute Task Pool (23)' panicked at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.3/src/util/device.rs:174:26:
range end index 544 out of range for slice of length 512
stack backtrace:
   0: rust_begin_unwind
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:647:5
   1: core::panicking::panic_fmt
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/panicking.rs:72:14
   2: core::slice::index::slice_end_index_len_fail_rt
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/slice/index.rs:76:5
   3: core::slice::index::slice_end_index_len_fail
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/slice/index.rs:68:9
   4: <core::ops::range::Range<usize> as core::slice::index::SliceIndex<[T]>>::index
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/slice/index.rs:394:13
   5: core::slice::index::<impl core::ops::index::Index<I> for [T]>::index
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/slice/index.rs:18:9
   6: <wgpu::Device as wgpu::util::device::DeviceExt>::create_texture_with_data
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.3/src/util/device.rs:174:26
   7: bevy_render::renderer::render_device::RenderDevice::create_texture_with_data
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_render-0.13.2/src/renderer/render_device.rs:168:13
   8: <bevy_render::texture::image::Image as bevy_render::render_asset::RenderAsset>::prepare_asset
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_render-0.13.2/src/texture/image.rs:836:23
   9: bevy_render::render_asset::prepare_assets
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_render-0.13.2/src/render_asset.rs:405:15
  10: core::ops::function::FnMut::call_mut
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/ops/function.rs:166:5
  11: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/ops/function.rs:294:13
  12: <Func as bevy_ecs::system::function_system::SystemParamFunction<fn(F0,F1,F2,F3) .> Out>>::run::call_inner
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_ecs-0.13.2/src/system/function_system.rs:656:21
  13: <Func as bevy_ecs::system::function_system::SystemParamFunction<fn(F0,F1,F2,F3) .> Out>>::run
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_ecs-0.13.2/src/system/function_system.rs:659:17
  14: <bevy_ecs::system::function_system::FunctionSystem<Marker,F> as bevy_ecs::system::system::System>::run_unsafe
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_ecs-0.13.2/src/system/function_system.rs:499:19
  15: bevy_ecs::schedule::executor::multi_threaded::MultiThreadedExecutor::spawn_system_task::{{closure}}::{{closure}}
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_ecs-0.13.2/src/schedule/executor/multi_threaded.rs:534:26
  16: core::ops::function::FnOnce::call_once
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/ops/function.rs:250:5
  17: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/panic/unwind_safe.rs:272:9
  18: std::panicking::try::do_call
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:554:40
  19: std::panicking::try
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:518:19
  20: std::panic::catch_unwind
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panic.rs:142:14
  21: bevy_ecs::schedule::executor::multi_threaded::MultiThreadedExecutor::spawn_system_task::{{closure}}
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_ecs-0.13.2/src/schedule/executor/multi_threaded.rs:529:23
  22: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::future::future::Future>::poll
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/panic/unwind_safe.rs:297:9
  23: <futures_lite::future::CatchUnwind<F> as core::future::future::Future>::poll::{{closure}}
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-lite-2.3.0/src/future.rs:588:42
  24: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/panic/unwind_safe.rs:272:9
  25: std::panicking::try::do_call
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:554:40
  26: std::panicking::try
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:518:19
  27: std::panic::catch_unwind
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panic.rs:142:14
  28: <futures_lite::future::CatchUnwind<F> as core::future::future::Future>::poll
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-lite-2.3.0/src/future.rs:588:9
  29: async_executor::Executor::spawn_inner::{{closure}}
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-executor-1.10.0/src/lib.rs:237:20
  30: async_task::raw::RawTask<F,T,S,M>::run::{{closure}}
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/raw.rs:550:21
  31: core::ops::function::FnOnce::call_once
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/ops/function.rs:250:5
  32: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/panic/unwind_safe.rs:272:9
  33: std::panicking::try::do_call
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:554:40
  34: std::panicking::try
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:518:19
  35: std::panic::catch_unwind
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panic.rs:142:14
  36: async_task::raw::RawTask<F,T,S,M>::run
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/raw.rs:549:23
  37: async_executor::Executor::run::{{closure}}::{{closure}}
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-executor-1.10.0/src/lib.rs:352:21
  38: <futures_lite::future::Or<F1,F2> as core::future::future::Future>::poll
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-lite-2.3.0/src/future.rs:449:33
  39: async_executor::Executor::run::{{closure}}
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-executor-1.10.0/src/lib.rs:359:32
  40: futures_lite::future::block_on::{{closure}}
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-lite-2.3.0/src/future.rs:99:19
  41: std::thread::local::LocalKey<T>::try_with
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/thread/local.rs:286:16
  42: std::thread::local::LocalKey<T>::with
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/thread/local.rs:262:9
  43: futures_lite::future::block_on
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-lite-2.3.0/src/future.rs:78:5
  44: bevy_tasks::task_pool::TaskPool::new_internal::{{closure}}::{{closure}}::{{closure}}::{{closure}}
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_tasks-0.13.2/src/task_pool.rs:180:37
  45: std::panicking::try::do_call
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:554:40
  46: std::panicking::try
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:518:19
  47: std::panic::catch_unwind
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panic.rs:142:14
  48: bevy_tasks::task_pool::TaskPool::new_internal::{{closure}}::{{closure}}::{{closure}}
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_tasks-0.13.2/src/task_pool.rs:174:43
  49: std::thread::local::LocalKey<T>::try_with
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/thread/local.rs:286:16
  50: std::thread::local::LocalKey<T>::with
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/thread/local.rs:262:9
  51: bevy_tasks::task_pool::TaskPool::new_internal::{{closure}}::{{closure}}
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_tasks-0.13.2/src/task_pool.rs:167:25
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Encountered a panic in system `bevy_render::render_asset::prepare_assets<bevy_render::texture::image::Image>`!
thread 'Compute Task Pool (21)' panicked at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_render-0.13.2/src/pipelined_rendering.rs:49:67:
called `Result::unwrap()` on an `Err` value: RecvError
stack backtrace:
   0: rust_begin_unwind
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:647:5
   1: core::panicking::panic_fmt
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/panicking.rs:72:14
   2: core::result::unwrap_failed
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/result.rs:1649:5
   3: core::result::Result<T,E>::unwrap
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/result.rs:1073:23
   4: bevy_render::pipelined_rendering::RenderAppChannels::recv::{{closure}}
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_render-0.13.2/src/pipelined_rendering.rs:49:26
   5: bevy_render::pipelined_rendering::update_rendering::{{closure}}::{{closure}}::{{closure}}::{{closure}}
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_render-0.13.2/src/pipelined_rendering.rs:185:60
   6: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::future::future::Future>::poll
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/panic/unwind_safe.rs:297:9
   7: <futures_lite::future::CatchUnwind<F> as core::future::future::Future>::poll::{{closure}}
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-lite-2.3.0/src/future.rs:588:42
   8: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/panic/unwind_safe.rs:272:9
   9: std::panicking::try::do_call
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:554:40
  10: std::panicking::try
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:518:19
  11: std::panic::catch_unwind
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panic.rs:142:14
  12: <futures_lite::future::CatchUnwind<F> as core::future::future::Future>::poll
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-lite-2.3.0/src/future.rs:588:9
  13: async_executor::Executor::spawn_inner::{{closure}}
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-executor-1.10.0/src/lib.rs:237:20
  14: async_task::raw::RawTask<F,T,S,M>::run::{{closure}}
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/raw.rs:550:21
  15: core::ops::function::FnOnce::call_once
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/ops/function.rs:250:5
  16: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/panic/unwind_safe.rs:272:9
  17: std::panicking::try::do_call
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:554:40
  18: std::panicking::try
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:518:19
  19: std::panic::catch_unwind
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panic.rs:142:14
  20: async_task::raw::RawTask<F,T,S,M>::run
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/raw.rs:549:23
  21: async_executor::Executor::run::{{closure}}::{{closure}}
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-executor-1.10.0/src/lib.rs:352:21
  22: <futures_lite::future::Or<F1,F2> as core::future::future::Future>::poll
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-lite-2.3.0/src/future.rs:449:33
  23: async_executor::Executor::run::{{closure}}
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-executor-1.10.0/src/lib.rs:359:32
  24: futures_lite::future::block_on::{{closure}}
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-lite-2.3.0/src/future.rs:99:19
  25: std::thread::local::LocalKey<T>::try_with
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/thread/local.rs:286:16
  26: std::thread::local::LocalKey<T>::with
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/thread/local.rs:262:9
  27: futures_lite::future::block_on
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-lite-2.3.0/src/future.rs:78:5
  28: bevy_tasks::task_pool::TaskPool::new_internal::{{closure}}::{{closure}}::{{closure}}::{{closure}}
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_tasks-0.13.2/src/task_pool.rs:180:37
  29: std::panicking::try::do_call
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:554:40
  30: std::panicking::try
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:518:19
  31: std::panic::catch_unwind
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panic.rs:142:14
  32: bevy_tasks::task_pool::TaskPool::new_internal::{{closure}}::{{closure}}::{{closure}}
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_tasks-0.13.2/src/task_pool.rs:174:43
  33: std::thread::local::LocalKey<T>::try_with
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/thread/local.rs:286:16
  34: std::thread::local::LocalKey<T>::with
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/thread/local.rs:262:9
  35: bevy_tasks::task_pool::TaskPool::new_internal::{{closure}}::{{closure}}
             at /home/nerdachse/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_tasks-0.13.2/src/task_pool.rs:167:25
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

I cloned the repo again, same deal. I checked bevy examples and my own projects and no problem there. Any ideas? Is this just on my side?

Inspirateur commented 5 months ago

Thank you for submitting this issue, I'll look into it when I can, this weekend is quite busy for me so we'll see :)

nerdachse commented 5 months ago

No hurry, I was just wondering whether a file was forgotten in a commit or so.

Have a wonderful weekend!

Inspirateur commented 5 months ago

Does it still crashes with latest rust version and after a cargo update on the project ? I can't reproduce it and from the message it seems to be wgpu related ?🤔

nerdachse commented 5 months ago

Thanks for coming back to this:

I always update rust and cargo dependencies before I post issues - this time I tried to check out older commits and bisect where it would go wrong. Couldn't get it to work on older commits either (it worked before, same machine).

Now I did

riverbed on  main [$] is 📦 v0.1.0 via 🦀 v1.77.2
❯ cargo u
    Updating crates.io index
    Updating git repository `https://github.com/Inspirateur/nd-interval`
    Updating proc-macro2 v1.0.80 -> v1.0.81
    Updating serde v1.0.197 -> v1.0.198
    Updating serde_derive v1.0.197 -> v1.0.198
    Updating serde_json v1.0.115 -> v1.0.116

(and rustup update but it had nothing to do)

and it works... but only kinda

screenshot_17 04 2024-17 57 15

log says:

2024-04-17T15:57:06.510637Z ERROR bevy_asset::server: Failed to load folder. Asset 'PixelPerfection/textures/blocks/_debug.png' is configured to be processed. It cannot be loaded directly.

But alas, something renders! :D

I'll try with another computer later.

Inspirateur commented 5 months ago

tldr; removing the meta files could fix it

I think it has something to do with asset preprocessing, I enabled it once to try and get mipmap but it wasn't an appropriate solution because i need to generate a mipmap of my texture array not my individual textures, and anyway i've disabled it in most recent commit but it has left .meta files all over the place, which i removed on my end but since it wasn't on git (maybe it should be on git now that i think about it) you still have them

Inspirateur commented 5 months ago

I also forgot to remove the yellow chunk gizmo lines but that's unrelated xd I really should gate them behind a "debug" config

nerdachse commented 5 months ago

Thanks, removing the meta files fixed it :)

Now I feel embarrassed

Inspirateur commented 5 months ago

Thanks, removing the meta files fixed it :)

Now I feel embarrassed

No worries ! It was pretty poorly managed on my end :)