I have the following problem:
If I enable multithreaded rendering in Windows under Panda 1.8.0, I get what appears to be a race condition in debug mode. It looks like a mutex that is acquired during a call to GraphicsEngine::make_buffer on the main thread and a lock inside of GeomVertexDataPipelineReader::check_array_readers are somehow causing the app to hang forever. It is a pretty consistent bug in that it happens every time I run and switching from Cull/Draw to /Draw causes the check_array_readers call to move around, but it still always hangs inside of the same two calls. Posted below are the relevant stack traces for the two threads:
ntdll.dll!775ef8b1()
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
ntdll.dll!775ef8b1()
ntdll.dll!77608df4()
ntdll.dll!77608cd8()
libp3dtool_d.dll!MutexWin32Impl::acquire() Line 34 C++
libpanda_d.dll!MutexDirect::acquire() Line 73 C++
libpanda_d.dll!LightReMutexDirect::elevate_lock() Line 85 C++
libpanda_d.dll!LightReMutexHolder::LightReMutexHolder(const LightReMutex & mutex={...}) Line 27 C++
libpanda_d.dll!GraphicsEngine::WindowRenderer::add_window(ov_set<PointerTo<GraphicsOutput>,IndirectLess<GraphicsOutput> > & wlist={...}, GraphicsOutput * window=0x0cf96a2c) Line 2426 + 0x11 bytes C++
libpanda_d.dll!GraphicsEngine::do_add_window(GraphicsOutput * window=0x0cf96a2c, const GraphicsThreadingModel & threading_model={...}) Line 1991 C++
libpanda_d.dll!GraphicsEngine::make_output(GraphicsPipe * pipe=0x037b642c, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & name="InsetWindowBuffer", int sort=0, const FrameBufferProperties & fb_prop={...}, const WindowProperties & win_prop={...}, int flags=2052, GraphicsStateGuardian * gsg=0x037bb61c, GraphicsOutput * host=0x037b8304) Line 418 C++
> libpanda_d.dll!GraphicsEngine::make_buffer(GraphicsOutput * host=0x037b8304, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & name="InsetWindowBuffer", int sort=0, int x_size=128, int y_size=128) Line 148 + 0x8d bytes C++
ntdll.dll!775ef8b1()
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
ntdll.dll!775ef8b1()
KernelBase.dll!752e0a91()
libpanda_d.dll!ConditionVarWin32Impl::wait() Line 48 + 0xf bytes C++
libpanda_d.dll!ConditionVarDirect::wait() Line 105 C++
libpanda_d.dll!CopyOnWritePointer::get_read_pointer() Line 51 C++
libpanda_d.dll!CopyOnWritePointerTo<GeomVertexArrayData>::get_read_pointer() Line 285 + 0xc bytes C++
libpanda_d.dll!GeomVertexDataPipelineReader::make_array_readers() Line 2394 + 0x13 bytes C++
> libpanda_d.dll!GeomVertexDataPipelineReader::check_array_readers() Line 720 C++
libpanda_d.dll!Geom::draw(GraphicsStateGuardianBase * gsg=0x037bb61c, const GeomMunger * munger=0x0faa174c, const GeomVertexData * vertex_data=0x0fbe2a00, bool force=false, Thread * current_thread=0x037ba274) Line 1219 C++
libpanda_d.dll!CullableObject::draw_inline(GraphicsStateGuardianBase * gsg=0x037bb61c, bool force=false, Thread * current_thread=0x037ba274) Line 264 C++
libpanda_d.dll!CullableObject::draw(GraphicsStateGuardianBase * gsg=0x037bb61c, bool force=false, Thread * current_thread=0x037ba274) Line 156 C++
libpanda_d.dll!CullHandler::draw(CullableObject * object=0x058090c4, GraphicsStateGuardianBase * gsg=0x037bb61c, bool force=false, Thread * current_thread=0x037ba274) Line 27 C++
libpanda_d.dll!CullBinStateSorted::draw(bool force=false, Thread * current_thread=0x037ba274) Line 90 + 0x19 bytes C++
libpanda_d.dll!CullResult::draw(Thread * current_thread=0x037ba274) Line 287 C++
libpanda_d.dll!GraphicsEngine::do_draw(CullResult * cull_result=0x0c65a274, SceneSetup * scene_setup=0x0c65a1e4, GraphicsOutput * win=0x037b8304, DisplayRegion * dr=0x0ab5319c, Thread * current_thread=0x037ba274) Line 1951 C++
libpanda_d.dll!GraphicsEngine::draw_bins(GraphicsOutput * win=0x037b8304, DisplayRegion * dr=0x0ab5319c, Thread * current_thread=0x037ba274) Line 1583 C++
libpanda_d.dll!GraphicsEngine::draw_bins(const ov_set<PointerTo<GraphicsOutput>,IndirectLess<GraphicsOutput> > & wlist={...}, Thread * current_thread=0x037ba274) Line 1536 C++
libpanda_d.dll!GraphicsEngine::WindowRenderer::do_frame(GraphicsEngine * engine=0x037b6d4c, Thread * current_thread=0x037ba274) Line 2523 C++
libpanda_d.dll!GraphicsEngine::RenderThread::thread_main() Line 2712 C++
I appear to get this bug in both debug and release mode, but it is easier to get a clear stack trace in debug, for obvious reasons. Can anyone help? Thanks in advance!