CC: Tweaked

CC: Tweaked

42M Downloads

ComputerCraft worked fine until yesterday, and I'm about to lose my f'ing mind.

Clawface420 opened this issue ยท 14 comments

commented

Minecraft Version

1.18.x

Version

1.101.0

Details

I am playing TNP Limitless 5 - 1.18.2, and everything worked fine for the past couple of days. But suddenly, starting yesterday, ComputerCraft's items weren't properly shown in my inventory, in the JEI menu and the creative inventory, and whenever I opened a turtle, it said: "error loading bios.lua" and "ComputerCraft may not be installed correctly."

I tried reinstalling the modpack, but nothing changed. After that, I tried both deleting and re-adding CC: Tweaked, and using a different version. Again, to no avail. I then tried reinstalling the modpack again, without adding the few mods I had added. No luck, either.

Also, whenever I right-click an advanced computer, the game just crashes immediately.

I do not get a crash-log, but the latest.log has a bunch of errors.

latest.log

commented

This appears to be another instance of #979.

Would you be able to upload whatever computer 11 does on startup (so the contents of <world folder>/computercraft/computer/11/startup.lua)?

commented

Oh, this is before we even hit computer code: this is happening when constructing the resource mount. Interesting!

commented

Yeah. I don't know what to do anymore, and I am losing my mind about it. lol

commented

Hi, are you using the standard launcher? You said you started having problems yesterday, but the latest modpack update happened on Nov 25, 2022 for [Limitless 5 - v2.28.0] Have you played on this modpack at any point between Nov 25th and December 2nd with no issues? Have you downloaded or updated this modpack in that timeframe?

Do you remember downloading a java update, had some kind of computer update or updated your launcher?

If you read the logs, it says computer 11 ran into an exception at 00:58:38 and computer 10 ran into an exception at 00:58:42 and there was then a render thread error at 00:58:43, and another render thread error that has an unhandled game exception at 00:58:44 that most likely caused the crash
java.lang.NoClassDefFoundError: dan200/computercraft/shared/peripheral/monitor/ClientMonitor
there is also no class definition for dan200/computercraft/shared/util/CapabilityUtil

commented

Hi, I found an issue tracker for the TNP project here https://github.com/The-Nexus-Project/Limitless-5/issues and they have a discord with support here: https://discord.com/invite/gwzpyQb
I found this information on the curseforge page for the TNP limitless modpack.

Is that version number in your original post the minecraft launcher bootstrap version? Usually the version is at the top like "Windows 10.0 2.3.508" where the number "2.3.508" is the actual version.

commented

I did indeed play without issues between that time, and most of the day yesterday too. But then, while I was playing, my turtle just suddenly stoppen working.

I did not do any updates whatsoever, since (at least according to my PC) there are none at the moment.

I unfortunately have no experience with error logs or coding, so while I did read the log, none of the errors told me anything that I could even unverstand.

commented

I just checked the source code of computercraft 1.18.x and I clearly see a class definition for Clientmonitor in CC-Tweaked/src/main/java/dan200/computercraft/shared/peripheral/monitor/ClientMonitor.java on line 26: public final class ClientMonitor

This cannot be an issue with CC-tweaked source code. I was doing some research and found the most common causes of NoClassDefinition errors are:

  • Missing JAR file
  • Permission issues
  • Incorrect classpath at runtime

Can you check to see if the Jars are there? Are they named something different?

Java is really weird in that if I have a class, let's say class Vehicle and I have Vehicle.class in my folder, and then I rename Vehicle.class or delete it, my code will run into a NoClassDefinitionFound error, the same as yours.

commented

The versions I put in are the CC version (1.101.0) and the Minecraft version (1.18.)

I might try to ask for help on their Discord tomorrow, but I will need to reinstall the modpack first, since as of now, it doesn't work at all anymore.

commented

I joined their discord and found out that the modpack uses nonstandard launchers here: quoting readme-faq channel:

(Because of CurseForge's API change were kind of "forced" to use the CF Launcher.)
But luckily the ATLauncher has a working workaround that is easy to use!

Another interesting tidbit is that servers using the pack apparently requires java 17+ for packs 5 and 6.

commented

The JARs are there, and their name is the exact same as a couple of days ago, when it still worked fine.

commented

I've reinstalled the modpack once more, and created a new world, and now the game just immediately crashes whenever I use anything from CC.

It still says NoClassDefFoundError: dan200/computercraft/shared/util/CapabilityUtil.

So, any way to fix it, or do I just have to remove CC? Because to be honest, I don't want to have to do that.

commented

Reading through the comments on #979 I notice everyone seems to think the issue lies with startup, and one person fixed it by removing the computercraft folder (back up your programs if you intend to try this!)

Is the computer placed in spawn chunks? I'm wondering if the computer is trying to do things before things are fully ready.

However, someone also mentions it looks like it crashes when Create is checking CC's disk recipes. Is Create installed?

commented

Create is indeed installed, but it was before, too, and everything worked fine.

I have created a new world and the crashes at startup didn't happen anymore. However, I am still unable to run any program on any PC or turtle, since "bios.lua" can't be found. It also crashes when I break a PC or turtle.

commented

So, any way to fix it, or do I just have to remove CC?

I suspect that's your only option.

To explain exactly what's going on here: When the computer turns on, it takes too long to start up. After a while, CC gives up and tries to abort the computer. Due to some interaction between CC:T, Forge and Java (see #979 for details), this closes the CC jar, basically meaning any subsequent access to CC:T will fail. This is why why we're seeing all the class load failures.

What I'm not clear on is why computers are taking so long to start. In your case, it's taking 10 seconds to find all the files which make up CraftOS, which makes no sense at all! I've submitted a PR to KubeJS to make things a little faster, but not optimistic it will solve things in your case.

If you're familiar with Java profiling, it would be useful to run VisualVM (or equivalent) when first starting a computer and share a snapshot, but aside from that I don't have any suggestions.

I'm going to close this in favour of #979, as I don't think there's anything especially different here.