Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: CTD on loading game  (Read 464 times)

JAL28

  • Commander
  • ***
  • Posts: 217
    • View Profile
CTD on loading game
« on: September 22, 2021, 06:48:36 AM »

Ran into this error on a vanilla game, not sure what's causing it because I don't believe I touched the SectorGen file at all

Spoiler
19177 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Error loading [data.scripts.world.SectorGen]
java.lang.RuntimeException: Error loading [data.scripts.world.SectorGen]
   at com.fs.starfarer.loading.scripts.ScriptStore$3.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: Parsing compilation unit 'data.scripts.world.SectorGen'
   at org.codehaus.janino.JavaSourceIClassLoader.findIClass(JavaSourceIClassLoader.java:172)
   at org.codehaus.janino.IClassLoader.loadIClass(IClassLoader.java:254)
   at org.codehaus.janino.JavaSourceClassLoader.generateBytecodes(JavaSourceClassLoader.java:214)
   at org.codehaus.janino.JavaSourceClassLoader.findClass(JavaSourceClassLoader.java:178)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
   ... 2 more
Caused by: org.codehaus.commons.compiler.CompileException: File 'data/scripts/world/SectorGen.java', Line 55, Column 3: Expression ""StarSystemAPI system = sector.createStarSystem("" is not a type
   at org.codehaus.janino.Java$Located.throwCompileException(Java.java:111)
   at org.codehaus.janino.Java$Atom.toTypeOrCompileException(Java.java:2687)
   at org.codehaus.janino.Parser.parseBlockStatement(Parser.java:1157)
   at org.codehaus.janino.Parser.parseBlockStatements(Parser.java:1085)
   at org.codehaus.janino.Parser.parseMethodDeclarationRest(Parser.java:938)
   at org.codehaus.janino.Parser.parseClassBodyDeclaration(Parser.java:565)
   at org.codehaus.janino.Parser.parseClassBody(Parser.java:515)
   at org.codehaus.janino.Parser.parseClassDeclarationRest(Parser.java:481)
   at org.codehaus.janino.Parser.parsePackageMemberTypeDeclaration(Parser.java:269)
   at org.codehaus.janino.Parser.parseCompilationUnit(Parser.java:168)
   at org.codehaus.janino.JavaSourceIClassLoader.findCompilationUnit(JavaSourceIClassLoader.java:203)
   at org.codehaus.janino.JavaSourceIClassLoader.findIClass(JavaSourceIClassLoader.java:146)
   ... 7 more
[close]
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24125
    • View Profile
Re: CTD on loading game
« Reply #1 on: September 22, 2021, 09:19:01 AM »

Hmm. Could you try a clean reinstall of the game? This seems really unlikely to happen with untouched vanilla and it'd be good to confirm.
Logged

JAL28

  • Commander
  • ***
  • Posts: 217
    • View Profile
Re: CTD on loading game
« Reply #2 on: September 22, 2021, 03:40:55 PM »

That fixed the initial issue, but now there's a different error popping up: The game can't seem to recognise "Galatia" anymore.

Spoiler
19060 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Error loading [data.scripts.world.SectorGen]
java.lang.RuntimeException: Error loading [data.scripts.world.SectorGen]
   at com.fs.starfarer.loading.scripts.ScriptStore$3.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: File 'data/scripts/world/SectorGen.java', Line 65, Column 14: Cannot determine simple type name "Galatia"
   at org.codehaus.janino.JavaSourceClassLoader.generateBytecodes(JavaSourceClassLoader.java:226)
   at org.codehaus.janino.JavaSourceClassLoader.findClass(JavaSourceClassLoader.java:178)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
   ... 2 more
Caused by: org.codehaus.commons.compiler.CompileException: File 'data/scripts/world/SectorGen.java', Line 65, Column 14: Cannot determine simple type name "Galatia"
   at org.codehaus.janino.UnitCompiler.compileError(UnitCompiler.java:10174)
   at org.codehaus.janino.UnitCompiler.getReferenceType(UnitCompiler.java:5398)
   at org.codehaus.janino.UnitCompiler.getReferenceType(UnitCompiler.java:5207)
   at org.codehaus.janino.UnitCompiler.getType2(UnitCompiler.java:5188)
   at org.codehaus.janino.UnitCompiler.access$12600(UnitCompiler.java:185)
   at org.codehaus.janino.UnitCompiler$16.visitReferenceType(UnitCompiler.java:5119)
   at org.codehaus.janino.Java$ReferenceType.accept(Java.java:2880)
   at org.codehaus.janino.UnitCompiler.getType(UnitCompiler.java:5159)
   at org.codehaus.janino.UnitCompiler.getType2(UnitCompiler.java:5675)
   at org.codehaus.janino.UnitCompiler.access$15000(UnitCompiler.java:185)
   at org.codehaus.janino.UnitCompiler$16.visitNewClassInstance(UnitCompiler.java:5144)
   at org.codehaus.janino.Java$NewClassInstance.accept(Java.java:4082)
   at org.codehaus.janino.UnitCompiler.getType(UnitCompiler.java:5159)
   at org.codehaus.janino.UnitCompiler.findIMethod(UnitCompiler.java:7333)
   at org.codehaus.janino.UnitCompiler.compileGet2(UnitCompiler.java:3873)
   at org.codehaus.janino.UnitCompiler.access$6900(UnitCompiler.java:185)
   at org.codehaus.janino.UnitCompiler$10.visitMethodInvocation(UnitCompiler.java:3263)
   at org.codehaus.janino.Java$MethodInvocation.accept(Java.java:3974)
   at org.codehaus.janino.UnitCompiler.compileGet(UnitCompiler.java:3290)
   at org.codehaus.janino.UnitCompiler.compileGetValue(UnitCompiler.java:4368)
   at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:2662)
   at org.codehaus.janino.UnitCompiler.access$4400(UnitCompiler.java:185)
   at org.codehaus.janino.UnitCompiler$7.visitMethodInvocation(UnitCompiler.java:2627)
   at org.codehaus.janino.Java$MethodInvocation.accept(Java.java:3974)
   at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:2654)
   at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:1643)
   at org.codehaus.janino.UnitCompiler.access$1100(UnitCompiler.java:185)
   at org.codehaus.janino.UnitCompiler$4.visitExpressionStatement(UnitCompiler.java:936)
   at org.codehaus.janino.Java$ExpressionStatement.accept(Java.java:2097)
   at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:958)
   at org.codehaus.janino.UnitCompiler.compileStatements(UnitCompiler.java:1007)
   at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:2293)
   at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java:822)
   at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java:794)
   at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:507)
   at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:393)
   at org.codehaus.janino.UnitCompiler.access$400(UnitCompiler.java:185)
   at org.codehaus.janino.UnitCompiler$2.visitPackageMemberClassDeclaration(UnitCompiler.java:347)
   at org.codehaus.janino.Java$PackageMemberClassDeclaration.accept(Java.java:1139)
   at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:354)
   at org.codehaus.janino.UnitCompiler.compileUnit(UnitCompiler.java:322)
   at org.codehaus.janino.JavaSourceClassLoader.generateBytecodes(JavaSourceClassLoader.java:224)
   ... 5 more
[close]

The error persisted even when using a gen file from a fresh copy of Starsector, so I'm not sure how to fix it.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24125
    • View Profile
Re: CTD on loading game
« Reply #3 on: September 22, 2021, 04:21:49 PM »

The error persisted even when using a gen file from a fresh copy of Starsector, so I'm not sure how to fix it.

That sounds like you're not running the clean install but just trying to move files from one piecemeal? It sounds like something in your local copy (that I'm assuming you've been editing) is messed up. Btw, this is one reason that making changes to the game in the form of a "proper" mod is generally better - you're then not modifying core files and can revert more easily.
Logged

JAL28

  • Commander
  • ***
  • Posts: 217
    • View Profile
Re: CTD on loading game
« Reply #4 on: September 22, 2021, 07:28:58 PM »

Oddly enough, I solved the problem by running my usual mod set, somehow, at least since the game works fine now
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24125
    • View Profile
Re: CTD on loading game
« Reply #5 on: September 22, 2021, 08:32:51 PM »

Ah - that probably means that one of the mods is overriding whatever file is messed up in your copy of the base game!
Logged