Skip to content

Added sanity checks for "client missed x packets" HUD message

I got some weird crash while connecting to a 3.2-alpha server the other day, but before receiving the full snapshot (so while I was still in the full console). The crash dump's callstack points to CLIENT_CheckForMissingPackets, particularly where it prints the "client missed x packets" HUD message on the screen:

[Inline Frame] zandronum.exe!GC::ReadBarrier(DHUDMessage * &) Line 293
[Inline Frame] zandronum.exe!TObjPtr<DHUDMessage>::operator class DHUDMessage *() Line 370
zandronum.exe!DBaseStatusBar::DetachMessage(unsigned int id=1414218576) Line 480
zandronum.exe!DBaseStatusBar::AttachMessage(DHUDMessage * msg=0x07eb5f48, unsigned int id=1414218576, int layer=0) Line 416
zandronum.exe!CLIENT_CheckForMissingPackets() Line 1237
zandronum.exe!G_Ticker() Line 1622
zandronum.exe!TryRunTics() Line 1908
zandronum.exe!D_DoomLoop() Line 1308
zandronum.exe!D_DoomMain() Line 3275
zandronum.exe!DoMain(HINSTANCE__ * hInstance=0x00c20000) Line 1061
zandronum.exe!WinMain(HINSTANCE__ * hInstance=0x00c20000, HINSTANCE__ * nothing=0x756efcb0, char * cmdline=0x02b9fb78, int nCmdShow=2001371294) Line 1371

Since this message shouldn't appear until the client is fully connected and not in the full console, the best bet to fixing this crash is to not draw it at all until they reach this state (and double-down by checking if StatusBar is valid).

Merge request reports

Loading