Closed DrUm78 closed 1 year ago
After a ridiculous amount of debugging I finally tracked this down (I could not get unwinding/backtracing working on the FunKey - so could not get a stacktrace)
The issue is in D_PolysetDrawSpans8 in d_polyse.c
Normally the code is: if (lcount)
but it seems lcount can somehow end up being negative from int lcount = d_aspancount - pspanpackage->count; so changing the code to: if (lcount > 0)
Fixes the crashing.
Nice job, that fixes the issue yes! You should submit a pull request then before I close the bug. BTW, with "Colored lighting" enabled in the core setting, that still crashes at the same places. Just to let you know but I don't use this setting anyway (and it's disabled by default).
@nckstwrt Ok, applying the same change for "D_PolysetDrawSpansRGB" fixes the crash with "Colored lighting" enabled too but it's totally useless as it severely degrades the performance anyway although it's still nice to have something that does not crash anymore.
I keep the ticket open as it still crashes on armv7 without this change, so that's for the record when someone has time to commit the fix.
PR open here: https://github.com/libretro/tyrquake/pull/127.
Hardware: FunKey S (SoC V3s ARM Cortex A7-A clocked @ 1.2GHz) Software: sdlretro for the frontent (https://github.com/FunKey-Project/sdlretro) and Tyr-Quake for the Libretro core
It crashes systematically at the same point in the intro (when exploding the zombies with the grenade launcher) or as soon as I press A button (to switch weapon), here is a video.
Unfortunately, there is no logs anywhere after those crashes (even when enabling them in GMenu2X) so I don't have any lead about this. Any idea?