Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Error when trying to get my station in the game(solved)  (Read 2145 times)

TheHappyFace

  • Admiral
  • *****
  • Posts: 1168
  • The critic
    • View Profile
Error when trying to get my station in the game(solved)
« on: September 18, 2012, 06:41:14 AM »

Code
27134 [Thread-6] ERROR com.fs.starfarer.combat.String  - java.lang.NullPointerException
java.lang.NullPointerException
at com.fs.starfarer.campaign.CampaignOrbitalStation.readResolve(Unknown Source)
at com.fs.starfarer.campaign.CampaignOrbitalStation.<init>(Unknown Source)
at com.fs.starfarer.campaign.StarSystem.addOrbitalStation(Unknown Source)
at data.scripts.world.HappyGen.generate(HappyGen.java:24)
at com.fs.starfarer.campaign.save.CampaignGameManager.super(Unknown Source)
at com.fs.starfarer.title.OoOO.o00000(Unknown Source)
at com.fs.starfarer.ui.float.ÔO0000(Unknown Source)
at com.fs.starfarer.ui.impl.B.ÔO0000(Unknown Source)
at com.fs.starfarer.campaign.save.o0OO.o00000(Unknown Source)
at com.fs.starfarer.ui.O00o.o00000(Unknown Source)
at com.fs.starfarer.ui.E.o00000(Unknown Source)
at com.fs.starfarer.ui.T.o00000(Unknown Source)
at com.fs.starfarer.A.öOÓ000(Unknown Source)
at com.fs.oOOO.A.new(Unknown Source)
at com.fs.starfarer.combat.String.o00000(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$2.run(Unknown Source)
at java.lang.Thread.run(Thread.java:619)

help me please
« Last Edit: September 19, 2012, 04:46:02 AM by TheHappyFace »
Logged
Fractalsoftworks limited edition ban hammer.

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 7228
  • Harpoon Affectionado
    • View Profile
Re: Error when trying to get my station in the game
« Reply #1 on: September 18, 2012, 07:59:19 AM »

Hrrm, going to need more than that? A few lines above is usually an error message that at least includes file and line number.
Logged

TheHappyFace

  • Admiral
  • *****
  • Posts: 1168
  • The critic
    • View Profile
Re: Error when trying to get my station in the game
« Reply #2 on: September 18, 2012, 08:52:33 AM »

Hrrm, going to need more than that? A few lines above is usually an error message that at least includes file and line number.
well actually there is none
Code
27131 [Thread-6] INFO  com.fs.profiler.Profiler  -   Text & typer                                                                        1      0,01s     11,76%
27131 [Thread-6] INFO  com.fs.profiler.Profiler  -   Updating objectives widget                                                          1      0,00s      2,94%
27132 [Thread-6] INFO  com.fs.profiler.Profiler  -   Updating flagship                                                                   1      0,00s      0,00%
27132 [Thread-6] INFO  com.fs.profiler.Profiler  -   Other                                                                               -      0,00s      0,00%
27134 [Thread-6] ERROR com.fs.starfarer.combat.String  - java.lang.NullPointerException
java.lang.NullPointerException
at com.fs.starfarer.campaign.CampaignOrbitalStation.readResolve(Unknown Source)
at com.fs.starfarer.campaign.CampaignOrbitalStation.<init>(Unknown Source)
at com.fs.starfarer.campaign.StarSystem.addOrbitalStation(Unknown Source)
at data.scripts.world.HappyGen.generate(HappyGen.java:24)
at com.fs.starfarer.campaign.save.CampaignGameManager.super(Unknown Source)
at com.fs.starfarer.title.OoOO.o00000(Unknown Source)
at com.fs.starfarer.ui.float.ÔO0000(Unknown Source)
at com.fs.starfarer.ui.impl.B.ÔO0000(Unknown Source)
at com.fs.starfarer.campaign.save.o0OO.o00000(Unknown Source)
at com.fs.starfarer.ui.O00o.o00000(Unknown Source)
at com.fs.starfarer.ui.E.o00000(Unknown Source)
at com.fs.starfarer.ui.T.o00000(Unknown Source)
at com.fs.starfarer.A.öOÓ000(Unknown Source)
at com.fs.oOOO.A.new(Unknown Source)
at com.fs.starfarer.combat.String.o00000(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$2.run(Unknown Source)
at java.lang.Thread.run(Thread.java:619)
its not at the start of the game but when creating or opening a campaign
Logged
Fractalsoftworks limited edition ban hammer.

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Error when trying to get my station in the game
« Reply #3 on: September 18, 2012, 10:58:55 AM »

A null pointer exception means you're referring to something that doesn't exist. 

You need to create the station via SectorEntityToken and all code further downstream needs to be referring to that token, or find it via name.  But none of it's allowed to refer to it until it exists, so it has to get created before any code is allowed to refer to it.
Logged
Please check out my SS projects :)
Xeno's Mod Pack

ValkyriaL

  • Admiral
  • *****
  • Posts: 2145
  • The Guru of Capital Ships.
    • View Profile
Re: Error when trying to get my station in the game
« Reply #4 on: September 19, 2012, 03:41:05 AM »

Would be good if you posted the gen file as well, since the error most likely is in there.
Logged

TheHappyFace

  • Admiral
  • *****
  • Posts: 1168
  • The critic
    • View Profile
Re: Error when trying to get my station in the game
« Reply #5 on: September 19, 2012, 04:45:47 AM »

I fixed it ^ ^
sorry for not posting it 15 minutes earlier.
Indeed the problem was that i refered to something that wasnt existing.
multiple things actually.
thanks xeno for pointing that out
and thanks valkyrial for wanting to help me  :)
Logged
Fractalsoftworks limited edition ban hammer.