IntellectualSites / IntellectualSites/FastAsyncWorldEdit

Entity in cart crashes move command when moving entities, too

Open
#3,446 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Requires Testing
Dominant language
Java
Stars
806
Forks
394
Avg merge
22h 19m
Merged PRs (30d)
14

Description

Server Implementation

Paper

Server Version

1.21.11

Describe the bug

When attempting to //move a minecart with a entity inside the command crashes on a entity nullpointer

To Reproduce

Get a entity into a cart
attempt to //move -e the selection with the entity inside
cart and entity get separated

Expected behaviour

Cart with entity staying connected and no crash happens

Screenshots / Videos

No response

Error log (if applicable)

[23:23:13 ERROR]: An unexpected error while handling a FastAsyncWorldEdit command
java.lang.NullPointerException: Cannot invoke "org.enginehub.linbus.tree.LinCompoundTag.value()" because the return value of "com.sk89q.worldedit.entity.BaseEntity.getNbt()" is null
at FastAsyncWorldEdit-Paper-2.15.1-SNAPSHOT-1271.jar//com.fastasyncworldedit.core.queue.IChunkExtent.createEntity(IChunkExtent.java:129) ~[?:?]
at FastAsyncWorldEdit-Paper-2.15.1-SNAPSHOT-1271.jar//com.fastasyncworldedit.core.queue.IChunkExtent.createEntity(IChunkExtent.java:123) ~[?:?]
at FastAsyncWorldEdit-Paper-2.15.1-SNAPSHOT-1271.jar//com.fastasyncworldedit.core.extent.PassthroughExtent.createEntity(PassthroughExtent.java:223) ~[?:?]
at FastAsyncWorldEdit-Paper-2.15.1-SNAPSHOT-1271.jar//com.sk89q.worldedit.extent.AbstractDelegateExtent.createEntity(AbstractDelegateExtent.java:143) ~[?:?]
at FastAsyncWorldEdit-Paper-2.15.1-SNAPSHOT-1271.jar//com.sk89q.worldedit.EditSession.createEntity(EditSession.java:4095) ~[?:?]
at FastAsyncWorldEdit-Paper-2.15.1-SNAPSHOT-1271.jar//com.sk89q.worldedit.function.entity.ExtentEntityCopy.apply(ExtentEntityCopy.java:181) ~[?:?]
at FastAsyncWorldEdit-Paper-2.15.1-SNAPSHOT-1271.jar//com.sk89q.worldedit.function.visitor.EntityVisitor.resume(EntityVisitor.java:70) ~[?:?]
at FastAsyncWorldEdit-Paper-2.15.1-SNAPSHOT-1271.jar//com.sk89q.worldedit.function.operation.Operations.completeBlindly(Operations.java:74) ~[?:?]
at FastAsyncWorldEdit-Paper-2.15.1-SNAPSHOT-1271.jar//com.sk89q.worldedit.function.operation.ForwardExtentCopy.resume(ForwardExtentCopy.java:449) ~[?:?]
at FastAsyncWorldEdit-Paper-2.15.1-SNAPSHOT-1271.jar//com.sk89q.worldedit.function.operation.Operations.completeBlindly(Operations.java:74) ~[?:?]
at FastAsyncWorldEdit-Paper-2.15.1-SNAPSHOT-1271.jar//com.sk89q.worldedit.EditSession.moveRegion(EditSession.java:2022) ~[?:?]
at FastAsyncWorldEdit-Paper-2.15.1-SNAPSHOT-1271.jar//com.sk89q.worldedit.command.RegionCommands.move(RegionCommands.java:597) ~[?:?]
at FastAsyncWorldEdit-Paper-2.15.1-SNAPSHOT-1271.jar//com.sk89q.worldedit.command.RegionCommandsRegistration.cmd$_move(RegionCommandsRegistration.java:924) ~[?:?]
at FastAsyncWorldEdit-Paper-2.15.1-SNAPSHOT-1271.jar//org.enginehub.piston.CommandManager.execute(CommandManager.java:157) ~[?:?]
at FastAsyncWorldEdit-Paper-2.15.1-SNAPSHOT-1271.jar//com.sk89q.worldedit.extension.platform.PlatformCommandManager.lambda$handleCommandOnCurrentThread$16(PlatformCommandManager.java:712) ~[?:?]
at FastAsyncWorldEdit-Paper-2.15.1-SNAPSHOT-1271.jar//com.sk89q.worldedit.extension.platform.PlatformCommandManager.handleCommandTask(PlatformCommandManager.java:733) ~[?:?]
at FastAsyncWorldEdit-Paper-2.15.1-SNAPSHOT-1271.jar//com.sk89q.worldedit.extension.platform.PlatformCommandManager.handleCommandOnCurrentThread(PlatformCommandManager.java:714) ~[?:?]
at FastAsyncWorldEdit-Paper-2.15.1-SNAPSHOT-1271.jar//com.sk89q.worldedit.extension.platform.PlatformCommandManager.lambda$handleCommand$14(PlatformCommandManager.java:685) ~[?:?]
at FastAsyncWorldEdit-Paper-2.15.1-SNAPSHOT-1271.jar//com.sk89q.worldedit.extension.platform.AbstractPlayerActor.lambda$runAction$2(AbstractPlayerActor.java:717) ~[?:?]
at FastAsyncWorldEdit-Paper-2.15.1-SNAPSHOT-1271.jar//com.fastasyncworldedit.core.util.task.AsyncNotifyKeyedQueue.lambda$run$0(AsyncNotifyKeyedQueue.java:48) ~[?:?]
at FastAsyncWorldEdit-Paper-2.15.1-SNAPSHOT-1271.jar//com.fastasyncworldedit.core.util.task.AsyncNotifyKeyedQueue.lambda$call$1(AsyncNotifyKeyedQueue.java:58) ~[?:?]
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?]
at FastAsyncWorldEdit-Paper-2.15.1-SNAPSHOT-1271.jar//com.fastasyncworldedit.core.util.task.KeyQueuedExecutorService$KeyRunner.lambda$run$0(KeyQueuedExecutorService.java:150) ~[?:?]
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1423) ~[?:?]
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387) ~[?:?]
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312) ~[?:?]
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843) ~[?:?]
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808) ~[?:?]
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188) ~[?:?]

Fawe Debugpaste

https://athion.net/ISPaster/paste/view/35223b907f5d45919f2b4d943cbb4352

Are you interested in contributing a fix?

No

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at com.fastasyncworldedit.core.queue.IChunkExtent.createEntity, especially line 129, and trace the entity copy path through ExtentEntityCopy and EditSession.moveRegion. Reproduce //move -e with an entity inside a minecart on Paper 1.21.11. Done means the move no longer crashes and the minecart and contained entity remain connected.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.