CC: Tweaked

CC: Tweaked

57M Downloads

Failed to assign new IDs to computers and peripherals

mzuletal opened this issue ยท 5 comments

commented

Minecraft Version

1.16.x

Version

1.100.2

Details

When trying to start a computer without an ID assigned, computer remains shut down and gives a log error in server console. This issue also happens when trying to use a wired modem next to a peripheral.

These are the logs for whwen trying to use the computer. https://pastebin.com/mXzhCg2u

Backtrace
[ComputerCraft-Computer-Runner-0/ERROR] [computercraft/]: Error running task on computer #-1
java.lang.NullPointerException: null
        at dan200.computercraft.shared.util.IDAssigner.getNextId(IDAssigner.java:90) ~[computercraft:1.100.2] {re:classloading}
        at dan200.computercraft.ComputerCraftAPIImpl.createUniqueNumberedSaveDir(ComputerCraftAPIImpl.java:86) ~[computercraft:1.100.2] {re:classloading}
        at dan200.computercraft.api.ComputerCraftAPI.createUniqueNumberedSaveDir(ComputerCraftAPI.java:69) ~[computercraft:1.100.2] {re:classloading}
        at dan200.computercraft.shared.computer.core.ServerComputer.assignNewID(ServerComputer.java:356) ~[computercraft:1.100.2] {re:classloading}
        at dan200.computercraft.core.computer.Computer.assignID(Computer.java:142) ~[computercraft:1.100.2] {re:classloading}
        at dan200.computercraft.core.computer.ComputerExecutor.getRootMount(ComputerExecutor.java:350) ~[computercraft:1.100.2] {re:classloading}
        at dan200.computercraft.core.computer.ComputerExecutor.createFileSystem(ComputerExecutor.java:362) ~[computercraft:1.100.2] {re:classloading}
        at dan200.computercraft.core.computer.ComputerExecutor.turnOn(ComputerExecutor.java:436) ~[computercraft:1.100.2] {re:classloading}
        at dan200.computercraft.core.computer.ComputerExecutor.work(ComputerExecutor.java:590) ~[computercraft:1.100.2] {re:classloading}
        at dan200.computercraft.core.computer.ComputerThread$TaskRunner.run(ComputerThread.java:504) [computercraft:1.100.2] {re:classloading}
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312] {}

These ones are when trying to use the wired modem. https://pastebin.com/8EXHUGPs

commented

Yes.

commented

The json its empty....... should i delete it and restart the server?

commented
Stacktrace for easier reading
[ComputerCraft-Computer-Runner-0/ERROR] [computercraft/]: Error running task on computer #-1
java.lang.NullPointerException: null
        at dan200.computercraft.shared.util.IDAssigner.getNextId(IDAssigner.java:90) ~[computercraft:1.100.2] {re:classloading}
        at dan200.computercraft.ComputerCraftAPIImpl.createUniqueNumberedSaveDir(ComputerCraftAPIImpl.java:86) ~[computercraft:1.100.2] {re:classloading}
        at dan200.computercraft.api.ComputerCraftAPI.createUniqueNumberedSaveDir(ComputerCraftAPI.java:69) ~[computercraft:1.100.2] {re:classloading}
        at dan200.computercraft.shared.computer.core.ServerComputer.assignNewID(ServerComputer.java:356) ~[computercraft:1.100.2] {re:classloading}
        at dan200.computercraft.core.computer.Computer.assignID(Computer.java:142) ~[computercraft:1.100.2] {re:classloading}
        at dan200.computercraft.core.computer.ComputerExecutor.getRootMount(ComputerExecutor.java:350) ~[computercraft:1.100.2] {re:classloading}
        at dan200.computercraft.core.computer.ComputerExecutor.createFileSystem(ComputerExecutor.java:362) ~[computercraft:1.100.2] {re:classloading}
        at dan200.computercraft.core.computer.ComputerExecutor.turnOn(ComputerExecutor.java:436) ~[computercraft:1.100.2] {re:classloading}
        at dan200.computercraft.core.computer.ComputerExecutor.work(ComputerExecutor.java:590) ~[computercraft:1.100.2] {re:classloading}
        at dan200.computercraft.core.computer.ComputerThread$TaskRunner.run(ComputerThread.java:504) [computercraft:1.100.2] {re:classloading}
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312] {}

Would you be able to paste the contents of your computercraft/ids.json file here? You can probably delete it afterwards, and it should fix things.

commented

Deleting it and restarting the server fixed it, appreciate the help.

commented

Re-opening this - probably some better error handling we could do here.