Crash reports and a guard for burning bone particles without a device
- re/crash: unhandled exceptions write sacred_re_crash.txt (module+offset, registers, return addresses on the stack) and a minidump; the game's own filter is chained behind ours - guards: cParticleSystem_burningBone::Render (0x774e10) skips drawing when given a null device (crash at sacred.exe+0x374e39 after Esc while walking) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
e914bd1590
commit
5338527b49
5 files changed
+163
-1
No files matched your search
@@ -0,0 +1,30 @@
|
||||
// Guards against crashes in the game's own code (each with what is known of
|
||||
// its cause).
|
||||
|
||||
#include <intrin.h>
|
||||
|
||||
#include "re/hook.h"
|
||||
#include "re/log.h"
|
||||
|
||||
namespace game {
|
||||
|
||||
// cParticleSystem_burningBone::Render (vf04 0x774e10, vtable 0x895b84):
|
||||
// crashed reading the device it was given, which was null (2026-10-16, Esc
|
||||
// pressed while walking; Windows reported sacred.exe+0x374e39). Who renders
|
||||
// it without a device is not known yet (sacred_re_crash.txt will tell). With
|
||||
// no device there is nothing to draw.
|
||||
void __fastcall BurningBone_Render(void* self, void* edx, void* device);
|
||||
RE_HOOK(0x00774e10, BurningBone_Render);
|
||||
void __fastcall BurningBone_Render(void* self, void* edx, void* device) {
|
||||
if (!device) {
|
||||
static bool logged = false;
|
||||
if (!logged) {
|
||||
logged = true;
|
||||
re::Log("guards: burning bone particles rendered without a device, skipped (%p)", _ReturnAddress());
|
||||
}
|
||||
return;
|
||||
}
|
||||
BurningBone_Render_original(self, edx, device);
|
||||
}
|
||||
|
||||
} // namespace game
|
||||
Reference in new issue
Block a user