IntellectualSites / IntellectualSites/FastAsyncWorldEdit

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

Open
#2,494 10 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.20.2

Describe the bug

When this player joins the server this error is printed:

[09:42:01 INFO]: UUID of player yefreitor is f7c78a7c-f655-44e6-a40b-5ea36782c1f1
[09:42:01 WARN]: java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
[09:42:01 WARN]:        at java.base/jdk.internal.util.Preconditions$1.apply(Preconditions.java:55)
[09:42:01 WARN]:        at java.base/jdk.internal.util.Preconditions$1.apply(Preconditions.java:52)
[09:42:01 WARN]:        at java.base/jdk.internal.util.Preconditions$4.apply(Preconditions.java:213)
[09:42:01 WARN]:        at java.base/jdk.internal.util.Preconditions$4.apply(Preconditions.java:210)
[09:42:01 WARN]:        at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:98)
[09:42:01 WARN]:        at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106)
[09:42:01 WARN]:        at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302)
[09:42:01 WARN]:        at java.base/java.lang.String.checkIndex(String.java:4575)
[09:42:01 WARN]:        at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:46)
[09:42:01 WARN]:        at java.base/java.lang.String.charAt(String.java:1535)
[09:42:01 WARN]:        at FastAsyncWorldEdit-Bukkit-2.8.2.jar//com.sk89q.worldedit.world.entity.EntityTypes.convertEntityId(EntityTypes.java:472)
[09:42:01 WARN]:        at FastAsyncWorldEdit-Bukkit-2.8.2.jar//com.sk89q.worldedit.world.entity.EntityTypes.parse(EntityTypes.java:481)
[09:42:01 WARN]:        at FastAsyncWorldEdit-Bukkit-2.8.2.jar//com.sk89q.worldedit.entity.BaseEntity.<init>(BaseEntity.java:118)
[09:42:01 WARN]:        at FastAsyncWorldEdit-Bukkit-2.8.2.jar//com.fastasyncworldedit.core.extent.clipboard.DiskOptimizedClipboard.loadNBTFromFileFooter(DiskOptimizedClipboard.java:270)
[09:42:01 WARN]:        at FastAsyncWorldEdit-Bukkit-2.8.2.jar//com.fastasyncworldedit.core.extent.clipboard.DiskOptimizedClipboard.<init>(DiskOptimizedClipboard.java:198)
[09:42:01 WARN]:        at FastAsyncWorldEdit-Bukkit-2.8.2.jar//com.fastasyncworldedit.core.extent.clipboard.DiskOptimizedClipboard.<init>(DiskOptimizedClipboard.java:167)
[09:42:01 WARN]:        at FastAsyncWorldEdit-Bukkit-2.8.2.jar//com.fastasyncworldedit.core.extent.clipboard.DiskOptimizedClipboard.loadFromFile(DiskOptimizedClipboard.java:223)
[09:42:01 WARN]:        at FastAsyncWorldEdit-Bukkit-2.8.2.jar//com.sk89q.worldedit.LocalSession.lambda$loadClipboardFromDisk$1(LocalSession.java:921)
[09:42:01 WARN]:        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
[09:42:01 WARN]:        at FastAsyncWorldEdit-Bukkit-2.8.2.jar//com.fastasyncworldedit.core.util.task.KeyQueuedExecutorService$KeyRunner.lambda$run$0(KeyQueuedExecutorService.java:150)
[09:42:01 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
[09:42:01 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[09:42:01 WARN]:        at java.base/java.lang.Thread.run(Thread.java:1623)
[09:42:01 INFO]: yefreitor[/*:54562] logged in with entity id 3161 at ([plotworld]-2090.565644499244, 68.49120751720224, -37060.77915434401)
To Reproduce
  1. Not sure
Expected behaviour

No error in console

Screenshots / Videos

No response

Error log (if applicable)

No response

Fawe Debugpaste

https://athion.net/ISPaster/paste/view/d3dcbe34a5a2403cb2fe8a94deac18fc

Fawe Version

FastAsyncWorldEdit-Bukkit-2.8.2.jar

Checklist
Anything else?

No response

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 with EntityTypes.convertEntityId and parse in the stack trace, then follow the call from BaseEntity through DiskOptimizedClipboard.loadNBTFromFileFooter and LocalSession.loadClipboardFromDisk. Use the linked FAWE debugpaste and the reported join-time clipboard-loading path to identify the empty value; done means the join no longer logs this exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.