Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ticking entity null pointer exception #1032

Closed
DLemberg opened this issue Feb 6, 2015 · 17 comments
Closed

Ticking entity null pointer exception #1032

DLemberg opened this issue Feb 6, 2015 · 17 comments

Comments

@DLemberg
Copy link

DLemberg commented Feb 6, 2015

I'm seeing periodic crashes on a 1.7.10 server with Forge 1286 and Java 1.8 due to an Ars Magica 2 Dark Mage. Error message is always the same - a null pointer exception from a ticking entity, and the entity is always a Dark Mage. I've been working around it by restarting the server in peaceful mode, then bringing it down and bringing it back up in normal. Log is below. I've got a snapshot of the world, mods, and configs with the error so that it crashes on startup if it is helpful, but the snapshot is 90 megs compressed.

---- Minecraft Crash Report ----
// This doesn't make any sense!

Time: 2/6/15 8:19 AM
Description: Ticking entity

java.lang.NullPointerException: Ticking entity
at net.minecraft.entity.ai.EntityLookHelper.func_75651_a(SourceFile:18)
at net.minecraft.entity.ai.EntityAIAttackOnCollide.func_75246_d(EntityAIAttackOnCollide.java:93)
at net.minecraft.entity.ai.EntityAITasks.func_75774_a(SourceFile:103)
at net.minecraft.entity.EntityLiving.func_70619_bc(EntityLiving.java:540)
at net.minecraft.entity.EntityLivingBase.func_70636_d(EntityLivingBase.java:1774)
at net.minecraft.entity.EntityLiving.func_70636_d(EntityLiving.java:367)
at net.minecraft.entity.monster.EntityMob.func_70636_d(SourceFile:25)
at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:1611)
at net.minecraft.entity.EntityLiving.func_70071_h_(EntityLiving.java:206)
at net.minecraft.entity.monster.EntityMob.func_70071_h_(SourceFile:30)
at net.minecraft.world.World.func_72866_a(World.java:2070)
at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:648)
at net.minecraft.world.World.func_72870_g(World.java:2034)
at net.minecraft.world.World.func_72939_s(World.java:1887)
at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:489)
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:636)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547)
at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:111)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685)

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

-- Head --
Stacktrace:
at net.minecraft.entity.ai.EntityLookHelper.func_75651_a(SourceFile:18)
at net.minecraft.entity.ai.EntityAIAttackOnCollide.func_75246_d(EntityAIAttackOnCollide.java:93)
at net.minecraft.entity.ai.EntityAITasks.func_75774_a(SourceFile:103)
at net.minecraft.entity.EntityLiving.func_70619_bc(EntityLiving.java:540)
at net.minecraft.entity.EntityLivingBase.func_70636_d(EntityLivingBase.java:1774)
at net.minecraft.entity.EntityLiving.func_70636_d(EntityLiving.java:367)
at net.minecraft.entity.monster.EntityMob.func_70636_d(SourceFile:25)
at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:1611)
at net.minecraft.entity.EntityLiving.func_70071_h_(EntityLiving.java:206)
at net.minecraft.entity.monster.EntityMob.func_70071_h_(SourceFile:30)
at net.minecraft.world.World.func_72866_a(World.java:2070)
at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:648)
at net.minecraft.world.World.func_72870_g(World.java:2034)

-- Entity being ticked --
Details:
Entity Type: arsmagica2.MobDarkMage (am2.entities.EntityDarkMage)
Entity ID: 84
Entity Name: Dark Mage
Entity's Exact location: -84.50, 67.00, 960.23
Entity's Block location: World: (-85,67,960), Chunk: (at 11,4,0 in -6,60; contains blocks -96,0,960 to -81,255,975), Region: (-1,1; contains chunks -32,32 to -1,63, blocks -512,0,512 to -1,255,1023)
Entity's Momentum: 0.00, -0.08, 0.00
Stacktrace:
at net.minecraft.world.World.func_72939_s(World.java:1887)
at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:489)

-- Affected level --
Details:
Level name: world
All players: 1 total; [EntityPlayerMP['danlemberg'/165, l='world', x=-164.86, y=78.00, z=973.40]]
Chunk stats: ServerChunkCache: 999 Drop: 0
Level seed: 5089460919707135225
Level generator: ID 04 - BIOMESOP, ver 0. Features enabled: true
Level generator options:
Level spawn location: World: (44,64,1020), Chunk: (at 12,4,12 in 2,63; contains blocks 32,0,1008 to 47,255,1023), Region: (0,1; contains chunks 0,32 to 31,63, blocks 0,0,512 to 511,255,1023)
Level time: 1415024 game time, 1415024 day time
Level dimension: 0
Level storage version: 0x04ABD - Anvil
Level weather: Rain time: 23992 (now: false), thunder time: 93657 (now: false)
Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
Stacktrace:
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:636)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547)
at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:111)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685)

-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.8.0_25, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 293894064 bytes (280 MB) / 806354944 bytes (769 MB) up to 1060372480 bytes (1011 MB)
JVM Flags: 6 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 95
FML: MCP v9.05 FML v7.10.85.1286 Minecraft Forge 10.13.2.1286 37 mods loaded, 37 mods active
mcp{9.05} Minecraft Coder Pack Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
FML{7.10.85.1286} Forge Mod Loader Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Forge{10.13.2.1286} Minecraft Forge Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
CodeChickenCore{1.0.4.35} CodeChicken Core Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
NotEnoughItems{1.0.4.83} Not Enough Items Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
bspkrsCore{6.15} bspkrsCore Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Treecapitator{1.7.10} Treecapitator Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
AnimationAPI{1.2.4} AnimationAPI Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
arsmagica2{1.4.0.005} Ars Magica 2 Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
AncientWarfare{2.4.83-beta-MC1.7.10} Ancient Warfare Core Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
AncientWarfareAutomation{2.4.83-beta-MC1.7.10} Ancient Warfare Automation Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
AncientWarfareNEIPlugin{2.4.83-beta-MC1.7.10} Ancient Warfare NEI Plugin Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
AncientWarfareNpc{2.4.83-beta-MC1.7.10} Ancient Warfare NPCs Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
AncientWarfareStructure{2.4.83-beta-MC1.7.10} Ancient Warfare Structures Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
AncientWarfareVehicle{2.4.83-beta-MC1.7.10} Ancient Warfare Vehicles Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
AppleCore{1.0.2} AppleCore Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Mantle{1.7.10-0.3.2.jenkins184} Mantle Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Natura{2.2.0} Natura Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
BiomesOPlenty{2.1.0} Biomes O' Plenty Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
AWWayofTime{v1.3.0a} Blood Magic: Alchemical Wizardry Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
chocolateQuest{0.0} Chocolate Quest Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
props{1.11} Decocraft Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
eplus{3.0.2-d} Enchanting Plus Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
IguanaTweaks{1.7.10-Beta-19} Iguana Tweaks Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
IronChest{6.0.62.742} Iron Chest Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Waila{1.5.8} Waila Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
JABBA{1.2.0a} JABBA Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
journeymap{5.0.1} JourneyMap Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
radixcore{1.3.4} RadixCore Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
mca{4.1.5} Minecraft Comes Alive Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
MutantCreatures{1.4.8} Mutant Creatures Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Roguelike{1.3.5} Roguelike Dungeons Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
supercraftingframe{1.7.10.2} Super Crafting Frame Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
TwilightForest{2.3.2} The Twilight Forest Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
chunkbase_villageinfo_ssp{2.1} Village Info (SSP) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
WailaHarvestability{1.1.1} Waila Harvestability Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
witchery{0.22.0} Witchery Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Mantle Environment: Environment healthy.
Profiler Position: N/A (disabled)
Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Player Count: 1 / 8; [EntityPlayerMP['danlemberg'/165, l='world', x=-164.86, y=78.00, z=973.40]]
Type: Integrated Server (map_client.txt)
Is Modded: Definitely; Client brand changed to 'fml,forge'

@Mithion
Copy link
Owner

Mithion commented Feb 6, 2015

Is the dark mage a summon or a naturally spawning one?
If you remove all mods but AM2, does the issue persist?

I can't download the snapshot world for a while yet (limited bandwidth while traveling).

@DLemberg
Copy link
Author

DLemberg commented Feb 6, 2015

Hey Mithion, it is a naturally spawning dark mage.

I can try removing all mods other than Biomes of Plenty and see if that
does the trick - I'll have to do that when I get home.

I actually suspect Biomes of Plenty though! Last play through with the
same mods but NOT BoP we didn't run into this.

On Fri, Feb 6, 2015 at 9:14 AM, Mithion notifications@github.com wrote:

Is the dark mage a summon or a naturally spawning one?
If you remove all mods but AM2, does the issue persist?

I can't download the snapshot world for a while yet (limited bandwidth
while traveling).


Reply to this email directly or view it on GitHub
#1032 (comment).

@DLemberg
Copy link
Author

DLemberg commented Feb 7, 2015

I've isolated the issue. It is a compatibility issue with Minecraft Comes Alive.

If you have no other mods installed other than Ars Magica 2 and MCA (plus their two dependencies, RadixCore and Animation API), and you start a new world, find a village with MCA guards, and use a dark mage egg to spawn a dark mage, the guards will attack the dark mage.

As soon as the dark mage tries to strike the guard back, the game crashes with the ticking entity null pointer exception.

@Mithion
Copy link
Owner

Mithion commented Feb 8, 2015

Interesting. I'd try reporting this to the MCA devs...mainly because dark mages don't have an EntityAIAttackOnCollide task. Which means it might be on their end.

I'll take a quick look on this end too and see if it's related to something I am doing.

@WildBamaBoy
Copy link

This along with other crash issues relating to Ars Magica is fixed in MCA 5.0.0. Nothing @Mithion needs to look in to.

@DLemberg
Copy link
Author

Closing since it was fixed in MCA

@vagaprime
Copy link

Problem seems to be back

MageTech-gate/Dev-Builds#1

@WildBamaBoy
Copy link

-- Entity being ticked --
Details:
Entity Type: Zombie (net.minecraft.entity.monster.EntityZombie)
Entity ID: 129784
Entity Name: Zombie

Neither an AM2 nor an MCA mob is being ticked. It's caused by a regular Minecraft zombie.

@vagaprime
Copy link

Ah. I only posted here since most of my searches keep pointing me back here. I guess i will keep digging into it.

@securitypedant
Copy link

@vagaprime I also have a very similar crash, here is the pastebin...

http://pastebin.com/5VYVYyks

Are you still seeing this crash? Want to work together to diagnose what mod might be causing it?

I'm thinking I need to examine code for both Extends EntityZombie and EntityConstructingEvent's with Zombie modifiers.

@SvEgiiVEteR
Copy link

I have also been 2 times.
http://hastebin.com/zoturidimo.md
usually, when I open LAN

@vagaprime
Copy link

From what I have manged to dig up in more searches and spending several hours reading the crash log that yampst gave me, and doing more google searches it seems the problem has something to do with using charm on a hostile mob At least that seems to be the cause of the problem when it deals with the zombie.

@jjtParadox
Copy link
Contributor

That actually rings a bell for me... A friend of mine was trying to use charm on a mob so he could do more damage with a certain spell. 99% of the time the spell would happen just fine, but 1% of the time a random crash would happen. I even remember seeing EntityLookHelper in the logs, but thought it was just caused by the SpecialAI mod we had installed. So this is happening with just AM2?

@cocopuffs99
Copy link

cocopuffs99 commented Sep 1, 2016

MCA hasn't fixed it yet (MCA 5.2.2). Getting the same problem (with any Zombie, this is not a AM2 problem but nevertheless posting the solution here because this is the most popular site where people will look for answers:

SOLUTION:
Go to MCA.config:
"True if villagers and your children have a chance of being infected from zombies.
B:"Enable infection?"=true"

Set Enable infection to false.

Problem fixed.
Ref: http://www.minecraftforum.net/forums/support/server-support/2673371-ticking-entity-server-crash-if-someone-could-read
Go to Post #4 (PrinceRomeo posted the original solution here).

Would be good if someone can cross-post this to MCA, so they can open the issue again and fix it. If not, in the meantime change MCA config.

@Robijnvogel
Copy link

So what I am wondering about is if the crash where a Zombie attacks an MCA only happens when Ars Magica is installed.
I have experienced both variants in the last two hours.
In case of the Zombie, I thought that this was just a case in which things go wrong once every so often. I restarted the server and it did not crash. As such, I destroyed the data I needed to find out any more about the crash.
In case of the Dark Mage, I have been able to confirm that there are / were several infected MCA villagers around it, however there was no Entity within 3 blocks of the Mage, so... I don't know why EntityAIAttackOnCollide was even used there. Maybe a Villager died to the Dark Mage and then didn't inform the Dark Mage Entity about this?

@Robijnvogel
Copy link

@WildBamaBoy
https://github.com/WildBamaBoy/minecraft-comes-alive/blob/df2791130ba5956791b07fba765d3a23d59d6301/src/main/java/mca/core/forge/EventHooksForge.java#L368

Hmm... I'm going to build a test version to see if "de-agroing" the mob there will stop these crashes.

@Robijnvogel
Copy link

Robijnvogel commented Aug 19, 2018

^ I am pretty sure that the problem here is that there's multiple mobs attacking the MCA Villager as it gets infected.
And you are only resetting the target of the mob that last hit it, the Zombie causing the infection.

EDIT: I have taken a closer look at the code now and I have tested some more.
Apparently the crash still can happen if you put the MCA villager in a 1x1 room with only one zombie. It's just way less likely. I tried about 15 times and then it crashed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants