Examples panic on macOS
ralfbiedert opened this issue · comments
This looks like an exciting project! Unfortunately, when I try to run cargo run --example basic
, I get
Finished dev [unoptimized + debuginfo] target(s) in 0.14s
Running `target/debug/examples/basic`
opengl 4.1 INTEL-12.4.7
shading language 4.10
vendor Intel Inc.
compiling VS
compiling FS
linking
loading file terminal_8x8.png
thread 'main' panicked at 'GLError: uniform_1i 1282 (invalid operation)', /Users/rb/.cargo/registry/src/github.com-1ecc6299db9ec823/uni-gl-0.1.1/src/webgl_native.rs:35:13
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
1: std::sys_common::backtrace::_print
at src/libstd/sys_common/backtrace.rs:70
2: std::panicking::default_hook::{{closure}}
at src/libstd/sys_common/backtrace.rs:58
at src/libstd/panicking.rs:200
3: std::panicking::default_hook
at src/libstd/panicking.rs:215
4: <std::panicking::begin_panic::PanicPayload<A> as core::panic::BoxMeUp>::get
at src/libstd/panicking.rs:478
5: std::panicking::continue_panic_fmt
at src/libstd/panicking.rs:385
6: std::panicking::try::do_call
at src/libstd/panicking.rs:340
7: uni_gl::webgl::check_gl_error
at /Users/rb/.cargo/registry/src/github.com-1ecc6299db9ec823/uni-gl-0.1.1/src/webgl_native.rs:35
8: uni_gl::webgl::<impl uni_gl::common::WebGLRenderingContext>::new::{{closure}}
at /Users/rb/.cargo/registry/src/github.com-1ecc6299db9ec823/uni-gl-0.1.1/src/webgl_native.rs:768
9: doryen_rs::program::Program::update_uniform_texture
at src/program.rs:272
10: doryen_rs::program::Program::set_uniforms
at src/program.rs:280
11: doryen_rs::program::Program::render_primitive
at src/program.rs:241
12: doryen_rs::app::App::run::{{closure}}
at src/app.rs:315
13: core::char::convert::from_u32_unchecked
at /Users/rb/.cargo/registry/src/github.com-1ecc6299db9ec823/uni-app-0.1.0/src/native_app.rs:298
14: doryen_rs::app::App::handle_input
at src/app.rs:278
15: basic::main
at examples/basic.rs:93
16: std::rt::lang_start::{{closure}}
at /rustc/c2d381d39d282c0586d50ea7d7a431ffd5ddb3fb/src/libstd/rt.rs:64
17: std::panicking::try::do_call
at src/libstd/rt.rs:49
at src/libstd/panicking.rs:297
18: panic_unwind::dwarf::eh::read_encoded_pointer
at src/libpanic_unwind/lib.rs:92
19: <std::panicking::begin_panic::PanicPayload<A> as core::panic::BoxMeUp>::get
at src/libstd/panicking.rs:276
at src/libstd/panic.rs:388
at src/libstd/rt.rs:48
20: std::rt::lang_start
at /rustc/c2d381d39d282c0586d50ea7d7a431ffd5ddb3fb/src/libstd/rt.rs:64
21: basic::main
The same happens running other examples, like resize
, subcell
, perf
. I can see a black window popping up for about a frame or so before the crash happens.
I am using rustc 1.33.0-nightly (c2d381d39 2019-01-10)
, on a 13'' MBP 2015, with macOS 10.14.2.
It looks like it's trying to use the shaders before the program was bound. Can you try the macos_fix branch and tell me if it fix the issue ?
Thanks for the update. When I run it now it doens't crash anymore, but all the examples are black.
Nevermind, works. Thanks!