Open bebbo opened 2 years ago
I wrote the offending code, but you're in the wrong repository :-D
I'll fix it in https://github.com/mheyer32/scummvm-amigaos3
I introduced isReleaseBuild to short-circuit some runtime checks I thought were not needed. But I guess some of them are...
I'm curious how you found this bug. I'm always struggling debugging scummvm, even with bgdbserver...
I wrote the offending code, but you're in the wrong repository :-D
I'll fix it in https://github.com/mheyer32/scummvm-amigaos3
I introduced isReleaseBuild to short-circuit some runtime checks I thought were not needed. But I guess some of them are...
Your repo has issues disabled... ^^
I'm curious how you found this bug. I'm always struggling debugging scummvm, even with bgdbserver...
it's all done via bisection. You need a working version, build it and
find -name '*.o' -exec cp --parents {} ../ok \;
and a bad version. Build that too and
find -name '*.o' -exec cp --parents {} ../bad \;
depending of the current state, copy good files to fix it or bad files to kill it and run
find -name '*.a' -delete; make -j12; cp scummvm /mnt/f/amiga/test/svm
once you hunted down a single file, compare the asm of these versions, try building a bad and a good file with as less option differences as possible. If necessary bisect these asms into a new asm file manually and apply it until you find the function... ... debug it. I'm using my bgdbserver and DBug from O.M.A. 2.0
and then the fun starts: why does it go wrong in gcc... debug gcc... FIX IT. YEAH!!!
in seq_manager.cpp:
offending code:
if you'd add an else with some warning, you'll note that it attempts to use several invalid offsets for
SEG_TYPE_SCRIPT
. ifisReleaseBuild
is set to true (via-DNDEBUG
) it simply crashes.=> keep that sanity check even if
isReleaseBuild
is set to true: