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

Fix null or empty handling in LegacyResourcepackHandler #1331

Merged
merged 1 commit into from
May 28, 2024

Conversation

R00tB33rMan
Copy link
Contributor

@R00tB33rMan R00tB33rMan commented May 26, 2024

I've been running this patch safely on production without any issues for over two weeks.

Fixes the following errors:

[19:58:23 ERROR]: Exception while handling resource pack send for com.velocitypowered.proxy.connection.MinecraftConnection@2aa69008
java.util.concurrent.CompletionException: java.lang.NullPointerException
        at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) ~[?:?]
        at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) ~[?:?]
        at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:722) ~[?:?]
        at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?]
        at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173) ~[velocity.jar:3.3.0-SNAPSHOT (git-1ae611b5)]
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166) ~[velocity.jar:3.3.0-SNAPSHOT (git-1ae611b5)]
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[velocity.jar:3.3.0-SNAPSHOT (git-1ae611b5)]
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:405) ~[velocity.jar:3.3.0-SNAPSHOT (git-1ae611b5)]
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[velocity.jar:3.3.0-SNAPSHOT (git-1ae611b5)]
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[velocity.jar:3.3.0-SNAPSHOT (git-1ae611b5)]
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[velocity.jar:3.3.0-SNAPSHOT (git-1ae611b5)]
        at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
Caused by: java.lang.NullPointerException

and


[10:35:47 ERROR]: Exception while handling resource pack send for com.velocitypowered.proxy.connection.MinecraftConnection@3bd98dbe
java.util.concurrent.CompletionException: java.lang.NullPointerException: Cannot read the array length because "bytes" is null

(plus its extension)

@R00tB33rMan R00tB33rMan changed the title Fix null or empty has handling in LegacyResourcepackHandler Fix null or empty handling in LegacyResourcepackHandler May 26, 2024
@electronicboy electronicboy merged commit 1c36b66 into PaperMC:dev/3.0.0 May 28, 2024
1 check passed
@R00tB33rMan R00tB33rMan deleted the hash-handling branch May 28, 2024 14:38
qyl27 pushed a commit to MeowCraftMC/Velocity that referenced this pull request Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants