mirror of
https://github.com/Dingo-Shenanigans/ReSkate.git
synced 2026-10-17 20:57:08 +02:00
Leaving a level could crash the game: an access violation in Skate.exe at +0x3f5fc52, on one of its worker threads, with no ReSkate code on the stack. Three reports from one PC show the same crash at the same address (two on 2.0.0, one on 1.1.8), each about half a second after leaving Skate3Improved on a server of 81 to 101 players. While a level unloads, a job walks each unloading object's table of 0x30-byte entries and reads a number at +0xc8 of the asset each entry points to. An entry whose asset never resolved holds null there, and the game reads it unchecked. The loop is rewritten in place at startup so such an entry is skipped. The 2-byte nop before the loop makes room for a jz straight after the pointer is masked, the two moves it displaced follow it, and the loop's jump back is retargeted to the new start. Everything from the read on stays where it was; nothing else in the function jumps into the rewritten bytes. The patch is applied only when the game's 50 bytes are exactly what it was written for. Otherwise the game runs as shipped and the log says why; startup goes on either way. The log shows "Level unload crash guard: ready" when it is in. Not known: which asset is unresolved (the map's, or something another player had equipped), and why it only happens some of the time. The reports hold stacks only.