cabaletta / baritone

google maps for block game
GNU Lesser General Public License v3.0
7.18k stars 1.44k forks source link

Instant crash upon changing layer order while paused #4514

Open silo8811 opened 6 days ago

silo8811 commented 6 days ago

Some information

Operating system: Win 11 build 22631 Java version: 23 Minecraft version: 1.20.4 Baritone version: 1.10.2 Other mods (if used): Cloth config api, fabric api (ofc) gamma utils, malilib

Exception, error or logs

Please find your latest.log or debug.log in this folder and attach it to the issue

Note I was on a server so I have (attempted) to censor out information not pertaining to the bug itsself

2024-10-01-1.log

How to reproduce

Step 1: Get yourself tools. A simple pick and shovel. Step 2: Go to one random coordinate on the world and do sel 1 Step 3: Go to somewhere nearby but not too far. Then go underground and do sel 2 Step 4: Tell baritone set buildInLayers true Step 5: Start baritone with sel ca Step 6: Pause baritone with paws Step 7: Tell baritone set layerOrder true (assuming it was false) Step 8: Crash the game by doing unpaws

Modified settings

image

Final checklist

ZacSharp commented 4 days ago

Looks like (another case of) assuming an invariant which doesn't actually hold. If I correctly guessed to unobfuscated stack trace this is caused by code assuming that incorrectPositions only contains in-bounds positions while in reality the bounds might have changed since the bounds check.