Skip to content
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

Generative Design example p_3_0_01 glyph can be too large #631

Open
sbauer322 opened this issue Jul 16, 2020 · 1 comment
Open

Generative Design example p_3_0_01 glyph can be too large #631

sbauer322 opened this issue Jul 16, 2020 · 1 comment
Labels

Comments

@sbauer322
Copy link
Contributor

Triggers in p_3_0_01.rs by moving the mouse into the window and to the far right.

/Users/sbauer/.cargo/bin/cargo run --color=always --package generative_design --example p_3_0_01
   Compiling generative_design v0.1.0 (/Users/sbauer/Documents/dev/nannou/generative_design)
    Finished dev [unoptimized + debuginfo] target(s) in 6.27s
     Running `target/debug/examples/p_3_0_01`
failed to cache queued glyphs: Glyph too large
thread 'main' panicked at 'assertion failed: `(left != right)`
  left: `0`,
 right: `0`', /Users/sbauer/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.5.0/src/lib.rs:940:9
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
   1: backtrace::backtrace::trace_unsynchronized
             at /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:78
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:59
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1069
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1504
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:62
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:198
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:218
  10: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:511
  11: rust_begin_unwind
             at src/libstd/panicking.rs:419
  12: std::panicking::begin_panic_fmt
  13: wgpu::Device::create_buffer_mapped
             at /Users/sbauer/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.5.0/src/lib.rs:940
  14: wgpu::Device::create_buffer_with_data
             at /Users/sbauer/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.5.0/src/lib.rs:964
  15: nannou::draw::renderer::Renderer::encode_render_pass
             at nannou/src/draw/renderer/mod.rs:820
  16: nannou::draw::renderer::Renderer::render_to_frame
             at nannou/src/draw/renderer/mod.rs:932
  17: nannou::app::<impl nannou::draw::Draw>::to_frame
             at nannou/src/app.rs:911
  18: p_3_0_01::view
             at generative_design/type/p_3_0_01.rs:74
  19: nannou::app::run_loop::{{closure}}
             at ./nannou/src/app.rs:1115
  20: <alloc::boxed::Box<F> as core::ops::function::FnMut<A>>::call_mut
             at /Users/sbauer/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src/liballoc/boxed.rs:1015
  21: <winit::platform_impl::platform::app_state::EventLoopHandler<T> as winit::platform_impl::platform::app_state::EventHandler>::handle_nonuser_event
             at /Users/sbauer/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.22.2/src/platform_impl/macos/app_state.rs:71
  22: winit::platform_impl::platform::app_state::Handler::handle_nonuser_event
             at /Users/sbauer/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.22.2/src/platform_impl/macos/app_state.rs:172
  23: winit::platform_impl::platform::app_state::AppState::cleared
             at /Users/sbauer/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.22.2/src/platform_impl/macos/app_state.rs:330
  24: winit::platform_impl::platform::observer::control_flow_end_handler
             at /Users/sbauer/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.22.2/src/platform_impl/macos/observer.rs:135
  25: _ZL12preoptimized
  26: _ZL12preoptimized
  27: _ZL12preoptimized
  28: _ZL12preoptimized
  29: _ZL12preoptimized
  30: _ZL12preoptimized
  31: _ZL12preoptimized
  32: _ZL12preoptimized
  33: _ZL12preoptimized
  34: _ZL12preoptimized
  35: <() as objc::message::MessageArguments>::invoke
             at /Users/sbauer/.cargo/registry/src/github.com-1ecc6299db9ec823/objc-0.2.7/src/message/mod.rs:128
  36: objc::message::platform::send_unverified
             at /Users/sbauer/.cargo/registry/src/github.com-1ecc6299db9ec823/objc-0.2.7/src/message/apple/mod.rs:27
  37: objc::message::send_message
             at /Users/sbauer/.cargo/registry/src/github.com-1ecc6299db9ec823/objc-0.2.7/src/message/mod.rs:178
  38: winit::platform_impl::platform::event_loop::EventLoop<T>::run_return
             at /Users/sbauer/.cargo/registry/src/github.com-1ecc6299db9ec823/objc-0.2.7/src/macros.rs:133
  39: winit::platform_impl::platform::event_loop::EventLoop<T>::run
             at /Users/sbauer/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.22.2/src/platform_impl/macos/event_loop.rs:89
  40: winit::event_loop::EventLoop<T>::run
             at /Users/sbauer/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.22.2/src/event_loop.rs:149
  41: nannou::app::run_loop
             at ./nannou/src/app.rs:1020
  42: nannou::app::Builder<M,E>::run
             at ./nannou/src/app.rs:471
  43: p_3_0_01::main
             at generative_design/type/p_3_0_01.rs:35
  44: std::rt::lang_start::{{closure}}
             at /Users/sbauer/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src/libstd/rt.rs:67
  45: std::rt::lang_start_internal::{{closure}}
             at src/libstd/rt.rs:52
  46: std::panicking::try::do_call
             at src/libstd/panicking.rs:331
  47: std::panicking::try
             at src/libstd/panicking.rs:274
  48: std::panic::catch_unwind
             at src/libstd/panic.rs:394
  49: std::rt::lang_start_internal
             at src/libstd/rt.rs:51
  50: std::rt::lang_start
             at /Users/sbauer/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src/libstd/rt.rs:67
  51: main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Process finished with exit code 101
@mitchmindtree
Copy link
Member

Thanks for the issue!

The following options come to mind for addressing this:

  1. Limiting the max text size or
  2. Exposing some way for the user to specify the dimensions of the glyph cache used for the draw::Renderer owned by the App. Currently, the draw::Renderer itself already allows for specifying this via its constructor, however the draw::Renderer created by the App currently assumes the default dimensions.
  3. Increase the default glyph cache texture dimensions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants