ProtocolLib

3M Downloads

Cannot invoke "java.lang.Class.getEnumConstantsShared()" because "klass" is null

bridgelol opened this issue ยท 8 comments

commented
  • This issue is not solved in a development build
    Cannot invoke "java.lang.Class.getEnumConstantsShared()" because "klass" is null
    at java.lang.System$2.getEnumConstantsShared(System.java:2371)
    at java.util.EnumSet.getUniverse(EnumSet.java:410)
    at java.util.EnumSet.noneOf(EnumSet.java:113)
    at com.comphenix.protocol.wrappers.EnumWrappers.createEmptyEnumSet(EnumWrappers.java:847)
    at com.comphenix.protocol.events.AbstractStructure.lambda$getPlayerInfoActions$1(AbstractStructure.java:675)
    at com.comphenix.protocol.wrappers.Converters$6.getGeneric(Converters.java:193)
    at com.comphenix.protocol.wrappers.Converters$6.getGeneric(Converters.java:188)
    at com.comphenix.protocol.wrappers.Converters$1.getGeneric(Converters.java:55)
    at com.comphenix.protocol.reflect.StructureModifier.writeInternal(StructureModifier.java:357)
    at com.comphenix.protocol.reflect.StructureModifier.write(StructureModifier.java:321)

Implementation:

Writing to AbstractStructure#getPlayerInfoActions() throws this the first time around for some reason, only does it one-off

5.2.0-SNAPSHOT-679

commented

Issue was also reported here: #2061

commented

does this just happen the first time, or is it seemingly random? would be good to understand specifically how it happens to better fix it

commented

does this just happen the first time, or is it seemingly random? would be good to understand specifically how it happens to better fix it

First time only

commented

which version are you using?

commented

which version are you using?

5.2.0-SNAPSHOT-679

commented

@bridgelol does this still happen on the latest dev build?

commented

@bridgelol does this still happen on the latest dev build?

Seems fine but breaks scoreboard team packet functionality (unless I'm unaware of it changing).

FieldAccessExceptionnetherite
Field index 0 is out of bounds for length 0

at com.comphenix.protocol.reflect.FieldAccessException.fromFormat(FieldAccessException.java:49) at com.comphenix.protocol.reflect.StructureModifier.write(StructureModifier.java:318) at gg.netherite.plugin.paper.protocol.wrapper.PacketWrapperScoreboardTeam$Update.build(PacketWrapperScoreboardTeam.kt:65) at gg.netherite.plugin.paper.protocol.wrapper.PacketWrapperScoreboardTeam$Create.build(PacketWrapperScoreboardTeam.kt:43) at gg.netherite.plugin.paper.protocol.ExtensionKt.sendPacketWrapper(extension.kt:40) at gg.netherite.plugin.paper.nametag.NametagManager$setup$1$1.invokeSuspend(NametagManager.kt:94) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) at java.lang.Thread.run(Thread.java:1583)

This is on a 1.20.4 paper server

commented

Any update on this @dmulloy2?