Skip to content

Fix debug builds #1

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

Merged
merged 7 commits into from
Mar 13, 2025
Merged

Fix debug builds #1

merged 7 commits into from
Mar 13, 2025

Conversation

Vrixyz
Copy link
Contributor

@Vrixyz Vrixyz commented Mar 7, 2025

Fix timestamp buffer not being big enough

This led to a use of unauthorized memory ; interestingly it's not caught on release, but it leads to a panic in debug.

More...

Debug still crashes on pop os vulkan amd with:

thread 'Async Compute Task Pool (2)' panicked at /home/tb/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/naga-23.1.0/src/back/glsl/mod.rs:1206:17:
internal error: entered unreachable code
stack backtrace:
   0: rust_begin_unwind
             at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panicking.rs:692:5
   1: core::panicking::panic_fmt
             at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/core/src/panicking.rs:75:14
   2: core::panicking::panic
             at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/core/src/panicking.rs:145:5
   3: naga::back::glsl::Writer<W>::write_global
             at /home/tb/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/naga-23.1.0/src/back/glsl/mod.rs:1206:17

With a custom print local variable before the unreachable on naga-23.1.0/src/back/glsl/mod.rs:1206:17:

Unreachable reached while handling global constant with name: Some("diffuse_environment_mapsX_naga_oil_mod_XMJSXM6K7OBRHEOR2NVSXG2C7OZUWK527MJUW4ZDJNZTXGX")
(irrelevant?) info

Without full backtrace, it looks like this, but I think the unreachable was reached before that.

thread 'Async Compute Task Pool (1)' panicked at /home/tb/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/naga-23.1.0/src/back/glsl/mod.rs:1201:44:
internal error: entered unreachable code
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Encountered a panic in system `bevy_render::render_resource::pipeline_cache::PipelineCache::process_pipeline_queue_system`!

thread '<unnamed>' panicked at /home/tb/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bevy_render-0.15.3/src/render_resource/pipeline_cache.rs:580:28:
index out of bounds: the len is 0 but the index is 4
Encountered a panic in system `bevy_render::renderer::render_system`!

thread 'main' panicked at /home/tb/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-hal-23.0.1/src/vulkan/instance.rs:173:58:
Trying to destroy a SurfaceSemaphores that is still in use by a SurfaceTexture

@Vrixyz Vrixyz changed the title Fix timestamp buffer not being big enough Fix debug builds Mar 12, 2025
Comment on lines +124 to +131
for x in -1..2 {
for z in -1..2 {
let x = x as f32;
let z = z as f32;
let offset = vector![x * grid_size_x as f32, 0f32, z * grid_size_z as f32] * 2f32;
for particle in &particle_positions {
let position = vector![particle.x, particle.y, particle.z];

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those are way outside the scope of this PR, and lacking proper polish, but I'll roll with it as this project is still heavily WIP.

@Vrixyz Vrixyz merged commit e706c53 into dimforge:main Mar 13, 2025
3 checks passed
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

Successfully merging this pull request may close these issues.

1 participant