Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.95a is out! (03/26/21); Blog post: Skill Changes, Part 2 (07/15/21)

Author Topic: [0.95a-RC15] Strange CampaignState.getZoomFactor NPE  (Read 167 times)

Histidine

  • Admiral
  • *****
  • Posts: 3281
    • View Profile
    • Bitbucket profile
    • Email
[0.95a-RC15] Strange CampaignState.getZoomFactor NPE
« on: May 12, 2021, 04:28:17 AM »

- Download and enable Nexerelin (and LazyLib and MagicLib)
- Start a new game with the tutorial start (main NGC menu -> Proceed -> Custom start)
- Pick the ensign start, or custom start with player level 1 (important)
- New game finishes loading, then crashes to desktop
- ...but the new game save loads fine and player can continue?
- Also this doesn't happen if the player sets a starting level >1?

137301 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at com.fs.starfarer.campaign.CampaignState.getZoomFactor(Unknown Source)
   at com.fs.starfarer.campaign.fleet.CampaignFleetMemberView.renderWeapons(Unknown Source)
   at com.fs.starfarer.ui.oOOO.OoOO.o00000(Unknown Source)
   at com.fs.starfarer.ui.oOOO.OoOO.?00000(Unknown Source)
   at com.fs.starfarer.campaign.ui.String.super(Unknown Source)
   at com.fs.starfarer.ui.newnew.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.render(Unknown Source)
   at com.fs.starfarer.ui.e$Oo.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.e.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)

Additional request: Currently, after the first tutorial battle, if player is already past level 2 then CampaignTutorialScript adds negative XP (lines 237-240). Could it be made to not add the calculated XP amount if it's negative?
Logged