crumpx / upk-modder

Automatically exported from code.google.com/p/upk-modder
0 stars 1 forks source link

Won't start after failed open of modfile #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
v0.65, Windows 7 64-bit

Would not load two longer upk_mod files I created with v0.6. The tabs appeared 
but the editing window never opened. Some mods I created with 0.5 worked.

Upon shutdown and attempted restart, received this error:

C:\Users\John\Downloads\Game Mods\xcom\Long War EW\UPKmodder v0.65>java -jar "UP
Kmodder.jar"
Dec 23, 2013 6:43:05 PM ui.MainFrame$ProjectTreeModel addProject
INFO: Project 'Alien Squad Composition' successfully loaded
Dec 23, 2013 6:43:05 PM ui.ModTab <init>
SEVERE: Failure in ModTab component initiation: java.lang.NullPointerException
Exception in thread "main" java.lang.NullPointerException
        at ui.ModTab.getUpkFile(ModTab.java:487)
        at ui.MainFrame$22.stateChanged(MainFrame.java:997)
        at javax.swing.JTabbedPane.fireStateChanged(Unknown Source)
        at javax.swing.JTabbedPane$ModelListener.stateChanged(Unknown Source)
        at javax.swing.DefaultSingleSelectionModel.fireStateChanged(Unknown Sour
ce)
        at javax.swing.DefaultSingleSelectionModel.setSelectedIndex(Unknown Sour
ce)
        at javax.swing.JTabbedPane.setSelectedIndexImpl(Unknown Source)
        at javax.swing.JTabbedPane.setSelectedIndex(Unknown Source)
        at javax.swing.JTabbedPane.insertTab(Unknown Source)
        at javax.swing.JTabbedPane.addTab(Unknown Source)
        at ui.ButtonTabbedPane.addTab(ButtonTabbedPane.java:40)
        at ui.MainFrame.initComponents(MainFrame.java:808)
        at ui.MainFrame.<init>(MainFrame.java:203)
        at ui.MainFrame.getInstance(MainFrame.java:223)
        at ui.Launcher.main(Launcher.java:24)

And 0.65 would not start.

Here's the header of one of the files
MODFILEVERSION=4
UPKFILE=XComStrategyGame.upk 
GUID=9C F8 70 10 21 38 A0 41 8B 33 A4 2E E8 71 23 00 // EW patch 0/1
FUNCTION=HasPrereqs@XGTechTree
KEYWORD=Custom Tech Prereqs

I changed the modfileversion in notepad++ and still had this problem.

Original issue reported on code.google.com by johnnyl...@gmail.com on 24 Dec 2013 at 1:49

GoogleCodeExporter commented 8 years ago
Deleting appState.properties allowed me to restart.

I removed or commented out the "KEYWORD" entry and could load up the modfiles 
successfully, so I think something is bugged there.

Original comment by johnnyl...@gmail.com on 24 Dec 2013 at 1:55

GoogleCodeExporter commented 8 years ago
Found defect in the lazy instantiation of the ModTree.keywords list:

was:
        // lazily instantiate keywords only if any are present
        if(this.keywords.isEmpty()) {
            this.keywords = new ArrayList<>();
        }
should be:
        // lazily instantiate keywords only if any are present
        if(this.keywords == null) {
            this.keywords = new ArrayList<>();
        }

Corrected and will be in next version. Current workaround is to not use or 
comment out KEYWORD= lines.

Original comment by miss.inv...@gmail.com on 24 Dec 2013 at 4:28