Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Fragment shader example crashes with "Trying to set a uniform with no shader active" #87

@caspark

Description

@caspark

Repro:

git checkout master # b0bd254 as of time of report
cargo run --example fragment-shader

Observed: crash with error Trying to set a uniform with no shader active. Stack:

$ RUST_BACKTRACE=1 cargo run --example fragment-shader
   Compiling comfy-core v0.3.0 (/home/ckrieger/srb/comfy/comfy-core)
   Compiling comfy-wgpu v0.3.0 (/home/ckrieger/srb/comfy/comfy-wgpu)
   Compiling comfy v0.3.1 (/home/ckrieger/srb/comfy/comfy)
    Finished dev [optimized + debuginfo] target(s) in 3.81s
     Running `target/debug/examples/fragment-shader`
LOGGER: env_logger
SHADER HOT RELOADING ENABLED!
The application panicked (crashed).
Message:  Trying to set a uniform with no shader active
Location: /home/ckrieger/srb/comfy/comfy-core/src/render_queues.rs:47

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                              ⋮ 8 frames hidden ⋮
10: comfy_core::shaders::set_uniform_f32::h45154c01e11e15e8
    at /home/ckrieger/srb/comfy/comfy-core/src/shaders.rs:98
11: fragment_shader::update::h28c29ba433a930a4
    at /home/ckrieger/srb/comfy/comfy/examples/fragment-shader.rs:78
12: <fragment_shader::ComfyGame as comfy::engine::GameLoop>::update::h61075bfa2401abdf
    at /home/ckrieger/srb/comfy/comfy/src/macros.rs:65
13: comfy::game_loop::run_comfy_main_async::{{closure}}::{{closure}}::h6f61750b0e724056
    at /home/ckrieger/srb/comfy/comfy/src/game_loop.rs:163
20: comfy::game_loop::run_comfy_main_async::{{closure}}::hb484d5d1787cc67d
    at /home/ckrieger/srb/comfy/comfy/src/game_loop.rs:129
21: fragment_shader::run::{{closure}}::hdf9fcd3015104373
    at /home/ckrieger/srb/comfy/comfy/examples/fragment-shader.rs:3
23: fragment_shader::main::hccefd74494084743
    at /home/ckrieger/srb/comfy/comfy/src/macros.rs:33
                              ⋮ 15 frames hidden ⋮

Expected: it doesn't crash :)


  • I git-bisected and found feed94a is the breaking commit, but I haven't dug into Comfy's source to figure out what's actually broken there.
  • Doesn't affect latest stable release 0.3.1, only current master.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions