Thutmose / Pokecube

Primary Development has moved to: https://github.com/Pokecube-Development
https://github.com/Pokecube-Development
19 stars 7 forks source link

Crash: Ticking entity - IllegalAccessError [Forge 2705] #306

Closed luke-bravenboer closed 6 years ago

luke-bravenboer commented 6 years ago

Description:

Game crashed while it was just idling, with the following exception:

java.lang.IllegalAccessError: tried to access field net.minecraft.entity.Entity.field_145783_c from class pokecube.core.ai.thread.logicRunnables.LogicMiscUpdate
    at pokecube.core.ai.thread.logicRunnables.LogicMiscUpdate.doServerTick(LogicMiscUpdate.java:111)

Full crash log here: https://paste.dimdev.org/kupunanicu.mccrash

Tried to search for similar issues, and I noticed that other reported instances of IllegalAccessErrors seemed to be caused by specific forge versions; I had version 2705 when the crash occurred, do you think there's an issue with that?

I've now updated forge to 14.23.4.2738, will let you know whether the issue occurs again. affects forge 2738 too.

Update: easiest way to replicate the issue is to simply defeat any wild pokemob in battle- game crashes instantly.


Versions:

luke-bravenboer commented 6 years ago

(Confirmed crash still occurring on forge 2738)

luke-bravenboer commented 6 years ago

Judging by the source at LogicMiscUpdate.java:111, it appears to be coming from the 'entity.getAttackTarget().entityId': my first guess was that it may have been a mod incompatibility with some other mob's entityId not being registered correctly or something, so I disabled all mob spawning aside from Pokemobs, killed all entities, but the crash still occurs frequently (once every 2 or 3 minutes)

luke-bravenboer commented 6 years ago

After further testing, I've noticed that it causes missingnos to appear (or rather, presumably, corrupts the entity that the crash originated from into a missingno?)

I'm also fairly confident that it only actually occurs during chunk generation- generating new terrain allows me to quickly replicate the bug, within a matter of minutes, but after generating all the nearby terrain & sitting around, I'm yet to experience it again. E: nvm that was totally a red herring, it's probably actually just when the pokemob itself spawns (I've disabled culling so I just wasn't often getting new spawns when standing still) Trying to narrow down any other potential causes (it's currently occurring in a Lost Cities world, with Recurrent Complex also adding lots of world-gen, as well as the occasional AE2 meteor- not sure what else might be at play)

luke-bravenboer commented 6 years ago

Update: just got the crash with Pokecube isolated on its own. Turns out it's really easy to replicate, too- all you need to do is defeat one pokemob in battle, and the game immediately crashes.

Hopefully that means it shouldn't be hard to track down...

Thutmose commented 6 years ago

Finally had time to look into it, I got it fixed, update 6.37.4 should fix it, whenever it is available on curseforge

luke-bravenboer commented 6 years ago

Nice one :)