Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Author Topic: Fatal Null - Migrating to compiled Jar  (Read 1678 times)

mendonca

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1159
    • View Profile
Fatal Null - Migrating to compiled Jar
« on: January 04, 2015, 12:32:27 PM »

Hmmm ... I'm getting this error.

I'm trying to add my scripts in to a jar, I think they work when not in a jar, but don't seem to work when I have compiled them and referenced them in to a jar.

See log file below, has anybody come across this particular one? Best guess is that the modmanager just isn't loading it, or can't find it, but I can't seem to locate the particular issue.

As far as I can tell, everything is the same as it was before - except the .java files have been removed from the main folders and replaced by the relevant .class files located within the containing jar.

I am certainly not an expert with Eclipse, but everything seems to be doing what it should and I get an exported jar file that looks about right in terms of contents etc and it is referenced in the right place in the mod_info. I'm on Linux.

59452 [Thread-5] ERROR com.fs.starfarer.combat.D  - java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
   at java.util.ArrayList.rangeCheck(Unknown Source)
   at java.util.ArrayList.get(Unknown Source)
   at com.fs.starfarer.loading.scripts.ScriptStore.Ò00000(Unknown Source)
   at com.fs.starfarer.settings.StarfarerSettings.super(Unknown Source)
   at com.fs.starfarer.launcher.ModManager.ô00000(Unknown Source)
   at com.fs.starfarer.loading.G.super(Unknown Source)
   at com.fs.A.A.Ò00000(Unknown Source)
   at com.fs.starfarer.combat.D.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$2.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Logged


"I'm doing it, I'm making them purple! No one can stop me!"

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Fatal Null - Migrating to compiled Jar
« Reply #1 on: January 04, 2015, 12:44:03 PM »

Hmm. If you've got any combat plugins in there, they'd be automatically picked up if they were in the plugins folder, but would NOT be automatically picked up from a jar - you'd need to add them to the "plugins" section in settings.json.

Not entirely sure this is the issue, though.
Logged

mendonca

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1159
    • View Profile
Re: Fatal Null - Migrating to compiled Jar
« Reply #2 on: January 04, 2015, 01:12:25 PM »

I don't think it's that, although one of the differences now I'm compiling is that I am trying to add a market condition.

Could this be related? I have referenced the new script in a market_conditions.csv file, so I don't think I'm missing anything but it's possible I'm doing something wrong related to this.
Logged


"I'm doing it, I'm making them purple! No one can stop me!"

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Fatal Null - Migrating to compiled Jar
« Reply #3 on: January 04, 2015, 01:29:40 PM »

Digging into the stack trace a bit, I think it's crashing while trying to load the plugin referred to by "coreLifecyclePlugin" in settings.json.
Logged