The new PoseStateCaching approach causes a crash in some circumstances
russell-taylor opened this issue · 8 comments
HDK 2.0 DirectMode using nVidia GTX 1080 driver version 382.53 on Windows 10. Compiled in Debug mode on VS 2015 from commit 5bc52ae
Running using the installer/directmode_HDK2.0.json server configuration and the RenderManagerOpenGLHighPolyTest demo program. Crashes on line 61 of PoseStateCaching.h when the program is exiting, inside the destructor.
Crashes in the same location when running using the nondirect windowed display, which has tracking working. The DirectMode example above does not have tracking working.
Chasing it further down the stack, it dies in:
osvrCommond.dll!std::_Iterator_base12::_Adopt(const std::_Container_base12 * _Parent) Line 166 C++
where _Mynextiter is a nullptr and _Parent_proxy points to unreadable memory. _Myproxy is a nullptr.
I can confirm this issue actually occurs when using ANY of the Present Examples. The destructor call that is breaking things is trying to destruct the osvr::RenderKit::RenderInfo structure. In order for any of the Present examples to even get to the render loop, all places which could destruct RenderInfo structures, including overwriting them, have to be commented out.
Does not crash when running in RelWithDebInfo mode on a GTX 980M using driver 382.33 from commit 61f187f
Does still crash in the original configuration when updated to commit 61f187f
Fixed in pull request #331 which deletes the object before tearing down the context. Leaving problem open until that pull request is merged.
I merged that fix, thank you!