cc-tweaked / CC-Tweaked

Just another ComputerCraft fork
https://tweaked.cc
920 stars 212 forks source link

ArrayIndexOutOfBoundsException with > 16 methods #450

Closed desht closed 4 years ago

desht commented 4 years ago

Useful information to include:

CC: Tweaked version: 1.88.0 MC Version: 1.15.2

Got the following exception with a tile entity of mine which offers 52 Lua methods: https://pastebin.com/N7QFY0MT

Looking at dan200.computercraft.core.asm.IntCache, it seems only 16 entries are allocated in the cache? Is there a hard limit of 16 methods? This wasn't the case in 1.12.2.

SquidDev commented 4 years ago

Ahh, I'm a muppet. It's meant to correctly adjust for larger values, but there's a whole bunch of off-by-one errors in the code. Knew I should have written a unit test for this.

SquidDev commented 4 years ago

Should be fixed in 1.88.1. Sorry about that, incredibly stupid mistake.

desht commented 4 years ago

Happens to the best of us!