GTNewHorizons / GT-New-Horizons-Modpack

New Modpack with Gregtech, Thaumcraft and Witchery
https://www.gtnewhorizons.com/
Other
1.01k stars 304 forks source link

Help command broken on servers #3175

Open richardhendricks opened 6 years ago

richardhendricks commented 6 years ago

Need to investigate

/help [20:25:42] [Server thread/INFO]: An unknown error occurred while attempting to perform this command [20:25:42] [Server thread/ERROR]: Couldn't process command: 'help' java.lang.NullPointerException at shukaro.warptheory.handlers.WarpCommand.func_71519_b(WarpCommand.java:74) ~[WarpCommand.class:?] at net.minecraft.command.CommandHandler.func_71557_a(CommandHandler.java:219) ~[z.class:?] at net.minecraft.command.CommandHelp.func_71534_d(SourceFile:83) ~[au.class:?] at net.minecraft.command.CommandHelp.func_71515_b(SourceFile:38) ~[au.class:?] at net.minecraft.command.CommandHandler.func_71556_a(CommandHandler.java:94) [z.class:?] at net.minecraft.server.dedicated.DedicatedServer.func_71333_ah(DedicatedServer.java:370) [lt.class:?] at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:335) [lt.class:?] at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685) [li.class:?]

richardhendricks commented 6 years ago

Looks like a problem with Warp Theory.

richardhendricks commented 5 years ago

The problem is that Warp Theory attempts to check if a player is in creative mode or is an operator, but if the command is executed from the command line, it causes this error to occur.

https://github.com/Namikon/WarpTheory/blob/master/src/main/java/shukaro/warptheory/handlers/WarpCommand.java#L72

Should be a trivial fix I guess?

richardhendricks commented 5 years ago

should be easy enough

https://github.com/GTNewHorizons/NewHorizonsCoreMod/blob/master/src/main/java/com/dreammaster/command/AllPurposeDebugCommand.java#L155

draknyte1 commented 5 years ago

It's a one line fix lol.

draknyte1 commented 5 years ago

There ye go.

Edit: I nearly submitted a PR for the AllPurposeDebugCommand as it has the same issues. Edit2: All the GTNH custom commands fail to check this upon second glance.

draknyte1 commented 5 years ago

And now it should be fixed on all the core mod commands as well. They have enough common code that they could probably do with a cleanup. https://github.com/GTNewHorizons/NewHorizonsCoreMod/pull/68

Making a BaseCommand and having the rest extend would reduce alot of duplicate code.

richardhendricks commented 5 years ago

@draknyte1 I am trying to build WarpTheory but getting an error with Gradle.

C:\Users\hendric\Documents\repos\WarpTheory>gradle setupDecompWorkspace


FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'WarpTheory'.
> ForgeGradle 1.2 does not support forge 1.7.10

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1.011 secs

C:\Users\hendric\Documents\repos\WarpTheory>
Dream-Master commented 5 years ago

@richardhendricks i will fix that for you :)

richardhendricks commented 5 years ago

@Dream-Master I am still getting the same error. Do I need to change something on my side?

richardhendricks commented 5 years ago

Nevermind I figured it out. I fixed the error from Warp Theory, but another error is occurring.

/help [00:09:17] [Server thread/INFO]: An unknown error occurred while attempting to perform this command [00:09:17] [Server thread/ERROR]: Couldn't process command: 'help' java.lang.IllegalArgumentException: Comparison method violates its general contract! at java.util.ComparableTimSort.mergeLo(Unknown Source) ~[?:1.8.0_191] at java.util.ComparableTimSort.mergeAt(Unknown Source) ~[?:1.8.0_191] at java.util.ComparableTimSort.mergeCollapse(Unknown Source) ~[?:1.8.0_191] at java.util.ComparableTimSort.sort(Unknown Source) ~[?:1.8.0_191] at java.util.Arrays.sort(Unknown Source) ~[?:1.8.0_191] at java.util.Arrays.sort(Unknown Source) ~[?:1.8.0_191] at java.util.ArrayList.sort(Unknown Source) ~[?:1.8.0_191] at java.util.Collections.sort(Unknown Source) ~[?:1.8.0_191] at net.minecraft.command.CommandHelp.func_71534_d(SourceFile:84) ~[au.class:?] at net.minecraft.command.CommandHelp.func_71515_b(SourceFile:38) ~[au.class:?] at net.minecraft.command.CommandHandler.func_71556_a(CommandHandler.java:94) [z.class:?] at net.minecraft.server.dedicated.DedicatedServer.func_71333_ah(DedicatedServer.java:370) [lt.class:?] at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:335) [lt.class:?] at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685) [li.class:?]

richardhendricks commented 5 years ago

Motherfucking most likely root cause is this

https://github.com/CraftTweaker/CraftTweaker/issues/80

richardhendricks commented 5 years ago

Last crafttweaker 1.7.10 release was oct 22, 2016. That ticket was filed in November. And they didn't tag anything, so who fucking knows if it will build or not. :(

Dream-Master commented 5 years ago

jarred told me not support 1.7.10 any more

richardhendricks commented 5 years ago

I removed CT for testing.

IguanaTweaker is the next culprit https://github.com/GTNewHorizons/IguanaTweaksTConstruct/blob/master/src/main/java/iguanaman/iguanatweakstconstruct/leveling/commands/IguanaCommandToolXP.java#L90

Going to quit for now and try continuing later.

richardhendricks commented 5 years ago

@draknyte1 @Namikon I will try re-running HelpFixer later, or maybe implementing the code temporarily in the coremod until we can track down culprits.

draknyte1 commented 5 years ago

Just compile and test outside of Dev.. we know HelpFixer works because it’s bundled already afaik

richardhendricks commented 5 years ago

Can you clarify what you mean by outside of Dev? Removing the debug command line from the java call?

richardhendricks commented 5 years ago

OK, got helpfixer working. Was stupidly using the deobf jar. Here is the report. Straight 2.0.7.0 so none of my fixes in it yet. Trying again with the warp theory bug fix.

[22:08:27] [Server thread/INFO] [FML]: [TooMuchLoot]: Overriding loot-table [villageBlacksmith]
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command customtooltips incorrectly overrides compareTo: com.dreammaster.command.CustomToolTipsCommand
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command DumpAspects incorrectly overrides compareTo: gtPlusPlus.xmod.thaumcraft.commands.CommandDumpAspects
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command morpheus incorrectly overrides compareTo: net.quetzi.morpheus.commands.CommandMorpheus
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command lootbags incorrectly overrides compareTo: eu.usrv.enhancedlootbags.server.LootBagCommand
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command customdrops incorrectly overrides compareTo: com.dreammaster.command.CustomDropsCommand
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command alkalus incorrectly overrides compareTo: gtPlusPlus.core.commands.CommandMath
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command AlterRate incorrectly overrides compareTo: flaxbeard.thaumicexploration.commands.CommandAlterRate
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command minetweaker incorrectly overrides compareTo: minetweaker.mc1710.server.MCServer$MCCommand
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command customfuels incorrectly overrides compareTo: com.dreammaster.command.CustomFuelsCommand
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command lootgames incorrectly overrides compareTo: eu.usrv.lootgames.command.LootGamesCommand
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command hazarditems incorrectly overrides compareTo: com.dreammaster.command.HazardousItemsCommand
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command customtooltips incorrectly overrides compareTo: com.dreammaster.command.CustomToolTipsCommand
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command checkwarp incorrectly overrides compareTo: flaxbeard.thaumicexploration.commands.CommandCheckWarp
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command customdrops incorrectly overrides compareTo: com.dreammaster.command.CustomDropsCommand
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command DebugChunks incorrectly overrides compareTo: gtPlusPlus.core.commands.CommandDebugChunks
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command customtooltips incorrectly overrides compareTo: com.dreammaster.command.CustomToolTipsCommand
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command customfuels incorrectly overrides compareTo: com.dreammaster.command.CustomFuelsCommand
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command hazarditems incorrectly overrides compareTo: com.dreammaster.command.HazardousItemsCommand
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command DumpAspects incorrectly overrides compareTo: gtPlusPlus.xmod.thaumcraft.commands.CommandDumpAspects
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command DumpAspects incorrectly overrides compareTo: gtPlusPlus.xmod.thaumcraft.commands.CommandDumpAspects
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command DebugChunks incorrectly overrides compareTo: gtPlusPlus.core.commands.CommandDebugChunks
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command angerprotection incorrectly overrides compareTo: com.github.namikon.angermod.command.AngerProtectionCommand
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command AlterRate incorrectly overrides compareTo: flaxbeard.thaumicexploration.commands.CommandAlterRate
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command ae2 incorrectly overrides compareTo: appeng.server.AECommand
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command maxresearch incorrectly overrides compareTo: thaumic.tinkerer.common.core.commands.MaxResearchCommand
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command customdrops incorrectly overrides compareTo: com.dreammaster.command.CustomDropsCommand
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command chant incorrectly overrides compareTo: com.emoniph.witchery.common.ChantCommand
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command DumpAspects incorrectly overrides compareTo: gtPlusPlus.xmod.thaumcraft.commands.CommandDumpAspects
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command leveluptool incorrectly overrides compareTo: iguanaman.iguanatweakstconstruct.leveling.commands.IguanaCommandLevelUpTool
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command toolxp incorrectly overrides compareTo: iguanaman.iguanatweakstconstruct.leveling.commands.IguanaCommandToolXP
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command customfuels incorrectly overrides compareTo: com.dreammaster.command.CustomFuelsCommand
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command lootbags incorrectly overrides compareTo: eu.usrv.enhancedlootbags.server.LootBagCommand
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command lootgamesprofiler incorrectly overrides compareTo: eu.usrv.lootgames.command.ProfilingCommand
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command iskamiunlocked incorrectly overrides compareTo: thaumic.tinkerer.common.core.commands.KamiUnlockedCommand
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command DebugChunks incorrectly overrides compareTo: gtPlusPlus.core.commands.CommandDebugChunks
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command INpureCore incorrectly overrides compareTo: info.inpureprojects.core.NEI.gtfoMicroblocks.Commands.CommandReload
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command iteminhand incorrectly overrides compareTo: com.dreammaster.command.ItemInHandInfoCommand
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command INpureCore incorrectly overrides compareTo: info.inpureprojects.core.NEI.gtfoMicroblocks.Commands.CommandReload
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command DumpAspects incorrectly overrides compareTo: gtPlusPlus.xmod.thaumcraft.commands.CommandDumpAspects
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command lootgames incorrectly overrides compareTo: eu.usrv.lootgames.command.LootGamesCommand
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command iteminhand incorrectly overrides compareTo: com.dreammaster.command.ItemInHandInfoCommand
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command minetweaker incorrectly overrides compareTo: minetweaker.mc1710.server.MCServer$MCCommand
[22:08:28] [Server thread/WARN] [FML]: [HelpFixer] Command blimit incorrectly overrides compareTo: com.github.namikon.blocklimiter.command.BlockLimiterCommand
[22:08:28] [Server thread/INFO] [JourneyMapServer]: World ID: 1402e865-1e6d-4b24-8a29-91d0b73aac2b
[22:08:28] [Server thread/INFO] [FML]: Unloading dimension 1
richardhendricks commented 5 years ago

:(

/help
[22:20:59] [Server thread/WARN] [FML]: [HelpFixer] Identified command with null usage, Ignoring: iguanaman.iguanatweakstconstruct.leveling.commands.IguanaCommandToolXP
[22:20:59] [Server thread/WARN] [FML]: [HelpFixer] Identified command with null usage, Ignoring: iguanaman.iguanatweakstconstruct.leveling.commands.IguanaCommandLevelUpTool
[22:20:59] [Server thread/WARN] [FML]: [HelpFixer] Identified command with null usage, Ignoring: info.inpureprojects.core.NEI.gtfoMicroblocks.Commands.CommandReload
[22:20:59] [Server thread/INFO]: You must specify which player you wish to perform this action on.
/help asturrial
[22:21:24] [Server thread/WARN] [FML]: [HelpFixer] Identified command with null usage, Ignoring: iguanaman.iguanatweakstconstruct.leveling.commands.IguanaCommandToolXP
[22:21:24] [Server thread/WARN] [FML]: [HelpFixer] Identified command with null usage, Ignoring: iguanaman.iguanatweakstconstruct.leveling.commands.IguanaCommandLevelUpTool
[22:21:24] [Server thread/WARN] [FML]: [HelpFixer] Identified command with null usage, Ignoring: info.inpureprojects.core.NEI.gtfoMicroblocks.Commands.CommandReload
[22:21:24] [Server thread/INFO]: You must specify which player you wish to perform this action on.
/help 1
[22:22:43] [Server thread/WARN] [FML]: [HelpFixer] Identified command with null usage, Ignoring: iguanaman.iguanatweakstconstruct.leveling.commands.IguanaCommandToolXP
[22:22:43] [Server thread/WARN] [FML]: [HelpFixer] Identified command with null usage, Ignoring: iguanaman.iguanatweakstconstruct.leveling.commands.IguanaCommandLevelUpTool
[22:22:43] [Server thread/WARN] [FML]: [HelpFixer] Identified command with null usage, Ignoring: info.inpureprojects.core.NEI.gtfoMicroblocks.Commands.CommandReload
[22:22:43] [Server thread/INFO]: You must specify which player you wish to perform this action on.
/help checkwarp
[22:23:00] [Server thread/WARN] [FML]: [HelpFixer] Identified command with null usage, Ignoring: iguanaman.iguanatweakstconstruct.leveling.commands.IguanaCommandToolXP
[22:23:00] [Server thread/WARN] [FML]: [HelpFixer] Identified command with null usage, Ignoring: iguanaman.iguanatweakstconstruct.leveling.commands.IguanaCommandLevelUpTool
[22:23:00] [Server thread/WARN] [FML]: [HelpFixer] Identified command with null usage, Ignoring: info.inpureprojects.core.NEI.gtfoMicroblocks.Commands.CommandReload
[22:23:00] [Server thread/INFO]: You must specify which player you wish to perform this action on.
help checkwarp
[22:23:22] [Server thread/WARN] [FML]: [HelpFixer] Identified command with null usage, Ignoring: iguanaman.iguanatweakstconstruct.leveling.commands.IguanaCommandToolXP
[22:23:22] [Server thread/WARN] [FML]: [HelpFixer] Identified command with null usage, Ignoring: iguanaman.iguanatweakstconstruct.leveling.commands.IguanaCommandLevelUpTool
[22:23:22] [Server thread/WARN] [FML]: [HelpFixer] Identified command with null usage, Ignoring: info.inpureprojects.core.NEI.gtfoMicroblocks.Commands.CommandReload
[22:23:22] [Server thread/INFO]: You must specify which player you wish to perform this action on.
help booga
[22:23:26] [Server thread/WARN] [FML]: [HelpFixer] Identified command with null usage, Ignoring: iguanaman.iguanatweakstconstruct.leveling.commands.IguanaCommandToolXP
[22:23:26] [Server thread/WARN] [FML]: [HelpFixer] Identified command with null usage, Ignoring: iguanaman.iguanatweakstconstruct.leveling.commands.IguanaCommandLevelUpTool
[22:23:26] [Server thread/WARN] [FML]: [HelpFixer] Identified command with null usage, Ignoring: info.inpureprojects.core.NEI.gtfoMicroblocks.Commands.CommandReload
[22:23:26] [Server thread/INFO]: You must specify which player you wish to perform this action on.
richardhendricks commented 5 years ago

When attached to a server running helpfixer and OPed, I can see a ton of commands from my player side image

However the command line console is still borked when it comes to help messages.

[23:07:19] [Thread-15/INFO] [Galaxy Space]: Actual version Galaxy Space: 1.1.6
/list
[23:08:31] [Server thread/INFO]: There are 0/20 players online:
[23:08:31] [Server thread/INFO]:
/help
[23:08:34] [Server thread/WARN] [FML]: [HelpFixer] Identified command with null usage, Ignoring: iguanaman.iguanatweakstconstruct.leveling.commands.IguanaCommandToolXP
[23:08:34] [Server thread/WARN] [FML]: [HelpFixer] Identified command with null usage, Ignoring: info.inpureprojects.core.NEI.gtfoMicroblocks.Commands.CommandReload
[23:08:34] [Server thread/INFO]: You must specify which player you wish to perform this action on.

At this point, I think I have reached dimishing returns for my efforts and that my time is best spent elsewhere.

OvermindDL1 commented 5 months ago

For note, this issue has popped up again at least within 2.6.1 server, unsure 'when' it popped up though.

Cleptomania commented 5 months ago

Re-opening to investigate this in 2.6

OvermindDL1 commented 5 months ago

An idea, an on-load test can be written to check each command after load to see if they have a proper comparison and checks and all to verify this doesn't happen again in the future (or report noisely to the log or game or so the full classname of the command)?

dgealow commented 3 months ago

Plain old /help alone is giving the error for me.

dgealow commented 1 month ago

Possibly related: /kill [name of player] is also giving me the "You must specify which player you wish to perform this action on." error, despite literally having just specified that.