From 7eca830cb08ca71d728d77a20ad4a4f698877686 Mon Sep 17 00:00:00 2001 From: "Spring E. Thing" Date: Sat, 13 Sep 2025 09:38:43 +0100 Subject: [PATCH 1/3] Fixed custom kart gib SPR2s crashing the game upon usage --- src/objects/destroyed-kart.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/objects/destroyed-kart.cpp b/src/objects/destroyed-kart.cpp index 0db43836e..9eb343f8e 100644 --- a/src/objects/destroyed-kart.cpp +++ b/src/objects/destroyed-kart.cpp @@ -68,7 +68,7 @@ struct Particle : Mobj skins[pskinn]->sprites[states[spr2state].frame].numframes > 0) { - x->skin = (void*)(&skins[pskinn]); + x->skin = (void*)(skins[pskinn]); x->state(spr2state); //frame will be set by state() } From 686f1ac1e1f1beb33d37a9e75671cc818ea86789 Mon Sep 17 00:00:00 2001 From: AJ Martinez Date: Sun, 14 Sep 2025 20:44:24 +0000 Subject: [PATCH 2/3] Add default issue template --- .gitlab/issue_templates/Default.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .gitlab/issue_templates/Default.md diff --git a/.gitlab/issue_templates/Default.md b/.gitlab/issue_templates/Default.md new file mode 100644 index 000000000..a32399696 --- /dev/null +++ b/.gitlab/issue_templates/Default.md @@ -0,0 +1,19 @@ +# What version of Ring Racers are you playing? + +(Replace this text with the version number. You can see this on the title screen at the bottom-left corner.) + +# What is the fastest way to trigger the bug? + +(Bugs that can't be reproduced are extremely hard to fix. If you can't make it happen on demand, try and describe the circumstances where it triggers.) + +# What is the bugged behavior? + +(Describe what happens when you encounter the bug.) + +# What do you expect to happen instead? + +(Describe what should be happening instead of the bugged behavior.) + +# Logs, videos, or screenshots that showcase the issue + +(For crash bugs, look for an .RPT file, or your `latest-log.txt`. You can drag it directly into this window.) \ No newline at end of file From 811b2e5eee80c984d608b6e784a8013d45343fdf Mon Sep 17 00:00:00 2001 From: Indev Date: Fri, 12 Sep 2025 23:18:39 +0300 Subject: [PATCH 3/3] Attempt to fix some lua userdata being corrupted when allocated via PoolAllocator --- src/core/memory.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/core/memory.cpp b/src/core/memory.cpp index b6e0387e9..1841584ee 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -14,6 +14,7 @@ #include "../cxxutil.hpp" #include "../z_zone.h" +#include "../lua_script.h" using namespace srb2; @@ -117,6 +118,9 @@ void* PoolAllocator::allocate() void PoolAllocator::deallocate(void* p) { + // Required in case this block is reused + LUA_InvalidateUserdata(p); + FreeBlock* block = reinterpret_cast(p); block->next = head_; head_ = block; @@ -127,6 +131,12 @@ void PoolAllocator::release() ChunkFooter* next = nullptr; for (ChunkFooter* i = first_chunk_; i != nullptr; i = next) { + uint8_t *chunk = (uint8_t*)i->start; + for (size_t j = 0; j < blocks_; j++) + { + // Invalidate all blocks that possibly weren't passed to deallocate + LUA_InvalidateUserdata(chunk + (j * block_size_)); + } next = i->next; Z_Free(i->start); }