Skip to content
This repository has been archived by the owner on Jul 12, 2021. It is now read-only.

Tracking issue for #1

Open
icefoxen opened this issue Jun 5, 2019 · 0 comments
Open

Tracking issue for #1

icefoxen opened this issue Jun 5, 2019 · 0 comments

Comments

@icefoxen
Copy link
Contributor

icefoxen commented Jun 5, 2019

Not a bug in this, but rather, a bug in validation layers that seems to have been exercised by a mistake I made. Basically, the validation layer on NVidia appeared to segfault and groves in the Amethyst discord suggested I make a repro. It's not very minimal, but there's a repro in this branch with the mistake I made highlighted with the word BUG in the comments: https://github.com/ggez/ggraphics/blob/validation-crash-repro/src/main.rs#L548-L552

Long story short, I called draw_indexed() without actually having a graphics pipeline bound. This crashes in the driver in NVidia and Intel drivers. Need to test on other platforms.

gdb backtrace on Linux X11 with Intel drivers:

[New Thread 0x7fffedf20700 (LWP 15968)]
[src/main.rs:400] &indices = 0..6
[src/main.rs:401] &instances = 0..1

Thread 1 "ggraphics" received signal SIGSEGV, Segmentation fault.
0x00007ffff4d9a0f6 in ?? () from /usr/lib/x86_64-linux-gnu/libvulkan_intel.so
(gdb) bt
#0  0x00007ffff4d9a0f6 in ?? () from /usr/lib/x86_64-linux-gnu/libvulkan_intel.so
#1  0x000055555655e238 in ash::vk::DeviceFnV1_0::cmd_draw_indexed (self=0x555556da0128, command_buffer=..., index_count=6, 
    instance_count=1, first_index=0, vertex_offset=0, first_instance=0)
    at /home/icefox/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.29.0/src/vk.rs:5786
#2  0x00005555560f7eb1 in ash::device::DeviceV1_0::cmd_draw_indexed (self=0x555556da0120, command_buffer=..., index_count=6, 
    instance_count=1, first_index=0, vertex_offset=0, first_instance=0)
    at /home/icefox/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.29.0/src/device.rs:954
#3  0x000055555613075d in <gfx_backend_vulkan::command::CommandBuffer as gfx_hal::command::raw::RawCommandBuffer<gfx_backend_vulkan::Backend>>::draw_indexed (self=0x555556a436b0, indices=..., base_vertex=0, instances=...)
    at /home/icefox/.cargo/registry/src/github.com-1ecc6299db9ec823/gfx-backend-vulkan-0.2.1/src/command.rs:759
#4  0x00005555556ae803 in rendy_command::buffer::encoder::RenderPassEncoder<B>::draw_indexed (self=0x7fffffff9770, indices=..., 
    base_vertex=0, instances=...)
    at /home/icefox/.cargo/registry/src/github.com-1ecc6299db9ec823/rendy-command-0.2.0/src/buffer/encoder.rs:312
#5  0x00005555559ecbf3 in ggraphics::FrameInFlight<B>::draw (self=0x555556f7ab30, draw_calls=..., layout=0x555556f720b0, 
    encoder=0x7fffffff9770, _align=32) at src/main.rs:402
#6  0x00005555559ed15a in <ggraphics::MeshRenderGroup<B> as rendy_graph::node::render::group::RenderGroup<B,ggraphics::Aux<B>>>::draw_inline (self=0x555556f72090, encoder=..., index=1, _subpass=..., aux=0x7fffffffda50) at src/main.rs:554
#7  0x000055555574320c in <rendy_graph::node::render::pass::RenderPassNode<B,T> as rendy_graph::node::DynNode<B,T>>::run::{{closure}}::{{closure}}::{{closure}}::{{closure}} (group=0x555556f77670)
    at /home/icefox/.cargo/registry/src/github.com-1ecc6299db9ec823/rendy-graph-0.2.0/src/node/render/pass.rs:737
#8  0x0000555555adb012 in core::iter::traits::iterator::Iterator::for_each::{{closure}} (item=0x555556f77670)
    at /rustc/0ff088c9ee6a132daf256383e56004bee34fbaae/src/libcore/iter/traits/iterator.rs:604
#9  0x0000555555a60f77 in <core::slice::IterMut<T> as core::iter::traits::iterator::Iterator>::fold (self=..., init=(), f=...)
    at /rustc/0ff088c9ee6a132daf256383e56004bee34fbaae/src/libcore/slice/mod.rs:3159
#10 0x0000555555a1f661 in core::iter::traits::iterator::Iterator::for_each (self=..., f=...)
    at /rustc/0ff088c9ee6a132daf256383e56004bee34fbaae/src/libcore/iter/traits/iterator.rs:604
#11 0x000055555574302c in <rendy_graph::node::render::pass::RenderPassNode<B,T> as rendy_graph::node::DynNode<B,T>>::run::{{closure}}::{{closure}}::{{closure}} () at /home/icefox/.cargo/registry/src/github.com-1ecc6299db9ec823/rendy-graph-0.2.0/src/node/render/pass.rs:736
#12 0x0000555555ada0f6 in core::iter::traits::iterator::Iterator::for_each::{{closure}} (item=...)
    at /rustc/0ff088c9ee6a132daf256383e56004bee34fbaae/src/libcore/iter/traits/iterator.rs:604
#13 0x000055555584dee4 in <core::iter::adapters::Enumerate<I> as core::iter::traits::iterator::Iterator>::fold::{{closure}} (acc=(), 
    item=0x555556f43070) at /rustc/0ff088c9ee6a132daf256383e56004bee34fbaae/src/libcore/iter/adapters/mod.rs:964
#14 0x0000555555a60eb7 in <core::slice::IterMut<T> as core::iter::traits::iterator::Iterator>::fold (self=..., init=(), f=...)
    at /rustc/0ff088c9ee6a132daf256383e56004bee34fbaae/src/libcore/slice/mod.rs:3159
#15 0x000055555584db98 in <core::iter::adapters::Enumerate<I> as core::iter::traits::iterator::Iterator>::fold (self=..., init=(), 
    fold=...) at /rustc/0ff088c9ee6a132daf256383e56004bee34fbaae/src/libcore/iter/adapters/mod.rs:963
#16 0x0000555555836b70 in core::iter::traits::iterator::Iterator::for_each (self=..., f=...)
    at /rustc/0ff088c9ee6a132daf256383e56004bee34fbaae/src/libcore/iter/traits/iterator.rs:604
#17 0x0000555555742e1a in <rendy_graph::node::render::pass::RenderPassNode<B,T> as rendy_graph::node::DynNode<B,T>>::run::{{closure}}::{{closure}} (cbuf=...) at /home/icefox/.cargo/registry/src/github.com-1ecc6299db9ec823/rendy-graph-0.2.0/src/node/render/pass.rs:732
#18 0x00005555559ab397 in rendy_frame::cirque::InitialRef<T,I,P>::init (self=..., init=...)
    at /home/icefox/.cargo/registry/src/github.com-1ecc6299db9ec823/rendy-frame-0.2.0/src/cirque/mod.rs:65
#19 0x00005555559aaf3f in rendy_frame::cirque::CirqueRef<T,I,P>::or_init (self=..., init=...)
    at /home/icefox/.cargo/registry/src/github.com-1ecc6299db9ec823/rendy-frame-0.2.0/src/cirque/mod.rs:26
#20 0x0000555555742a43 in <rendy_graph::node::render::pass::RenderPassNode<B,T> as rendy_graph::node::DynNode<B,T>>::run::{{closure}} (
    cbuf=...) at /home/icefox/.cargo/registry/src/github.com-1ecc6299db9ec823/rendy-graph-0.2.0/src/node/render/pass.rs:714

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

No branches or pull requests

1 participant