Hehe! Yeah, nobody has been asking for more elements. When I write the code to save/load items.reld I still expect to only store the elements that actually exist and have non-default values, and to have appropriate behavior for defaulting missing ones when loading.
On Sun, Jul 20, 2025, 8:32 PM Ralph Versteegen via Ohrrpgce < [email protected]> wrote: > Took me a while to figure out too; I only managed to by assuming a recent > commit caused the problem. > > I was thinking the same thing. It caused the other copy/paste bug I fixed > too. There are other edge cases such as changing number of elements while > using Test Game. The question is, are we ever going to want to remove (or > raise high) the maxMaxElements limit. I feel like 64 elements ought to be > enough for anybody :) > > On Mon, 21 Jul 2025 at 12:19, James Paige via Ohrrpgce < > [email protected]> wrote: > >> 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 >> > _______________________________________________ > 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
