Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Now I'm getting an NPE when trying to load my campaign from xml.
#1
Code:
Starting load of planetary data from XML...
Loaded a total of 2198 planets

Reading unit files:
  Reading from unit cache file...
  Looking in data/mechfiles...
  Looking in zip file data/mechfiles/Milliken_Marauders.zip...
  ...loaded 0 files.
  Looking in zip file data/mechfiles/protomechs.zip...
  ...loaded 0 files.
  Looking in zip file data/mechfiles/SmallCraft.zip...
  ...loaded 0 files.
  Looking in data/mechfiles/ge...
  ...loaded 0 files.
  Looking in zip file data/mechfiles/Infantry.zip...
  ...loaded 0 files.
  Looking in zip file data/mechfiles/Dropship.zip...
  ...loaded 0 files.
  Looking in zip file data/mechfiles/Fighters.zip...
  ...loaded 0 files.
  Looking in zip file data/mechfiles/Jumpships.zip...
  ...loaded 0 files.
  Looking in zip file data/mechfiles/SpaceStation.zip...
  ...loaded 0 files.
  Looking in zip file data/mechfiles/mechs.zip...
  ...loaded 0 files.
  Looking in zip file data/mechfiles/Warship.zip...
  ...loaded 0 files.
  Looking in zip file data/mechfiles/ConvFighter.zip...
  ...loaded 0 files.
  Looking in zip file data/mechfiles/unofficial.zip...
  ...loaded 0 files.
  Looking in zip file data/mechfiles/vehicles.zip...
  ...loaded 0 files.
  Looking in zip file data/mechfiles/battlearmor.zip...
  ...loaded 0 files.
  ...loaded 0 files.
5587 units loaded.
Loading more unit images from localserver_mechset.txt...
Loading more unit images from localclient_mechset.txt...
... finished localclient_mechset.txt.
... finished localserver_mechset.txt.
Staring MegaMekLab version: 0.0.0.20-Dev-100
MMRandom: generating RNG type #1
Loading campaign file from XML...
Starting load of campaign file from XML...
Loading Campaign Options from XML...
---
useFactionModifiers
    true
---
clanPriceModifier
    1.75
---
useEasierRefit
    true
---
useFactionForNames
    true
---
repairSystem
    0
---
useTactics
    true
---
useInitBonus
    true
---
useToughness
    true
---
useArtillery
    false
---
useAbilities
    true
---
useEdge
    true
---
useImplants
    true
---
useQuirks
    true
---
payForParts
    true
---
payForUnits
    true
---
payForSalaries
    true
---
payForOverhead
    true
---
payForMaintain
    true
---
payForTransport
    true
---
sellUnits
    true
---
sellParts
    true
---
scenarioXP
    1
Load Campaign Options Complete!
Loading Team Nodes from XML...
Load Team Nodes Complete!
Loading Unit Nodes from XML...
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning null from getEntityFromXmlString(String)...
Adding unit: (65):mekhq.campaign.Unit@f8b7298
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning null from getEntityFromXmlString(String)...
Adding unit: (64):mekhq.campaign.Unit@c106121
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning Entity [Daishi (Dire Wolf) A, -1] from getEntityFromXmlString(String)...
ID pre-defined and entity not null; setting entity's ID.
Adding unit: (61):mekhq.campaign.Unit@7c6d75b6
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning Entity [Masakari (Warhawk) Prime, -1] from getEntityFromXmlString(String)...
ID pre-defined and entity not null; setting entity's ID.
Adding unit: (60):mekhq.campaign.Unit@46fdb413
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning Entity [Mad Cat (Timber Wolf) Prime, -1] from getEntityFromXmlString(String)...
ID pre-defined and entity not null; setting entity's ID.
Adding unit: (58):mekhq.campaign.Unit@10db5b3f
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning Entity [Drillson Heavy Hover Tank, -1] from getEntityFromXmlString(String)...
ID pre-defined and entity not null; setting entity's ID.
Adding unit: (55):mekhq.campaign.Unit@23dd246
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning Entity [Drillson Heavy Hover Tank, -1] from getEntityFromXmlString(String)...
ID pre-defined and entity not null; setting entity's ID.
Adding unit: (54):mekhq.campaign.Unit@44a64a92
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning Entity [Drillson Heavy Hover Tank, -1] from getEntityFromXmlString(String)...
ID pre-defined and entity not null; setting entity's ID.
Adding unit: (53):mekhq.campaign.Unit@169da74
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning Entity [Drillson Heavy Hover Tank, -1] from getEntityFromXmlString(String)...
ID pre-defined and entity not null; setting entity's ID.
Adding unit: (52):mekhq.campaign.Unit@2d4c8822
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning Entity [Zhukov Heavy Tank, -1] from getEntityFromXmlString(String)...
ID pre-defined and entity not null; setting entity's ID.
Adding unit: (51):mekhq.campaign.Unit@7b7d8769
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning Entity [Zhukov Heavy Tank, -1] from getEntityFromXmlString(String)...
ID pre-defined and entity not null; setting entity's ID.
Adding unit: (50):mekhq.campaign.Unit@6e453dd5
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning Entity [Demolisher Heavy Tank (Gauss), -1] from getEntityFromXmlString(String)...
ID pre-defined and entity not null; setting entity's ID.
Adding unit: (49):mekhq.campaign.Unit@3dea382
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning Entity [Demolisher Heavy Tank (Gauss), -1] from getEntityFromXmlString(String)...
ID pre-defined and entity not null; setting entity's ID.
Adding unit: (48):mekhq.campaign.Unit@dc0adca
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning Entity [Demolisher Heavy Tank (Gauss), -1] from getEntityFromXmlString(String)...
ID pre-defined and entity not null; setting entity's ID.
Adding unit: (47):mekhq.campaign.Unit@64d1afd3
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning Entity [Demolisher Heavy Tank (Gauss), -1] from getEntityFromXmlString(String)...
ID pre-defined and entity not null; setting entity's ID.
Adding unit: (46):mekhq.campaign.Unit@26e795b
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning Entity [Demolisher Heavy Tank (Gauss), -1] from getEntityFromXmlString(String)...
ID pre-defined and entity not null; setting entity's ID.
Adding unit: (45):mekhq.campaign.Unit@2b115a61
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning Entity [Demolisher Heavy Tank (Gauss), -1] from getEntityFromXmlString(String)...
ID pre-defined and entity not null; setting entity's ID.
Adding unit: (44):mekhq.campaign.Unit@44ac5e
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning Entity [Venom SDR-10K-UK, -1] from getEntityFromXmlString(String)...
ID pre-defined and entity not null; setting entity's ID.
Adding unit: (43):mekhq.campaign.Unit@1c904f75
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning null from getEntityFromXmlString(String)...
Adding unit: (42):mekhq.campaign.Unit@465098f9
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning Entity [Slayer Milliken's Marauders 4, -1] from getEntityFromXmlString(String)...
ID pre-defined and entity not null; setting entity's ID.
Adding unit: (33):mekhq.campaign.Unit@556b277f
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning Entity [Slayer Milliken's Marauders 3, -1] from getEntityFromXmlString(String)...
ID pre-defined and entity not null; setting entity's ID.
Adding unit: (32):mekhq.campaign.Unit@6dee2ea8
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning Entity [Slayer Milliken's Marauders 2, -1] from getEntityFromXmlString(String)...
ID pre-defined and entity not null; setting entity's ID.
Adding unit: (31):mekhq.campaign.Unit@30394ffa
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning Entity [Slayer Milliken's Marauders 1, -1] from getEntityFromXmlString(String)...
ID pre-defined and entity not null; setting entity's ID.
Adding unit: (30):mekhq.campaign.Unit@2b1bed2
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning Entity [Union Milliken's Marauders, -1] from getEntityFromXmlString(String)...
ID pre-defined and entity not null; setting entity's ID.
Adding unit: (29):mekhq.campaign.Unit@40bf015
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning Entity [Zhukov Heavy Tank Milliken's Marauders 2, -1] from getEntityFromXmlString(String)...
ID pre-defined and entity not null; setting entity's ID.
Adding unit: (28):mekhq.campaign.Unit@2bbef4c6
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning Entity [Zhukov Heavy Tank Milliken's Marauders, -1] from getEntityFromXmlString(String)...
ID pre-defined and entity not null; setting entity's ID.
Adding unit: (27):mekhq.campaign.Unit@5b8099a
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning Entity [Demolisher II Heavy Tank Milliken's Marauders 2, -1] from getEntityFromXmlString(String)...
ID pre-defined and entity not null; setting entity's ID.
Adding unit: (26):mekhq.campaign.Unit@757e6064
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning Entity [Demolisher II Heavy Tank Milliken's Marauders, -1] from getEntityFromXmlString(String)...
ID pre-defined and entity not null; setting entity's ID.
Adding unit: (25):mekhq.campaign.Unit@3bea817f
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning null from getEntityFromXmlString(String)...
Adding unit: (23):mekhq.campaign.Unit@20dbd794
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning null from getEntityFromXmlString(String)...
Adding unit: (22):mekhq.campaign.Unit@41264666
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning null from getEntityFromXmlString(String)...
Adding unit: (21):mekhq.campaign.Unit@37d7f3f4
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning null from getEntityFromXmlString(String)...
Adding unit: (20):mekhq.campaign.Unit@42d134d0
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning null from getEntityFromXmlString(String)...
Adding unit: (19):mekhq.campaign.Unit@34e265f5
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning null from getEntityFromXmlString(String)...
Adding unit: (18):mekhq.campaign.Unit@7b93d2f2
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning null from getEntityFromXmlString(String)...
Adding unit: (17):mekhq.campaign.Unit@25fe4d40
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning null from getEntityFromXmlString(String)...
Adding unit: (16):mekhq.campaign.Unit@65ebba10
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning null from getEntityFromXmlString(String)...
Adding unit: (15):mekhq.campaign.Unit@5704a4b6
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning null from getEntityFromXmlString(String)...
Adding unit: (14):mekhq.campaign.Unit@71d9d55b
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning null from getEntityFromXmlString(String)...
Adding unit: (13):mekhq.campaign.Unit@144683c2
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning null from getEntityFromXmlString(String)...
Adding unit: (12):mekhq.campaign.Unit@21743ff4
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning null from getEntityFromXmlString(String)...
Adding unit: (11):mekhq.campaign.Unit@5712bd54
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning null from getEntityFromXmlString(String)...
Adding unit: (9):mekhq.campaign.Unit@f4c0275
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning null from getEntityFromXmlString(String)...
Adding unit: (7):mekhq.campaign.Unit@4735572b
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning null from getEntityFromXmlString(String)...
Adding unit: (6):mekhq.campaign.Unit@7eedec92
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning null from getEntityFromXmlString(String)...
Adding unit: (5):mekhq.campaign.Unit@3646a658
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning null from getEntityFromXmlString(String)...
Adding unit: (4):mekhq.campaign.Unit@5852f73e
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning null from getEntityFromXmlString(String)...
Adding unit: (3):mekhq.campaign.Unit@2ee634bf
Executing getEntityFromXmlString(Node)...
Executing getEntityFromXmlString(String)...
Returning null from getEntityFromXmlString(String)...
Adding unit: (2):mekhq.campaign.Unit@b90ffa7
Load Unit Nodes Complete!
Loading Personnel Nodes from XML...
Load Personnel Nodes Complete!
Loading Mission Nodes from XML...
Load Mission Nodes Complete!
Loading Force Organization from XML...
Load of Force Organization complete!
Loading Finances from XML...
Load of Finances complete!
Loading Skill Type Nodes from XML...
Load Skill Type Nodes Complete!
Loading Part Nodes from XML...
Load Part Nodes Complete!
java.lang.NullPointerException
    at mekhq.campaign.Unit.resetPilotAndEntity(Unit.java:2701)
    at mekhq.campaign.Campaign.createCampaignFromXMLFileInputStream(Campaign.java:1596)
    at mekhq.MekHQView.menuLoadXmlActionPerformed(MekHQView.java:2271)
    at mekhq.MekHQView.access$3600(MekHQView.java:158)
    at mekhq.MekHQView$44.actionPerformed(MekHQView.java:1668)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:809)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:850)
    at java.awt.Component.processMouseEvent(Component.java:6288)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
    at java.awt.Component.processEvent(Component.java:6053)
    at java.awt.Container.processEvent(Container.java:2041)
    at java.awt.Component.dispatchEventImpl(Component.java:4651)
    at java.awt.Container.dispatchEventImpl(Container.java:2099)
    at java.awt.Component.dispatchEvent(Component.java:4481)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
    at java.awt.Container.dispatchEventImpl(Container.java:2085)
    at java.awt.Window.dispatchEventImpl(Window.java:2478)
    at java.awt.Component.dispatchEvent(Component.java:4481)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:643)
    at java.awt.EventQueue.access$000(EventQueue.java:84)
    at java.awt.EventQueue$1.run(EventQueue.java:602)
    at java.awt.EventQueue$1.run(EventQueue.java:600)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
    at java.awt.EventQueue$2.run(EventQueue.java:616)
    at java.awt.EventQueue$2.run(EventQueue.java:614)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:613)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Reply
#2
In the bug report on the tracker I noted that I fixed this by removing the units.cache file and letting it reload all units fresh again.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Can't load/save your campaign? Taharqa 159 41,885 06-03-2019, 09:12 AM
Last Post: SilverSword
  campaign won't load after deleting a vehicle (GM mode) Cik 6 1,410 11-25-2014, 10:57 PM
Last Post: Cik
  Cannot load campaign, if there is no doctor? luiges90 2 891 02-25-2014, 01:28 PM
Last Post: ralgith
  Option to load a savegame and load Princess instead of TestBot? Vashnevskaya 4 1,934 03-30-2013, 11:37 AM
Last Post: Netzilla
  Help Please my campaign suddenly won't load waylander 2 1,160 02-16-2012, 03:16 PM
Last Post: Netzilla
  Unable to Load Saved Campaign T.S. Hawk 10 2,645 01-06-2012, 01:40 PM
Last Post: T.S. Hawk
  Cannot load campaign T.S. Hawk 2 1,365 12-23-2011, 02:14 AM
Last Post: Taharqa
  Unable to load campaign with v0.1.10 DaddyHolby 14 3,612 12-07-2011, 12:03 AM
Last Post: DaddyHolby

Forum Jump:


Users browsing this thread: 1 Guest(s)