Jump to content

[SOLVED][1.7.10]Entity stops server?


Nimbleguy

Recommended Posts

Whenever my custom boss uses one of it's attacks, it stops the internal server. The client is still working, though, and when I exit game it never saves properly.

 

EntityGlitch:

https://github.com/Nimbleguy/The-Void/blob/dev/aj/Java/Nullvoid/Entity/EntityGlitch.java

GlitchReach(The attack that I think is crashing):

https://github.com/Nimbleguy/The-Void/blob/dev/aj/Java/Nullvoid/Entity/Attack/GlitchReach.java

 

It uses the attack, then after a second the server stops. Nothing appears in the logs, but particle packets stop being sent, chat won't work, and nothing moves.

Link to comment
Share on other sites

Make a breakpoint at the first line of the use() method and run MC in debug mode. When it reaches the breakpoint, step forward each line until it stops working.

Debug mode is one of the most powerful tools you can get with an IDE and you should always use it whenever something is not entirely obvious.

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Link to comment
Share on other sites

After further investigation, it seems like it is GlitchCorrupt that might be doing it.

https://github.com/Nimbleguy/The-Void/blob/dev/aj/Java/Nullvoid/Entity/Attack/GlitchCorrupt.java

 

When GlitchCorrupt is called, it does not teleport to the target's location. I think the server-crash might be causing that.

 

There are also a few more problems that if I don't figure out I will put in another thread.

 

It keeps sysouting, but the symptoms I described still happens. It seems like onLivingUpdate stops being called.

I will try using breakpoints for it, but from my testing it stops right when GlitchCorrupt is called.

Link to comment
Share on other sites

I tested on a dedicated server. It seems like it only freezes the server, not crash. I cannot connect back to the server when I test it. What I think is happening is the main thread gets in an infinite loop. Debug says that the thread is still running when on client. Not sure on server.

Any help?

Link to comment
Share on other sites

Here is the stack trace:

 

 

Run Client [Java Application]

net.minecraft.launchwrapper.Launch at localhost:55768 (Suspended)

Daemon System Thread [signal Dispatcher] (Suspended)

Daemon System Thread [Finalizer] (Suspended)

waiting for: ReferenceQueue$Lock  (id=173)

Object.wait(long) line: not available [native method]

ReferenceQueue<T>.remove(long) line: 135

ReferenceQueue<T>.remove() line: 151

Finalizer$FinalizerThread.run() line: 189

Daemon System Thread [Reference Handler] (Suspended)

waiting for: Reference$Lock  (id=174)

Object.wait(long) line: not available [native method]

Reference$Lock(Object).wait() line: 503

Reference$ReferenceHandler.run() line: 133

Thread [Client thread] (Suspended)

owns: ContextGL  (id=159)

owns: Object  (id=160)

MacOSXContextImplementation.nSwapBuffers(ByteBuffer) line: not available [native method]

MacOSXContextImplementation.swapBuffers() line: 62

ContextGL.swapBuffers() line: 175

Display$5(DrawableGL).swapBuffers() line: 90

Display.swapBuffers() line: 618

Display.update(boolean) line: 646

Display.update() line: 628

Minecraft.func_147120_f() line: 1144

Minecraft.runGameLoop() line: 1106

Minecraft.run() line: 961

Main.main(String[]) line: 164

NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]

NativeMethodAccessorImpl.invoke(Object, Object[]) line: 57

DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43

Method.invoke(Object, Object...) line: 606

Launch.launch(String[]) line: 134

Launch.main(String[]) line: 28

Daemon Thread [AppKit Thread] (Suspended)

Daemon Thread [snooper Timer] (Suspended)

waiting for: TaskQueue  (id=148)

Object.wait(long) line: not available [native method]

TimerThread.mainLoop() line: 552

TimerThread.run() line: 505

Daemon Thread [Timer hack thread] (Suspended)

Thread.sleep(long) line: not available [native method]

Minecraft$1.run() line: 372

Daemon System Thread [Java2D Disposer] (Suspended)

waiting for: ReferenceQueue$Lock  (id=181)

Object.wait(long) line: not available [native method]

ReferenceQueue<T>.remove(long) line: 135

ReferenceQueue<T>.remove() line: 151

Disposer.run() line: 145

Thread.run() line: 744

Thread [Thread-9] (Suspended)

Thread.sleep(long) line: not available [native method]

CommandThread(SimpleThread).snooze(long) line: 196

CommandThread.run() line: 133

Thread [Thread-10] (Suspended)

Thread.sleep(long) line: not available [native method]

StreamThread(SimpleThread).snooze(long) line: 196

StreamThread.run() line: 206

Daemon Thread [snooper Timer] (Suspended)

waiting for: TaskQueue  (id=146)

Object.wait(long) line: not available [native method]

TimerThread.mainLoop() line: 552

TimerThread.run() line: 505

Thread [server thread] (Suspended)

WorldServer(World).selectEntitiesWithinAABB(Class, AxisAlignedBB, IEntitySelector) line: 3489

WorldServer(World).getEntitiesWithinAABB(Class, AxisAlignedBB) line: 3476

WorldServer(World).findNearestEntityWithinAABB(Class, AxisAlignedBB, Entity) line: 3503

EntityAIWatchClosest.shouldExecute() line: 59

EntityAITasks.onUpdateTasks() line: 84

EntityGlitch(EntityLiving).updateAITasks() line: 613

EntityGlitch(EntityLivingBase).onLivingUpdate() line: 1993

EntityGlitch(EntityLiving).onLivingUpdate() line: 431

EntityGlitch(EntityMob).onLivingUpdate() line: 39

EntityGlitch.onLivingUpdate() line: 177

EntityGlitch(EntityLivingBase).onUpdate() line: 1826

EntityGlitch(EntityLiving).onUpdate() line: 250

EntityGlitch(EntityMob).onUpdate() line: 47

WorldServer(World).updateEntityWithOptionalForce(Entity, boolean) line: 2253

WorldServer.updateEntityWithOptionalForce(Entity, boolean) line: 698

WorldServer(World).updateEntity(Entity) line: 2213

WorldServer(World).updateEntities() line: 2063

WorldServer.updateEntities() line: 529

IntegratedServer(MinecraftServer).updateTimeLightAndEntities() line: 713

IntegratedServer(MinecraftServer).tick() line: 624

IntegratedServer.tick() line: 118

IntegratedServer(MinecraftServer).run() line: 495

MinecraftServer$2.run() line: 762

Daemon Thread [Netty IO #0] (Suspended)

owns: KQueueSelectorImpl  (id=170)

owns: Collections$UnmodifiableSet<E>  (id=171)

owns: SelectedSelectionKeySet  (id=172)

KQueueArrayWrapper.kevent0(int, long, int, long) line: not available [native method]

KQueueArrayWrapper.poll(long) line: 200

KQueueSelectorImpl.doSelect(long) line: 103

KQueueSelectorImpl(SelectorImpl).lockAndDoSelect(long) line: 87

KQueueSelectorImpl(SelectorImpl).select(long) line: 98

NioEventLoop.select() line: 591

NioEventLoop.run() line: 301

SingleThreadEventExecutor$2.run() line: 101

Thread.run() line: 744

Daemon Thread [Netty IO #1] (Suspended)

owns: KQueueSelectorImpl  (id=164)

owns: Collections$UnmodifiableSet<E>  (id=165)

owns: SelectedSelectionKeySet  (id=166)

KQueueArrayWrapper.kevent0(int, long, int, long) line: not available [native method]

KQueueArrayWrapper.poll(long) line: 200

KQueueSelectorImpl.doSelect(long) line: 103

KQueueSelectorImpl(SelectorImpl).lockAndDoSelect(long) line: 87

KQueueSelectorImpl(SelectorImpl).select(long) line: 98

NioEventLoop.select() line: 591

NioEventLoop.run() line: 301

SingleThreadEventExecutor$2.run() line: 101

Thread.run() line: 744

Daemon Thread [Netty Client IO #0] (Suspended)

owns: KQueueSelectorImpl  (id=167)

owns: Collections$UnmodifiableSet<E>  (id=168)

owns: SelectedSelectionKeySet  (id=169)

KQueueArrayWrapper.kevent0(int, long, int, long) line: not available [native method]

KQueueArrayWrapper.poll(long) line: 200

KQueueSelectorImpl.doSelect(long) line: 103

KQueueSelectorImpl(SelectorImpl).lockAndDoSelect(long) line: 87

KQueueSelectorImpl(SelectorImpl).select(long) line: 98

NioEventLoop.select() line: 591

NioEventLoop.run() line: 301

SingleThreadEventExecutor$2.run() line: 101

Thread.run() line: 744

Daemon Thread [Chunk I/O Executor Thread-1] (Suspended)

Unsafe.park(boolean, long) line: not available [native method]

LockSupport.park(Object) line: 186

AbstractQueuedSynchronizer$ConditionObject.await() line: 2043

LinkedBlockingQueue<E>.take() line: 442

ThreadPoolExecutor.getTask() line: 1068

ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker) line: 1130

ThreadPoolExecutor$Worker.run() line: 615

Thread.run() line: 744

/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/bin/java (Jul 19, 2014, 10:42:14 PM)

 

 

 

Ok, I don't even know the cause anymore. The thread seems to be executing perfectly. I checked at multiple times and it was not freezing.

Link to comment
Share on other sites

Hi

 

Hmmm

 

      Thread [server thread] (Suspended)   
         WorldServer(World).selectEntitiesWithinAABB(Class, AxisAlignedBB, IEntitySelector) line: 3489   
         WorldServer(World).getEntitiesWithinAABB(Class, AxisAlignedBB) line: 3476   
         WorldServer(World).findNearestEntityWithinAABB(Class, AxisAlignedBB, Entity) line: 3503   
         EntityAIWatchClosest.shouldExecute() line: 59  
// ... etc //
         EntityGlitch(EntityLivingBase).onLivingUpdate() line: 1993   
         EntityGlitch(EntityLiving).onLivingUpdate() line: 431   
         EntityGlitch(EntityMob).onLivingUpdate() line: 39   
         EntityGlitch.onLivingUpdate() line: 177   
         EntityGlitch(EntityLivingBase).onUpdate() line: 1826   
         EntityGlitch(EntityLiving).onUpdate() line: 250   
         EntityGlitch(EntityMob).onUpdate() line: 47   

The fact that it paused in a method related to your Entity makes me suspicious.  If you pause it several times, is it always in your onUpdate()?

 

-TGG

 

 

 

 

Link to comment
Share on other sites

Yes, it is. In the last few times I paused it, it was on this:

 

 

Thread [server thread] (Suspended)

LongHashMap.getEntry(long) line: 81

LongHashMap.containsItem(long) line: 74

ChunkProviderServer.chunkExists(int, int) line: 70

WorldServer(World).chunkExists(int, int) line: 469

WorldServer(World).selectEntitiesWithinAABB(Class, AxisAlignedBB, IEntitySelector) line: 3491

WorldServer(World).getEntitiesWithinAABB(Class, AxisAlignedBB) line: 3476

WorldServer(World).findNearestEntityWithinAABB(Class, AxisAlignedBB, Entity) line: 3503

EntityAIWatchClosest.shouldExecute() line: 59

EntityAITasks.onUpdateTasks() line: 84

EntityGlitch(EntityLiving).updateAITasks() line: 613

EntityGlitch(EntityLivingBase).onLivingUpdate() line: 1993

EntityGlitch(EntityLiving).onLivingUpdate() line: 431

EntityGlitch(EntityMob).onLivingUpdate() line: 39

EntityGlitch.onLivingUpdate() line: 175

EntityGlitch(EntityLivingBase).onUpdate() line: 1826

EntityGlitch(EntityLiving).onUpdate() line: 250

EntityGlitch(EntityMob).onUpdate() line: 47

WorldServer(World).updateEntityWithOptionalForce(Entity, boolean) line: 2253

WorldServer.updateEntityWithOptionalForce(Entity, boolean) line: 698

WorldServer(World).updateEntity(Entity) line: 2213

WorldServer(World).updateEntities() line: 2063

WorldServer.updateEntities() line: 529

IntegratedServer(MinecraftServer).updateTimeLightAndEntities() line: 713

IntegratedServer(MinecraftServer).tick() line: 624

IntegratedServer.tick() line: 118

IntegratedServer(MinecraftServer).run() line: 495

MinecraftServer$2.run() line: 762

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.