by Rachael » Wed Jun 12, 2019 3:50 am
I managed to reproduce a crash with model interpolation, where it seems like there are two of the same frame being interpolated. Not sure exactly what is going on in this code or I'd have fixed it myself.
Spoiler: Stack TraceCode: Select all
> gzdoom.exe!FModelRenderer::RenderFrameModels(FLevelLocals * Level, const FSpriteModelFrame * smf, const FState * curState, const int curTics, const PClass * ti, int translation) Line 261 C++
gzdoom.exe!FModelRenderer::RenderModel(float x, float y, float z, FSpriteModelFrame * smf, AActor * actor, double ticFrac) Line 177 C++
gzdoom.exe!HWSprite::DrawSprite(HWDrawInfo * di, FRenderState & state, bool translucent) Line 274 C++
gzdoom.exe!HWDrawList::DoDraw(HWDrawInfo * di, FRenderState & state, bool translucent, int i) Line 816 C++
gzdoom.exe!HWDrawList::DrawSorted(HWDrawInfo * di, FRenderState & state, SortNode * head) Line 906 C++
gzdoom.exe!HWDrawList::DrawSorted(HWDrawInfo * di, FRenderState & state) Line 944 C++
gzdoom.exe!HWDrawInfo::RenderTranslucent(FRenderState & state) Line 542 C++
[Inline Frame] gzdoom.exe!std::_Func_class<void,HWDrawInfo *,int>::operator()(HWDrawInfo * <_Args_0>, int <_Args_1>) Line 658 C++
gzdoom.exe!HWDrawInfo::ProcessScene(bool toscreen, const std::function<void __cdecl(HWDrawInfo *,int)> & drawScene) Line 660 C++
gzdoom.exe!VulkanFrameBuffer::RenderViewpoint(FRenderViewpoint & mainvp, AActor * camera, IntRect * bounds, float fov, float ratio, float fovratio, bool mainview, bool toscreen) Line 476 C++
gzdoom.exe!VulkanFrameBuffer::RenderView(player_t * player) Line 428 C++
[External Code]
[Inline Frame] gzdoom.exe!std::_Func_class<void>::operator()() Line 775 C++
[Inline Frame] gzdoom.exe!D_Render(std::function<void __cdecl(void)>) Line 380 C++
gzdoom.exe!D_Display() Line 775 C++
gzdoom.exe!D_DoomLoop() Line 1032 C++
gzdoom.exe!D_DoomMain() Line 2723 C++
gzdoom.exe!DoMain(HINSTANCE__ * hInstance) Line 992 C++
gzdoom.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * nothing, wchar_t * cmdline, int nCmdShow) Line 1324 C++
[External Code]
Spoiler: Active VariablesCode: Select all
inter 0.32172125577926636 double
+ nextState 0x0000000000000000 <NULL> FState *
+ smfNext 0x0000000000000000 <NULL> FSpriteModelFrame *
+ this 0x000000d9fcdfecc8 {modellightindex=53 di=0x000002d4a7965270 {drawlists=0x000002d4a7965270 {{walls={...} ...}, ...} ...} ...} FModelRenderer * {FHWModelRenderer}
+ ti 0x000002d48dcd2da0 {ParentClass=0x000002d484490be0 {ParentClass=0x000002d481a961d0 {ParentClass=0x000002d481a96c70 {...} ...} ...} ...} const PClass *
The issue here is that
in models.cpp line 261 , nextState is null and its null struct is being directly referenced.
I managed to reproduce a crash with model interpolation, where it seems like there are two of the same frame being interpolated. Not sure exactly what is going on in this code or I'd have fixed it myself. [spoiler=Stack Trace][code]> gzdoom.exe!FModelRenderer::RenderFrameModels(FLevelLocals * Level, const FSpriteModelFrame * smf, const FState * curState, const int curTics, const PClass * ti, int translation) Line 261 C++ gzdoom.exe!FModelRenderer::RenderModel(float x, float y, float z, FSpriteModelFrame * smf, AActor * actor, double ticFrac) Line 177 C++ gzdoom.exe!HWSprite::DrawSprite(HWDrawInfo * di, FRenderState & state, bool translucent) Line 274 C++ gzdoom.exe!HWDrawList::DoDraw(HWDrawInfo * di, FRenderState & state, bool translucent, int i) Line 816 C++ gzdoom.exe!HWDrawList::DrawSorted(HWDrawInfo * di, FRenderState & state, SortNode * head) Line 906 C++ gzdoom.exe!HWDrawList::DrawSorted(HWDrawInfo * di, FRenderState & state) Line 944 C++ gzdoom.exe!HWDrawInfo::RenderTranslucent(FRenderState & state) Line 542 C++ [Inline Frame] gzdoom.exe!std::_Func_class<void,HWDrawInfo *,int>::operator()(HWDrawInfo * <_Args_0>, int <_Args_1>) Line 658 C++ gzdoom.exe!HWDrawInfo::ProcessScene(bool toscreen, const std::function<void __cdecl(HWDrawInfo *,int)> & drawScene) Line 660 C++ gzdoom.exe!VulkanFrameBuffer::RenderViewpoint(FRenderViewpoint & mainvp, AActor * camera, IntRect * bounds, float fov, float ratio, float fovratio, bool mainview, bool toscreen) Line 476 C++ gzdoom.exe!VulkanFrameBuffer::RenderView(player_t * player) Line 428 C++ [External Code] [Inline Frame] gzdoom.exe!std::_Func_class<void>::operator()() Line 775 C++ [Inline Frame] gzdoom.exe!D_Render(std::function<void __cdecl(void)>) Line 380 C++ gzdoom.exe!D_Display() Line 775 C++ gzdoom.exe!D_DoomLoop() Line 1032 C++ gzdoom.exe!D_DoomMain() Line 2723 C++ gzdoom.exe!DoMain(HINSTANCE__ * hInstance) Line 992 C++ gzdoom.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * nothing, wchar_t * cmdline, int nCmdShow) Line 1324 C++ [External Code] [/code][/spoiler] [spoiler=Active Variables][code] inter 0.32172125577926636 double + nextState 0x0000000000000000 <NULL> FState * + smfNext 0x0000000000000000 <NULL> FSpriteModelFrame * + this 0x000000d9fcdfecc8 {modellightindex=53 di=0x000002d4a7965270 {drawlists=0x000002d4a7965270 {{walls={...} ...}, ...} ...} ...} FModelRenderer * {FHWModelRenderer} + ti 0x000002d48dcd2da0 {ParentClass=0x000002d484490be0 {ParentClass=0x000002d481a961d0 {ParentClass=0x000002d481a96c70 {...} ...} ...} ...} const PClass * [/code][/spoiler] The issue here is that [url=https://github.com/coelckers/gzdoom/blob/7e901055ea30b5e2d9fa33c2bc8142be89503f38/src/r_data/models/models.cpp#L261]in models.cpp line 261[/url], nextState is null and its null struct is being directly referenced.