Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Random Null pointer CTD when entering buy/sell ships in ports  (Read 2699 times)

mangalore

  • Lieutenant
  • **
  • Posts: 60
    • View Profile
Random Null pointer CTD when entering buy/sell ships in ports
« on: September 03, 2016, 04:45:40 PM »

Have a very random CTD with my modded game. Everything is fine but when I enter some port sometimes it crashes.

is it this faction not found error? Game is modded so the main question would be how to debug which part is doing this.
I'm playing Mayorate with some added ships but I already had these ships in certain markets on offer though this seems the only lead as I had weird CTDs with variants of those ships even if I made them identical to the one working.

Code
4800209 [Thread-4] INFO  com.fs.starfarer.api.impl.campaign.shared.StarSystemActivityTracker  - Increasing system bounty probability for Theisman by 6.0204684E-4, is now 0.07132232
4800209 [Thread-4] INFO  com.fs.starfarer.api.impl.campaign.shared.StarSystemActivityTracker  - Increasing system bounty probability for Theisman by 6.0204684E-4, is now 0.07177386
4800354 [Thread-4] WARN  exerelin.utilities.ExerelinConfig  - Faction config not found: player
4800354 [Thread-4] WARN  exerelin.utilities.ExerelinConfig  - Faction config not found: player
4800354 [Thread-4] INFO  exerelin.world.MiningFleetManager  - Trying mining fleet for market Bunnigus
4800357 [Thread-4] INFO  exerelin.world.MiningFleetManager  - Spawned Tiandong mining fleet of size 14
4800358 [Thread-4] INFO  exerelin.world.MiningFleetManager  - Trying mining fleet for market Puck
4800362 [Thread-4] INFO  exerelin.world.MiningFleetManager  - Spawned Mayorate mining fleet of size 18
4800362 [Thread-4] INFO  exerelin.world.MiningFleetManager  - Trying mining fleet for market Masset II
4800362 [Thread-4] WARN  exerelin.utilities.ExerelinConfig  - Faction config not found: player
4800627 [Thread-4] INFO  com.fs.starfarer.api.impl.campaign.events.TradeInfoUpdateEvent  - Picking market updates
4801913 [Thread-4] WARN  com.fs.starfarer.campaign.rules.A  - Problem with command of class com.fs.starfarer.api.impl.campaign.rulecmd.OpenCoreTab: null
java.lang.NullPointerException
at com.fs.starfarer.api.impl.campaign.submarkets.BaseSubmarketPlugin.getWeaponsOnRolePick(BaseSubmarketPlugin.java:368)
at com.fs.starfarer.api.impl.campaign.submarkets.BaseSubmarketPlugin.addWeaponsForRolePicks(BaseSubmarketPlugin.java:330)
at com.fs.starfarer.api.impl.campaign.submarkets.BaseSubmarketPlugin.addWeaponsBasedOnMarketSize(BaseSubmarketPlugin.java:315)
at com.fs.starfarer.api.impl.campaign.submarkets.OpenMarketPlugin.updateCargoPrePlayerInteraction(OpenMarketPlugin.java:54)
at com.fs.starfarer.coreui.R.<init>(Unknown Source)
at com.fs.starfarer.ui.newui.J$3.actionPerformed(Unknown Source)
at com.fs.starfarer.ui.newui.J.setCurrentTab(Unknown Source)
at com.fs.starfarer.ui.newui.J.setCurrentTab(Unknown Source)
at com.fs.starfarer.ui.newui.T.showCoreInternal(Unknown Source)
at com.fs.starfarer.ui.newui.T.showCore(Unknown Source)
at com.fs.starfarer.api.impl.campaign.rulecmd.OpenCoreTab.execute(OpenCoreTab.java:39)
at com.fs.starfarer.campaign.rules.A.execute(Unknown Source)
at com.fs.starfarer.campaign.rules.ooOO.runScript(Unknown Source)
at com.fs.starfarer.api.impl.campaign.rulecmd.FireBest.applyRule(FireBest.java:97)
at com.fs.starfarer.api.impl.campaign.rulecmd.FireBest.execute(FireBest.java:47)
at com.fs.starfarer.api.impl.campaign.rulecmd.FireBest.fire(FireBest.java:53)
at com.fs.starfarer.api.impl.campaign.RuleBasedInteractionDialogPluginImpl.fireBest(RuleBasedInteractionDialogPluginImpl.java:176)
at com.fs.starfarer.api.impl.campaign.RuleBasedInteractionDialogPluginImpl.optionSelected(RuleBasedInteractionDialogPluginImpl.java:208)
at com.fs.starfarer.ui.newui.T$1.super(Unknown Source)
at com.fs.starfarer.ui.newui.super.actionPerformed(Unknown Source)
at com.fs.starfarer.ui.interfacesuper.o00000(Unknown Source)
at com.fs.starfarer.ui.H.processInput(Unknown Source)
at com.fs.starfarer.ui.U.super(Unknown Source)
at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
4802120 [Thread-10] INFO  sound.O  - Creating streaming player for music with id [mayorate_friendly.ogg]
4802120 [Thread-10] INFO  sound.H  - Playing music with id [mayorate_friendly.ogg]
4803478 [Thread-4] INFO  sound.O  - Cleaning up music with id [RunningDark.ogg]
4803478 [Thread-4] INFO  sound.O  - Cleaning up music with id [RunningDark.ogg]
4803494 [Thread-8] INFO  sound.O  - Cleaning up music with id [mayorate_friendly.ogg]
4803622 [Thread-10] INFO  sound.O  - Creating streaming player for music with id [mayorate_friendly.ogg]
4803622 [Thread-10] INFO  sound.H  - Playing music with id [mayorate_friendly.ogg]
4803711 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
at com.fs.starfarer.api.impl.campaign.submarkets.BaseSubmarketPlugin.getWeaponsOnRolePick(BaseSubmarketPlugin.java:368)
at com.fs.starfarer.api.impl.campaign.submarkets.BaseSubmarketPlugin.addWeaponsForRolePicks(BaseSubmarketPlugin.java:330)
at com.fs.starfarer.api.impl.campaign.submarkets.BaseSubmarketPlugin.addWeaponsBasedOnMarketSize(BaseSubmarketPlugin.java:315)
at com.fs.starfarer.api.impl.campaign.submarkets.MilitarySubmarketPlugin.updateCargoPrePlayerInteraction(MilitarySubmarketPlugin.java:63)
at com.fs.starfarer.campaign.ui.newsuper.<init>(Unknown Source)
at com.fs.starfarer.coreui.publicsuper.<init>(Unknown Source)
at com.fs.starfarer.coreui.publicsuper.<init>(Unknown Source)
at com.fs.starfarer.ui.newui.J$5.actionPerformed(Unknown Source)
at com.fs.starfarer.ui.interfacesuper.o00000(Unknown Source)
at com.fs.starfarer.ui.H.processInput(Unknown Source)
at com.fs.starfarer.ui.U.super(Unknown Source)
at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
« Last Edit: September 11, 2016, 06:28:49 AM by mangalore »
Logged

mangalore

  • Lieutenant
  • **
  • Posts: 60
    • View Profile
Re: Random Null pointer CTD when entering buy/sell ships in ports
« Reply #1 on: September 11, 2016, 05:32:55 AM »

Ok, since my error itself is very generic, a bi more detail.

I in essence added two ships of my own to the Mayorate mod to increase their roster. One works perfectly, one doesn't

The issue is pretty weird. It essentially messes up the planetary market for ship buying when I add ship variants to CombatCapital of Mayorate fleets and crashes the game with the NullPointer exception. I went through the JSON code but thus far couldn't find anything overtly weird so maybe I have something which is outdated with this Starsector version.

Which makes debugging worse is that it doesn't always crash and sometimes I  find one variant in the ship lists to buy without any glitch but later on a different market it crashes. I assumed one variant might be bugged but if I make all variants the same (aka they are the same but for their designation) the glitch still happens even after going through all three.

I generally add this to the mayorate faction:
"combatCapital": {
         "ilk_ravana_pursuit": 8,
         "ilk_ravana_CS": 12,
         "ilk_shiva_standard": 8,
         "ilk_shiva_heavy": 5,
         "ilk_shiva_artillery": 5,

         "fallback": {
            "combatLarge": 2
         }
      },


ilk_shiva_heavy
Code
{
    "displayName": "bulkwark",
    "fluxCapacitors": 30,
    "fluxVents": 21,
    "hullId": "ilk_shiva",
    "hullMods": [
"stabilizedshieldemitter",
"heavyarmor",
        "extendedshieldemitter"
    ],
    "variantId": "ilk_shiva_heavy",
    "weaponGroups": [
        {
            "autofire": false,
            "mode": "LINKED",
            "weapons": {"WS0022": "ilk_thermal_lance_big"}
        },
{
            "autofire": false,
            "mode": "ALTERNATING",
            "weapons": {
"WS0009": "ilk_nuke_large",
"WS0010": "ilk_nuke_large"
   }
        },
        {
            "autofire": false,
            "mode": "LINKED",
            "weapons": {
"WS0019": "ilk_fluxtorp",
"WS0011": "heavymauler",
"WS0012": "heavymauler",
"WS0013": "heavymauler",
                "WS0014": "heavymauler"
            }
        },
        {
            "autofire": true,
            "mode": "LINKED",
            "weapons": {
"WS0001": "irpulse",
                "WS0002": "irpulse",
"WS0003": "ilk_graser_light",
                "WS0004": "ilk_graser_light",
"WS0005": "ilk_graser_light",
                "WS0006": "ilk_graser_light",
"WS0020": "irpulse",
"WS0021": "irpulse"
            }
        },
        {
            "autofire": true,
            "mode": "LINKED",
            "weapons": {              
"WS0007": "ilk_graser_pd",
"WS0008": "ilk_graser_pd",              
"WS0015": "ilk_graser_pd",
"WS0016": "ilk_graser_pd",
                "WS0017": "ilk_graser_pd",
"WS0018": "ilk_graser_pd",
            }
        },
      
    ]
}


ilk_shiva_standard
Code
{
    "displayName": "ship of the wall",
    "fluxCapacitors": 30,
    "fluxVents": 21,
    "hullId": "ilk_shiva",
    "hullMods": [
"stabilizedshieldemitter",
"unstable_injector",
        "targetingunit"
    ],
    "variantId": "ilk_shiva_standard",
    "weaponGroups": [
        {
            "autofire": false,
            "mode": "LINKED",
            "weapons": {"WS0022": "ilk_thermal_lance_big"}
        },
{
            "autofire": false,
            "mode": "ALTERNATING",
            "weapons": {
"WS0009": "ilk_laserhead",
"WS0010": "ilk_laserhead"
   }
        },
        {
            "autofire": false,
            "mode": "LINKED",
            "weapons": {
"WS0019": "gauss",
"WS0011": "heavyneedler",
"WS0012": "heavyneedler",
"WS0013": "heavyneedler",
                "WS0014": "heavyneedler"
            }
        },
        {
            "autofire": true,
            "mode": "LINKED",
            "weapons": {
"WS0003": "ilk_graser_light",
                "WS0004": "ilk_graser_light",
"WS0005": "ilk_graser_light",
                "WS0006": "ilk_graser_light",
"WS0007": "ilk_graser_light",
"WS0008": "ilk_graser_light",              
"WS0020": "ilk_graser_light",
"WS0021": "ilk_graser_light"
            }
        },
        {
            "autofire": true,
            "mode": "LINKED",
            "weapons": {              
                "WS0001": "pdburst",
                "WS0002": "pdburst",
"WS0015": "ilk_graser_pd",
"WS0016": "ilk_graser_pd",
                "WS0017": "ilk_graser_pd",
"WS0018": "ilk_graser_pd",
            }
        },
      
    ]
}

ilk_shiva_artillery
Code
{
    "displayName": "longarm",
    "fluxCapacitors": 33,
    "fluxVents": 20,
    "hullId": "ilk_shiva",
    "hullMods": [
"stabilizedshieldemitter",
"extendedshieldemitter",
"pointdefenseai",
        "targetingunit"
    ],
    "variantId": "ilk_shiva_artillery",
    "weaponGroups": [
        {
            "autofire": false,
            "mode": "LINKED",
            "weapons": {"WS0022": "ilk_thermal_lance_big"}
        },
{
            "autofire": false,
            "mode": "LINKED",
            "weapons": {
"WS0009": "atropos",
"WS0010": "atropos"
   }
        },
        {
            "autofire": false,
            "mode": "LINKED",
            "weapons": {
                "WS0001": "ilk_driver",
                "WS0002": "ilk_driver",
"WS0019": "tachyonlance"
            }
        },
        {
            "autofire": true,
            "mode": "LINKED",
            "weapons": {
"WS0003": "ilk_graser_light",
                "WS0004": "ilk_graser_light",
"WS0005": "ilk_graser_light",
                "WS0006": "ilk_graser_light",
"WS0007": "ilk_graser_light",
"WS0008": "ilk_graser_light",
                "WS0015": "ilk_graser_light",
"WS0016": "ilk_graser_light",
                "WS0017": "ilk_graser_light",
"WS0018": "ilk_graser_light",
"WS0020": "ilk_graser_light",
"WS0021": "ilk_graser_light"
            }
        },
        {
            "autofire": true,
            "mode": "LINKED",
            "weapons": {
                "WS0011": "dualflak",
"WS0012": "dualflak",
"WS0013": "dualflak",
                "WS0014": "dualflak"
            }
        },
      
    ]
}
Logged