CC: Tweaked

CC: Tweaked

42M Downloads

Computers Freeze On Game Startup

shelbykauth opened this issue · 8 comments

commented

What I expect to happen:

  • Boot Mincraft, boot up world.
  • Go to computer, it's either off, or rebooted because it was on when world unloaded. Doesn't really matter which way it was. I know it's supposed to be rebooted, but I'd be okay if it were off.
  • Right click computer, "CraftOS 1.8 \n >_",, start typing
  • Stuff appears

What actually happens:

  • Boot Minecraft, boot up world.
  • These computers were on when I left. The visual screens are blank.
  • Right click computer, "CraftOS 1.8 \n >_", start typing.
  • Nothing happens.
  • If I hit escape, the computer looks like it's off.

Current Workaround:

  • Break Computer (hope it's labeled!)
  • Replace it into the world
  • Computer works fine!

Other Workaround:

  • Go very far away, so that the chunks with the computers unload
  • Come back (visually verify that the chunks are reloading from an unloaded state)
  • Computers work fine!

I'd like to not have to use either of these workarounds. Or at the very least, I'd like to know what's causing this.

This also does not happen 100% of the time. It seems to happen only when I first start Minecraft. If I stop the world (return to menu) and return, the computers work fine.

I am using:

  • Minecraft 1.12.2
  • Forge 2611 (so I can build for SpongeForge)
  • CCTweaked (ComputerCraft 1.8pr1.5)
  • Plethora Peripherals 1.1.11
  • Peripherals Plus One 1.1-build-T58
  • Several dozen other mods, but none of them should interfere, I don't think.

I do have three Windows junction folders inside one of the computers in question so I can work on a program collection, use git without it showing up inside the computer, and not have this program set depending on this world, and so that my changes still take place instantly. I don't think this should affect anything, but I cannot fully test without the junction files because, well... I don't know how far they would affect. If they can affect other computers in the loaded world, would they be able to affect computers in an unloaded world?

Pictures of Problems:

After Typing:
image

After Having right-clicked on computer:
image

commented

So I've had a little fiddle and I'm honestly not sure how this is happening. I'm seeing similar issues on server startup, but it seems to fix itself in a few seconds, after all the computers have booted up.

I'd be tempted to say that one computer has played up somewhere, borking all the others. However, the fact that breaking and replacing works implies that this isn't the case.

Just a couple of things worth checking:

  • Is there anything interesting from ComputerCraft in the logs? It might also be worth updating to 1.80pr1.6, as that logs errors in a couple more places.
  • If this problem occurs again, can you run /computercraft dump while standing next to a computer and post the first few lines. It should include the state of the nearest computers, which will allow me to determine if they're on or just broken.
  • Would you be able/willing to zip up the mods and config folder so I can reproduce your environment? I'd be surprised if there's another mod messing with things, but it's worth a try.
commented

Can you use the Twitch Launcher? If so, I can provide you with everything, including my saves (minus the junction folder stuff), quite easily. I'm going to exclude the multiplayer stuff, though. My single player worlds are just testing and dev.

I restarted Minecraft. This time around, the computers all appear to be on, but are still unresponsive.
2018-05-15_13 26 42

Here's the Latest Log file:, I can't make heads or tails of it, but there's a big chunk of ComputerCraft stuff at line 746.

If this can be figured out without me updating for the time being, I'd prefer that. I haven't figured out how to properly manage modpack versions yet, and I'm already overflowing with additional versions. I either have to split into a different version or update everyone's packs to be the same... I think... I don't know.

==Edit==
Oh! And when I went out just far enough for chests, computers, and tinkers tank fluids to disappear, but the wood and stuff stayed in place, and came back, nothing. Just a little farther out, so it was included in the fog area, came back. All the computers had the stuff I had typed in waiting there on the screen.

commented

OK, so this appears to be a Peripherals+1 compatibility issue:

[com.austinv11.peripheralsplusplus.mount.DynamicMount:attach:165]: java.lang.NoSuchMethodException: dan200.computercraft.core.lua.CobaltLuaMachine.addAPI(dan200.computercraft.core.apis.ILuaAPI)
[com.austinv11.peripheralsplusplus.mount.DynamicMount:attach:165]:    at java.lang.Class.getDeclaredMethod(Class.java:2122)
[com.austinv11.peripheralsplusplus.mount.DynamicMount:attach:165]:    at com.austinv11.peripheralsplusplus.utils.ReflectionHelper.registerAPI(ReflectionHelper.java:167)
[com.austinv11.peripheralsplusplus.mount.DynamicMount:attach:165]:    at com.austinv11.peripheralsplusplus.mount.DynamicMount.attach(DynamicMount.java:160)
[com.austinv11.peripheralsplusplus.mount.DynamicMount:attach:165]:    at com.austinv11.peripheralsplusplus.mount.DynamicMountPeripheralChangeListener$1.execute(DynamicMountPeripheralChangeListener.java:40)
[com.austinv11.peripheralsplusplus.mount.DynamicMount:attach:165]:    at com.austinv11.peripheralsplusplus.utils.proxy.Task.invoke(Task.java:25)
[com.austinv11.peripheralsplusplus.mount.DynamicMount:attach:165]:    at com.sun.proxy.$Proxy74.execute(Unknown Source)
[com.austinv11.peripheralsplusplus.mount.DynamicMount:attach:165]:    at dan200.computercraft.core.computer.ComputerThread$TaskRunner.run(ComputerThread.java:274)
[com.austinv11.peripheralsplusplus.mount.DynamicMount:attach:165]:    at java.lang.Thread.run(Thread.java:745)
[java.lang.ThreadGroup:uncaughtException:1052]: java.lang.ClassCastException: dan200.computercraft.shared.computer.core.ServerComputer cannot be cast to dan200.computercraft.core.computer.Computer
[java.lang.ThreadGroup:uncaughtException:1052]:     at com.sun.proxy.$Proxy74.getOwner(Unknown Source)
[java.lang.ThreadGroup:uncaughtException:1052]:     at dan200.computercraft.core.computer.ComputerThread$TaskExecutor.execute(ComputerThread.java:235)
[java.lang.ThreadGroup:uncaughtException:1052]:     at dan200.computercraft.core.computer.ComputerThread$TaskExecutor.run(ComputerThread.java:174)
[java.lang.ThreadGroup:uncaughtException:1052]:     at java.lang.Thread.run(Thread.java:745)

It looks like, somehow, both the executor and manager thread are getting entirely borked, which is why nothing works until reloading chunks.

Pinging @rolandoislas on this - CC:Tweaked has native support for what you're trying to do, so would it be possible to detect that and use those APIs instead?

commented

Support for CC-Tweaked's API registration is implemented in the latest PeripheralsPlusOne alpha (build 61+).

commented

Confirmed that updating to PeripheralsPlusOne Build-61 (and CC:Tweaked pr 1.6) fixes the problem. (At least as far as I can see).
Build 61 is still marked as Alpha on Twitch, so I have to manually go to that version instead of just clicking the update button, but that's alright. I'll get my crew updated soon.

Thank you guys so much for helping!

commented

Amazing, thank you everyone for the information provided!

Support for CC-Tweaked's API registration is implemented in the latest PeripheralsPlusOne alpha (build 61+).

Sorry, I'd missed that as I hadn't looked at the develop branch. Thanks! Apologies for breaking things, I wasn't expecting people to get that deep into CC internals.

commented

OK, that is curious. I've seen issues with the block appearing to be off, but never input failing entirely. Can you use keyboard shortcuts like Ctrl-s to shutdown, or does nothing work at all?

I doubt junction points are causing issues, unless they are included in themselves. Would it be possible to create an empty world and see if you can reproduce it on there?

commented

Keyboard shortcuts do not work, either.

I should note, I've gotten this once or twice a day in single player, and I just realized it probably correlates with shutting the whole game down and relaunching. But I've also gotten this once or twice (across several weeks) on the local server I'm running from a linux box. And that probably correlates with the server rebooting. But it's not as frequent because we move around more.