Piston causing Array-out-of-bounds on Plank

Post any bugs that you find *in the mod* here. This place is NOT for posting installation errors or bugs with vanilla Minecraft, or add-on mods.
Locked
User avatar
Nyoike
Posts: 18
Joined: Sat Nov 15, 2014 12:18 am

Piston causing Array-out-of-bounds on Plank

Post by Nyoike »

I'm running a server for a few friends and myself, and I've had the same crash twice after building an auto earth packer. So far, I've been the only one of us to have crashed.

Installation info:
BTW V4.AFFFFFFFd and Gil's Legacy Skin Fix
Installed via MultiMC jar mod insertion
Java 1.8.0_191

Crash error points to the wooden block being pushed by the piston in the pulse limiter shown below:
https://imgur.com/ZejeWr4.png

Crash Report:
Spoiler
Show
---- Minecraft Crash Report ----
// Uh... Did I do that?

Time: 1/27/19 12:34 AM
Description: Rendering Tile Entity

java.lang.ArrayIndexOutOfBoundsException: 10
at FCBlockPlanks.a(FCBlockPlanks.java:107)
at apa.b_(Block.java:669)
at bgf.a(RenderBlocks.java:8348)
at bgf.a(RenderBlocks.java:4466)
at bgf.p(RenderBlocks.java:4260)
at apa.RenderBlock(Block.java:3374)
at bgf.b(RenderBlocks.java:9415)
at bgf.a(RenderBlocks.java:391)
at apa.RenderBlockMovedByPiston(Block.java:3483)
at biz.a(TileEntityRendererPiston.java:57)
at biz.a(TileEntityRendererPiston.java:79)
at bjd.a(TileEntityRenderer.java:157)
at bjd.a(TileEntityRenderer.java:142)
at bfy.a(RenderGlobal.java:453)
at bfq.a(EntityRenderer.java:1169)
at bfq.b(EntityRenderer.java:995)
at net.minecraft.client.Minecraft.K(Minecraft.java:871)
at net.minecraft.client.Minecraft.run(Minecraft.java:761)
at java.lang.Thread.run(Unknown Source)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
at FCBlockPlanks.a(FCBlockPlanks.java:107)
at apa.b_(Block.java:669)
at bgf.a(RenderBlocks.java:8348)
at bgf.a(RenderBlocks.java:4466)
at bgf.p(RenderBlocks.java:4260)
at apa.RenderBlock(Block.java:3374)
at bgf.b(RenderBlocks.java:9415)
at bgf.a(RenderBlocks.java:391)
at apa.RenderBlockMovedByPiston(Block.java:3483)
at biz.a(TileEntityRendererPiston.java:57)
at biz.a(TileEntityRendererPiston.java:79)

-- Tile Entity Details --
Details:
Name: Piston // aqw
Block type: ID #36 (tile.null // FCBlockPistonMoving)
Block data value: 0 / 0x0 / 0b0000
Block location: World: (1108,68,-692), Chunk: (at 4,4,12 in 69,-44; contains blocks 1104,0,-704 to 1119,255,-689), Region: (2,-2; contains chunks 64,-64 to 95,-33, blocks 1024,0,-1024 to 1535,255,-513)
Actual block type: ID #36 (tile.null // FCBlockPistonMoving)
Actual block data value: 10 / 0xA / 0b1010
Stacktrace:
at bjd.a(TileEntityRenderer.java:157)
at bjd.a(TileEntityRenderer.java:142)
at bfy.a(RenderGlobal.java:453)
at bfq.a(EntityRenderer.java:1169)

-- Affected level --
Details:
Level name: MpServer
All players: 2 total; [bdv['Nyoike'/13604674, l='MpServer', x=1090.96, y=71.62, z=-667.08], bfk['Craten'/13606728, l='MpServer', x=1044.66, y=62.50, z=-701.78]]
Chunk stats: MultiplayerChunkCache: 441
Level seed: 0
Level generator: ID 00 - default, ver 1. Features enabled: false
Level generator options:
Level spawn location: World: (184,64,248), Chunk: (at 8,4,8 in 11,15; contains blocks 176,0,240 to 191,255,255), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
Level time: 15613958 game time, 15613958 day time
Level dimension: 0
Level storage version: 0x00000 - Unknown?
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
Forced entities: 102 total; [FCEntityCreeper['Creeper'/13627598, l='MpServer', x=1066.78, y=53.00, z=-674.50], FCEntityCreeper['Creeper'/13629131, l='MpServer', x=1166.31, y=29.00, z=-629.47], FCEntityBat['Bat'/13632217, l='MpServer', x=1081.18, y=14.09, z=-688.81], FCEntityBat['Bat'/13632220, l='MpServer', x=1091.33, y=16.80, z=-677.02], FCEntityBat['Bat'/13632221, l='MpServer', x=1092.75, y=15.23, z=-674.61], FCEntitySlime['Slime'/13612737, l='MpServer', x=1104.59, y=59.00, z=-611.41], FCEntitySkeleton['Skeleton'/13633223, l='MpServer', x=1045.50, y=64.00, z=-616.27], FCEntityBat['Bat'/13607637, l='MpServer', x=1108.75, y=45.10, z=-686.72], FCEntityBat['Bat'/13607634, l='MpServer', x=1110.13, y=50.10, z=-665.75], FCEntityCreeper['Creeper'/13632973, l='MpServer', x=1040.56, y=62.14, z=-597.41], FCEntitySkeleton['Skeleton'/13619665, l='MpServer', x=1100.09, y=37.00, z=-693.50], nc['Experience Orb'/13610448, l='MpServer', x=1061.13, y=63.13, z=-554.91], nc['Experience Orb'/13627375, l='MpServer', x=1026.22, y=30.13, z=-590.72], FCEntityZombie['Zombie'/13631740, l='MpServer', x=1097.31, y=23.07, z=-644.30], FCEntityZombie['Zombie'/13631742, l='MpServer', x=1096.24, y=18.11, z=-642.45], FCEntitySpider['Spider'/13604832, l='MpServer', x=1087.78, y=83.50, z=-668.34], FCEntityEnderman['Enderman'/13632488, l='MpServer', x=1051.41, y=29.00, z=-636.06], FCEntityEnderman['Enderman'/13632489, l='MpServer', x=1054.97, y=29.00, z=-632.53], FCEntityZombie['Zombie'/13621747, l='MpServer', x=1070.53, y=49.00, z=-665.28], FCEntitySkeleton['Skeleton'/13633004, l='MpServer', x=1171.84, y=62.20, z=-611.84], FCEntityZombie['Zombie'/13628402, l='MpServer', x=1105.53, y=38.00, z=-666.78], nc['Experience Orb'/13631888, l='MpServer', x=1061.09, y=19.13, z=-626.97], FCEntityBat['Bat'/13632917, l='MpServer', x=1108.75, y=25.10, z=-615.53], nc['Experience Orb'/13604740, l='MpServer', x=1225.13, y=31.13, z=-564.88], FCEntityZombie['Zombie'/13632668, l='MpServer', x=1016.59, y=40.00, z=-721.34], FCEntityCreeper['Creeper'/13631646, l='MpServer', x=1020.84, y=18.00, z=-612.44], FCEntityZombie['Zombie'/13632384, l='MpServer', x=1104.68, y=38.26, z=-685.52], FCEntityZombie['Zombie'/13632385, l='MpServer', x=1099.70, y=36.11, z=-681.69], FCEntityZombie['Zombie'/13632386, l='MpServer', x=1098.24, y=37.84, z=-675.34], FCEntitySpider['Spider'/13632387, l='MpServer', x=1109.16, y=56.00, z=-733.56], FCEntitySpider['Spider'/13630104, l='MpServer', x=1085.80, y=37.00, z=-627.81], FCEntitySkeleton['Skeleton'/13632392, l='MpServer', x=1118.50, y=13.00, z=-650.34], FCEntitySkeleton['Skeleton'/13632394, l='MpServer', x=1153.66, y=41.00, z=-656.16], FCEntitySkeleton['Skeleton'/13632395, l='MpServer', x=1151.72, y=41.00, z=-668.66], FCEntitySkeleton['Skeleton'/13632396, l='MpServer', x=1155.34, y=41.00, z=-676.63], FCEntityBat['Bat'/13610384, l='MpServer', x=1089.75, y=41.10, z=-664.25], FCEntitySquid['Squid'/13607599, l='MpServer', x=1030.08, y=61.67, z=-709.98], FCEntitySquid['Squid'/13607597, l='MpServer', x=1031.53, y=62.00, z=-706.47], FCEntitySpider['Spider'/13617570, l='MpServer', x=1079.25, y=51.00, z=-662.00], FCEntitySkeleton['Skeleton'/13632675, l='MpServer', x=1069.53, y=24.00, z=-628.69], FCEntityZombie['Zombie'/13632676, l='MpServer', x=1067.50, y=23.00, z=-632.38], FCEntitySkeleton['Skeleton'/13631655, l='MpServer', x=1062.72, y=19.00, z=-702.50], bfk['Craten'/13606728, l='MpServer', x=1044.66, y=62.50, z=-701.78], FCEntitySpider['Spider'/13630028, l='MpServer', x=1092.50, y=25.00, z=-594.50], bfk['Craten'/13606728, l='MpServer', x=1044.66, y=62.50, z=-701.78], FCEntityBat['Bat'/13633627, l='MpServer', x=1020.30, y=50.81, z=-720.39], FCEntityZombie['Zombie'/13604675, l='MpServer', x=1123.66, y=41.00, z=-684.35], FCEntityWindMill['entity.WindMill.name'/13604702, l='MpServer', x=1047.50, y=74.50, z=-708.50], rj['entity.MinecartChest.name'/13604701, l='MpServer', x=1046.50, y=22.34, z=-720.50], FCEntityZombie['Zombie'/13631069, l='MpServer', x=1140.28, y=23.00, z=-650.66], FCEntityCreeper['Creeper'/13631068, l='MpServer', x=1155.65, y=24.00, z=-650.92], FCEntityZombie['Zombie'/13604696, l='MpServer', x=1021.47, y=11.00, z=-711.50], FCEntityZombie['Zombie'/13631063, l='MpServer', x=1104.44, y=22.00, z=-715.38], FCEntitySquid['Squid'/13604694, l='MpServer', x=1037.53, y=62.00, z=-709.47], FCEntityBat['Bat'/13631821, l='MpServer', x=1087.41, y=27.55, z=-731.47], FCEntityBat['Bat'/13631822, l='MpServer', x=1080.29, y=25.35, z=-733.29], FCEntitySpider['Spider'/13632590, l='MpServer', x=1105.28, y=39.41, z=-688.39], rj['entity.MinecartChest.name'/13604719, l='MpServer', x=1116.50, y=23.34, z=-633.31], rh['item.item.fcItemArrowRotten'/13629295, l='MpServer', x=1089.78, y=30.13, z=-685.81], FCEntityZombie['Zombie'/13604718, l='MpServer', x=1083.38, y=16.00, z=-649.47], FCEntityZombie['Zombie'/13604717, l='MpServer', x=1107.31, y=40.00, z=-701.69], FCEntityEnderman['Enderman'/13633138, l='MpServer', x=1151.50, y=29.00, z=-629.50], FCEntityEnderman['Enderman'/13633139, l='MpServer', x=1154.13, y=29.00, z=-624.66], FCEntityCreeper['Creeper'/13633140, l='MpServer', x=1148.69, y=29.00, z=-625.47], FCEntityWindMill['entity.WindMill.name'/13604714, l='MpServer', x=1093.50, y=82.50, z=-668.50], FCEntityWindMill['entity.WindMill.name'/13604713, l='MpServer', x=1102.50, y=79.50, z=-687.50], rj['entity.MinecartChest.name'/13604712, l='MpServer', x=1091.50, y=42.34, z=-708.50], rj['entity.MinecartChest.name'/13604711, l='MpServer', x=1084.50, y=26.34, z=-718.59], rj['entity.MinecartChest.name'/13604710, l='MpServer', x=1074.50, y=8.34, z=-729.50], rj['entity.MinecartChest.name'/13604709, l='MpServer', x=1080.50, y=18.34, z=-746.50], rj['entity.MinecartChest.name'/13604708, l='MpServer', x=1065.50, y=17.34, z=-732.50], bdv['Nyoike'/13604674, l='MpServer', x=1090.96, y=71.62, z=-667.08], FCEntitySkeleton['Skeleton'/13632383, l='MpServer', x=1102.21, y=39.00, z=-686.53], FCEntitySkeleton['Skeleton'/13629821, l='MpServer', x=1141.53, y=23.00, z=-656.50], FCEntitySkeleton['Skeleton'/13631354, l='MpServer', x=1113.46, y=17.00, z=-723.53], FCEntityWindMill['entity.WindMill.name'/13604702, l='MpServer', x=1047.50, y=74.50, z=-708.50], FCEntityCreeper['Creeper'/13629304, l='MpServer', x=1105.41, y=41.00, z=-682.72], rj['entity.MinecartChest.name'/13604726, l='MpServer', x=1172.50, y=49.50, z=-680.50], FCEntityWindMill['entity.WindMill.name'/13604714, l='MpServer', x=1093.50, y=82.50, z=-668.50], FCEntityWindMill['entity.WindMill.name'/13604713, l='MpServer', x=1102.50, y=79.50, z=-687.50], FCEntityZombie['Zombie'/13604724, l='MpServer', x=1152.47, y=27.00, z=-667.66], rj['entity.MinecartChest.name'/13604723, l='MpServer', x=1155.50, y=30.34, z=-656.75], rj['entity.MinecartChest.name'/13604722, l='MpServer', x=1154.50, y=42.34, z=-688.50], rj['entity.MinecartChest.name'/13604721, l='MpServer', x=1137.59, y=23.34, z=-650.50], rh['item.item.bone'/13629297, l='MpServer', x=1088.81, y=30.13, z=-685.81], FCEntityCreeper['Creeper'/13633134, l='MpServer', x=1051.51, y=15.63, z=-638.45], FCEntityZombie['Zombie'/13633135, l='MpServer', x=1051.88, y=13.00, z=-636.41], rj['entity.MinecartChest.name'/13604720, l='MpServer', x=1124.47, y=22.50, z=-611.50], FCEntityZombie['Zombie'/13630983, l='MpServer', x=1076.50, y=51.00, z=-670.31], FCEntitySkeleton['Skeleton'/13630982, l='MpServer', x=1083.48, y=47.73, z=-663.07], FCEntitySkeleton['Skeleton'/13630981, l='MpServer', x=1063.50, y=52.00, z=-664.66], FCEntityZombie['Zombie'/13630980, l='MpServer', x=1063.50, y=48.00, z=-668.78], FCEntityBat['Bat'/13627933, l='MpServer', x=1093.75, y=41.10, z=-669.25], FCEntityCreeper['Creeper'/13631490, l='MpServer', x=1020.44, y=41.00, z=-732.50], FCEntityZombie['Zombie'/13632002, l='MpServer', x=1103.69, y=43.00, z=-589.75], FCEntitySkeleton['Skeleton'/13632003, l='MpServer', x=1105.69, y=45.00, z=-595.69], FCEntityBat['Bat'/13627929, l='MpServer', x=1107.75, y=46.10, z=-687.25], FCEntityEnderman['Enderman'/13633548, l='MpServer', x=1070.97, y=65.00, z=-607.53], FCEntityCreeper['Creeper'/13629970, l='MpServer', x=1074.70, y=32.00, z=-659.70], FCEntityCreeper['Creeper'/13631013, l='MpServer', x=1142.63, y=33.00, z=-739.50], FCEntitySkeleton['Skeleton'/13633343, l='MpServer', x=1079.37, y=26.00, z=-739.05], FCEntityBat['Bat'/13622068, l='MpServer', x=1111.75, y=44.10, z=-693.25]]
Retry entities: 0 total; []
Stacktrace:
at bds.a(WorldClient.java:460)
at net.minecraft.client.Minecraft.b(Minecraft.java:2463)
at net.minecraft.client.Minecraft.run(Minecraft.java:777)
at java.lang.Thread.run(Unknown Source)

-- System Details --
Details:
Minecraft Version: 1.5.2
Operating System: Windows 10 (amd64) version 10.0
Java Version: 1.8.0_191, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 1376032984 bytes (1312 MB) / 2100822016 bytes (2003 MB) up to 2100822016 bytes (2003 MB)
JVM Flags: 3 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xms2048m -Xmx2048m
AABB Pool Size: 2183 (122248 bytes; 0 MB) allocated, 1334 (74704 bytes; 0 MB) used
Suspicious classes: FCBlockFullBlock, FCBlockStone, FCBlockPlanks, ...[net.minecraft.Launcher], [org.multimc.EntryPoint, ParseException, Launcher, ...], [org.multimc.onesix.OneSixLauncher]
IntCache: cache: 0, tcache: 0, allocated: 3, tallocated: 63
LWJGL: 2.9.0
OpenGL: GeForce GTX 1070 Ti/PCIe/SSE2 GL version 4.6.0 NVIDIA 416.34, NVIDIA Corporation
Is Modded: Very likely; Jar signature invalidated
Type: Client (map_client.txt)
Texture Pack: BUILD_Better_than_Noise.zip
Profiler Position: N/A (disabled)
Vec3 Pool Size: 1557 (87192 bytes; 0 MB) allocated, 256 (14336 bytes; 0 MB) used
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: Piston causing Array-out-of-bounds on Plank

Post by FlowerChild »

Looking into it. I think I have an idea of what's happening. It would be easy enough to prevent the specific case, but I suspect it might be symptomatic of a larger problem.
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: Piston causing Array-out-of-bounds on Plank

Post by FlowerChild »

No, my hunch wasn't accurate. I just spent a bunch of time digging into the related code and running various tests, and it all seems fine.

If other players can walk up to that thing and hang out in the area without a crash then I am fairly certain it's a problem with your specific install. Please get back to me on it, and ask for help in tech support before reporting bugs in the future.
User avatar
dawnraider
Posts: 1876
Joined: Sun Dec 11, 2011 7:00 pm

Re: Piston causing Array-out-of-bounds on Plank

Post by dawnraider »

I can confirm that I have had this issue myself. I thought it was an issue with the deco addon because I never was able to reproduce it with vanilla or BTW blocks, but that was likely due to its sporadic nature. I will make note that I've only had it happen while taking screenshots (I had it happen 3 times while taking screenshots of my urn spinner).
Come join us on discord! https://discord.gg/fhMK5kx
Get the Deco Addon here!
Get the Better Terrain Addon here!
Get the Vanilla Mix TP here!
Get the Conquest TP here!
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: Piston causing Array-out-of-bounds on Plank

Post by FlowerChild »

After this gnawing at the back of my head overnight, I decided to add a sanity check to the piston rendering code to prevent this kind of thing happening. It doesn't look like it should be possible, but I noticed the vanilla plank code had a check to verify the texture index isn't out of bounds, which suggests to me that Mojang might have run into this at one point too and put that bandaid over it.

I'm generally not into extraneous sanity checks in rendering code given they tend to get called thousands+ of times per frame (a lot of the optimizations I've performed for BTW have involved stripping out a lot of unnecessary conditionals in the rendering code), but given I can isolate it specifically to piston rendering, given there don't tend to be a shit-ton of moving pistons being rendered at a time, given I don't trust the piston code all that much in the first place, and given I REALLY don't want to go through all the piston code line by line to sort this out, I figure it's a reasonable compromise.

Anyways, should be utterly impossible for it to happen as of next release, so I'm going to close this down as "fixed".

@dawnraider: Actually, that makes some sense. I think I only recently moved the plank code over to BTW specific code with the safeties removed. I don't tend to use such metadata dependent texture arrays in the mod blocks, so no reason it would have happened with them either. I assume Deco must be doing something similar, but what I describe above should just make it a non-issue for all blocks, regardless of where they come from.

From what you're saying it sounds like it's probably a long standing vanilla issue that just got plastered over with individual sanity checks in the blocks that suffered from it.
Locked