Wgpu: assertion failed: blocks <= MAX_BLOCKS_PER_CHUNK as u64

Created on 1 Jun 2019  路  6Comments  路  Source: gfx-rs/wgpu

I only had enough time to test the new changes on my project, I'll try to get a repro together when I get the chance.
This is occurring in the same code that I reported as working in https://github.com/gfx-rs/wgpu/pull/197

thread 'main' panicked at 'assertion failed: blocks <= MAX_BLOCKS_PER_CHUNK as u64', /home/rubic/.cargo/registry/src/github.com-1ecc6299db9ec823/rendy-memory-0.2.0/src/allocator/dynamic.rs:552:9
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:71
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:59
             at src/libstd/panicking.rs:197
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:211
   4: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:474
   5: std::panicking::begin_panic
   6: rendy_memory::allocator::dynamic::Chunk<B>::from_block
   7: rendy_memory::allocator::dynamic::DynamicAllocator<B>::alloc_from_entry
   8: rendy_memory::allocator::dynamic::DynamicAllocator<B>::alloc_block
   9: <rendy_memory::allocator::dynamic::DynamicAllocator<B> as rendy_memory::allocator::Allocator<B>>::alloc
  10: rendy_memory::heaps::Heaps<B>::allocate
  11: wgpu_native::device::device_create_buffer
  12: wgpu_device_create_buffer_mapped
  13: brawllib_rs::renderer::draw_frame
  14: brawllib_rs::renderer::render_gif
  15: rukaidata_website::gif::generate
  16: rukaidata_website::main
  17: std::rt::lang_start::{{closure}}
  18: std::panicking::try::do_call
             at src/libstd/rt.rs:49
             at src/libstd/panicking.rs:293
  19: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:85
  20: std::rt::lang_start_internal
             at src/libstd/panicking.rs:272
             at src/libstd/panic.rs:388
             at src/libstd/rt.rs:48
  21: main
  22: __libc_start_main
  23: _start
Illegal instruction (core dumped)

Examples work fine.

bug

Most helpful comment

This assert is wrong, block allocated for chunk can be bigger than requested.
I'll patch asap

All 6 comments

@omni-viral any hints?
@rukai thank you for filing the bug! Your project seems to be complex enough to discover a whole lot of issues :) :+1:
Could you try running with "RUST_LOG=rendy_memory=trace"?

sure out.txt

This assert is wrong, block allocated for chunk can be bigger than requested.
I'll patch asap

Yes, it is fixed now in rendy master but not released yet.

Fixed in rendy 0.3

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lordnoriyuki picture lordnoriyuki  路  17Comments

ZKing1000 picture ZKing1000  路  23Comments

fintelia picture fintelia  路  23Comments

cwfitzgerald picture cwfitzgerald  路  20Comments

MarekLg picture MarekLg  路  39Comments