Thank you for figuring out this fix! It took me a while to understand what was happening even after I read the fix :)
But I was wondering, maybe it was a mistake to resize ItemDef's list of elements based on gen(genMaxElements) Maybe it is simpler and safer to just size it to constant maxMaxElements, and thento just ignore the elements above the current max On Sun, Jul 20, 2025, 10:26 AM cron--- via Ohrrpgce < [email protected]> wrote: > > https://github.com/ohrrpgce/ohrrpgce/commit/025976510897727dfc2d20c5cdf9194b7f634545 > Author: teeemcee <teeemcee@7d344553-34f0-0310-a9b1-970ce8f1c3a2> > Date: Sun Jul 20 14:22:16 2025 +0000 > > Fix ItemDef constructor crash when gen() is uninitialised > > This caused a crash when the 18/7/25 nightly custom.exe starts due to > reading > gen(genNumElements) in a global-scope ItemDef constructor. It's hard to > reproduce because it depends on the initialisation order of > globals/modules, > which can depend on OS for example. > > This fixes the constructor to not crash but the deeper problem here is > having > global-scope objects with constructors that depend on other globals > being > initialised (see next commit). > > > cmdline.bas | 1 + > loading.rbas | 11 ++++++----- > 2 files changed, 7 insertions(+), 5 deletions(-) > > > > _______________________________________________ > Ohrrpgce mailing list > [email protected] > http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org >
_______________________________________________ Ohrrpgce mailing list [email protected] http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
