"java.io.IOException: The handle is invalid" when running spigot with vanilla GUI and no console (javaw.exe) on Windows

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor
    • None
    • Affects Version/s: None
    • None
    • Environment:

      Windows 10 Pro, Version 1903 (build 18362.592)

      java version "1.8.0_192"
      Java(TM) SE Runtime Environment (build 1.8.0_192-b12)
      Java HotSpot(TM) 64-Bit Server VM (build 25.192-b12, mixed mode)

    • This server is running CraftBukkit version git-Spigot-800b93f-a0e88fb (MC: 1.15.2) (Implementing API version 1.15.2-R0.1-SNAPSHOT)
    • Yes

      When running spigot by double clicking on the jar file, the vanilla GUI shows up, and the server starts as intended, but with an error message with an exception. I put the java command line (as it appears in the task mananger) in the attachment.

      [16:28:36 INFO]: Starting minecraft server version 1.15.2
      [16:28:36 INFO]: Loading properties
      [16:28:36 ERROR]: Exception handling console input
      java.io.IOException: The handle is invalid
      	at java.io.FileInputStream.readBytes(Native Method) ~[?:1.8.0_192]
      	at java.io.FileInputStream.read(Unknown Source) ~[?:1.8.0_192]
      	at java.io.BufferedInputStream.fill(Unknown Source) ~[?:1.8.0_192]
      	at java.io.BufferedInputStream.read(Unknown Source) ~[?:1.8.0_192]
      	at org.bukkit.craftbukkit.libs.jline.internal.NonBlockingInputStream.read(NonBlockingInputStream.java:248) ~[spigot-1.15.2.jar:git-Spigot-800b93f-a0e88fb]
      	at org.bukkit.craftbukkit.libs.jline.internal.InputStreamReader.read(InputStreamReader.java:261) ~[spigot-1.15.2.jar:git-Spigot-800b93f-a0e88fb]
      	at org.bukkit.craftbukkit.libs.jline.internal.InputStreamReader.read(InputStreamReader.java:198) ~[spigot-1.15.2.jar:git-Spigot-800b93f-a0e88fb]
      	at org.bukkit.craftbukkit.libs.jline.console.ConsoleReader.readCharacter(ConsoleReader.java:2145) ~[spigot-1.15.2.jar:git-Spigot-800b93f-a0e88fb]
      	at org.bukkit.craftbukkit.libs.jline.console.ConsoleReader.readLineSimple(ConsoleReader.java:3183) ~[spigot-1.15.2.jar:git-Spigot-800b93f-a0e88fb]
      	at org.bukkit.craftbukkit.libs.jline.console.ConsoleReader.readLine(ConsoleReader.java:2333) ~[spigot-1.15.2.jar:git-Spigot-800b93f-a0e88fb]
      	at org.bukkit.craftbukkit.libs.jline.console.ConsoleReader.readLine(ConsoleReader.java:2269) ~[spigot-1.15.2.jar:git-Spigot-800b93f-a0e88fb]
      	at org.bukkit.craftbukkit.libs.jline.console.ConsoleReader.readLine(ConsoleReader.java:2257) ~[spigot-1.15.2.jar:git-Spigot-800b93f-a0e88fb]
      	at net.minecraft.server.v1_15_R1.DedicatedServer$2.run(DedicatedServer.java:98) [spigot-1.15.2.jar:git-Spigot-800b93f-a0e88fb]
      [16:28:36 INFO]: This server is running CraftBukkit version git-Spigot-800b93f-a0e88fb (MC: 1.15.2) (Implementing API version 1.15.2-R0.1-SNAPSHOT)
      [16:28:36 INFO]: Debug logging is disabled
      [16:28:36 INFO]: Server Ping Player Sample Count: 12
      [16:28:36 INFO]: Using 2 threads for Netty based IO
      [16:28:36 INFO]: Default game type: SURVIVAL
      [16:28:36 INFO]: Generating keypair
      [16:28:36 INFO]: Starting Minecraft server on *:25566
      [16:28:36 INFO]: Using default channel type
      

      Maybe Spigot should hide the error when the vanilla GUI is enabled and there is no stdin detected.

            Assignee:
            Unassigned
            Reporter:
            Marc Baloup
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: