Bug net.sourceforge.kolmafia.swingui.AdventureFrame could not be loaded

PFC Walker

New member
Got this error when trying to load the latest release version of KoL Mafia (v17.12 r18288). Exception log follows:

Code:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
        KoLmafia v17.12 r18288, Windows 8.1, Java 1.8.0_60
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Please note: do not post this log in the KoLmafia thread of KoL's
 Gameplay-Discussion forum. If you would like the KoLmafia dev team
 to look at it, please write a bug report at kolmafia.us. Include
 specific information about what you were doing when you made this
 and include this log as an attachment.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Timestamp: Wed Dec 27 11:23:31 EST 2017
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


net.sourceforge.kolmafia.swingui.AdventureFrame could not be loaded
class java.lang.NullPointerException: null
java.lang.NullPointerException
	at net.sourceforge.kolmafia.KoLDesktop.showComponent(KoLDesktop.java:306)
	at net.sourceforge.kolmafia.CreateFrameRunnable.createFrame(CreateFrameRunnable.java:228)
	at net.sourceforge.kolmafia.CreateFrameRunnable.run(CreateFrameRunnable.java:164)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
net.sourceforge.kolmafia.swingui.AdventureFrame could not be loaded

Retested in a recent daily build per SOP (using build #2460, filename KoLmafia-18348.jar), and have confirmed that the error does not occur with that version.
 

Attachments

  • DEBUG_20171227.txt
    34.9 KB · Views: 26

lostcalpolydude

Developer
Staff member
Retested in a recent daily build per SOP (using build #2460, filename KoLmafia-18348.jar), and have confirmed that the error does not occur with that version.

I suspect that it was actually closing and restarting mafia that led to not getting the error.

I've seen enough people mention this in chat (including today, with 18348) that there must be something going on, but I have no idea what.
 

PFC Walker

New member
I suspect that it was actually closing and restarting mafia that led to not getting the error.

I've seen enough people mention this in chat (including today, with 18348) that there must be something going on, but I have no idea what.

Well, I just checked 17.12 again (after all, it doesn't hurt to be thorough), and I got the same error in the CLI.

Interestingly, the debug log for this iteration of the error is a lot more verbose:

Code:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
        KoLmafia v17.12 r18288, Windows 8.1, Java 1.8.0_60
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Please note: do not post this log in the KoLmafia thread of KoL's
 Gameplay-Discussion forum. If you would like the KoLmafia dev team
 to look at it, please write a bug report at kolmafia.us. Include
 specific information about what you were doing when you made this
 and include this log as an attachment.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Timestamp: Wed Dec 27 12:50:23 EST 2017
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


net.sourceforge.kolmafia.swingui.AdventureFrame could not be loaded
class java.lang.reflect.InvocationTargetException: null
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at net.sourceforge.kolmafia.CreateFrameRunnable.runConstruction(CreateFrameRunnable.java:286)
	at net.sourceforge.kolmafia.CreateFrameRunnable.createFrame(CreateFrameRunnable.java:182)
	at net.sourceforge.kolmafia.CreateFrameRunnable.run(CreateFrameRunnable.java:164)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.NullPointerException
	at net.sourceforge.kolmafia.persistence.SkillDatabase.getSkillName(SkillDatabase.java:1611)
	at net.sourceforge.kolmafia.persistence.SkillDatabase.getCombatSkillName(SkillDatabase.java:1680)
	at net.sourceforge.kolmafia.combat.CombatActionManager.getLongCombatOptionName(CombatActionManager.java:496)
	at net.sourceforge.kolmafia.combat.CustomCombatAction.<init>(CustomCombatAction.java:72)
	at net.sourceforge.kolmafia.combat.CustomCombatStrategy.addCombatAction(CustomCombatStrategy.java:211)
	at net.sourceforge.kolmafia.combat.CustomCombatLookup.addEncounterAction(CustomCombatLookup.java:184)
	at net.sourceforge.kolmafia.combat.CustomCombatLookup.load(CustomCombatLookup.java:317)
	at net.sourceforge.kolmafia.combat.CombatActionManager.loadStrategyLookup(CombatActionManager.java:159)
	at net.sourceforge.kolmafia.combat.CombatActionManager.updateFromPreferences(CombatActionManager.java:81)
	at net.sourceforge.kolmafia.swingui.panel.CustomCombatPanel.updateFromPreferences(CustomCombatPanel.java:158)
	at net.sourceforge.kolmafia.swingui.panel.CustomCombatPanel.<init>(CustomCombatPanel.java:146)
	at net.sourceforge.kolmafia.swingui.AdventureFrame.getSouthernTabs(AdventureFrame.java:228)
	at net.sourceforge.kolmafia.swingui.AdventureFrame.<init>(AdventureFrame.java:98)
	... 21 more
net.sourceforge.kolmafia.swingui.AdventureFrame could not be loaded
class java.lang.NullPointerException: null
java.lang.NullPointerException
	at net.sourceforge.kolmafia.persistence.SkillDatabase.getSkillName(SkillDatabase.java:1611)
	at net.sourceforge.kolmafia.persistence.SkillDatabase.getCombatSkillName(SkillDatabase.java:1680)
	at net.sourceforge.kolmafia.combat.CombatActionManager.getLongCombatOptionName(CombatActionManager.java:496)
	at net.sourceforge.kolmafia.combat.CustomCombatAction.<init>(CustomCombatAction.java:72)
	at net.sourceforge.kolmafia.combat.CustomCombatStrategy.addCombatAction(CustomCombatStrategy.java:211)
	at net.sourceforge.kolmafia.combat.CustomCombatLookup.addEncounterAction(CustomCombatLookup.java:184)
	at net.sourceforge.kolmafia.combat.CustomCombatLookup.load(CustomCombatLookup.java:317)
	at net.sourceforge.kolmafia.combat.CombatActionManager.loadStrategyLookup(CombatActionManager.java:159)
	at net.sourceforge.kolmafia.combat.CombatActionManager.updateFromPreferences(CombatActionManager.java:81)
	at net.sourceforge.kolmafia.swingui.panel.CustomCombatPanel.updateFromPreferences(CustomCombatPanel.java:158)
	at net.sourceforge.kolmafia.swingui.panel.CustomCombatPanel.<init>(CustomCombatPanel.java:146)
	at net.sourceforge.kolmafia.swingui.AdventureFrame.getSouthernTabs(AdventureFrame.java:228)
	at net.sourceforge.kolmafia.swingui.AdventureFrame.<init>(AdventureFrame.java:98)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at net.sourceforge.kolmafia.CreateFrameRunnable.runConstruction(CreateFrameRunnable.java:286)
	at net.sourceforge.kolmafia.CreateFrameRunnable.createFrame(CreateFrameRunnable.java:182)
	at net.sourceforge.kolmafia.CreateFrameRunnable.run(CreateFrameRunnable.java:164)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
net.sourceforge.kolmafia.swingui.AdventureFrame could not be loaded

Hopefully that will give you guys some more clues as to where to start looking.
 

Attachments

  • DEBUG_20171227.txt
    41.3 KB · Views: 13

PFC Walker

New member
Let's see your CCS file.

I've got three, but they don't do anything out of the ordinary; one's the default (special action/attack with weapon), and the other two just execute Disco Combos (the first is DDoD/DD2/DD3/KITD, the second is DDoD/DD2/DD3/KIDT/DI).

DisCombobulation.ccs:
Code:
[ default ]
skill disco dance of doom
skill disco dance ii: electric boogaloo
skill disco dance 3: back in the habit
skill knife in the dark
attack with weapon

DisCombat.ccs:
Code:
[ default ]
skill disco dance of doom
skill disco dance ii: electric boogaloo
skill disco dance 3: back in the habit
skill knife in the dark
skill disco inferno
attack with weapon

ETA: Side note, I've been using these for a good few weeks and never had any problems.
 

Veracity

Developer
Staff member
OK. The second exception occurred when it tried to build the CCS panel, failed to get a skill name, and threw a null pointer exception.
We shouldn't do that.

Can you actually attach the CCS file you are using? I'd like to look closely at the actual file. When I get home from work. :)
 

PFC Walker

New member
OK. The second exception occurred when it tried to build the CCS panel, failed to get a skill name, and threw a null pointer exception.
We shouldn't do that.

Can you actually attach the CCS file you are using? I'd like to look closely at the actual file. When I get home from work. :)

Well, since .CCS isn't considered a valid extension by the forum, I can't upload them as .CCS files. (Hence why I copy-and-pasted the contents of said files.)

I could stick them in a .ZIP, if that's okay.
 

PFC Walker

New member
Consider it done! (I included the default CCS file just for safety's sake; even though they're all fairly basic, it wouldn't surprise me if the absolute simplest CCS was what was breaking things.)
 

Attachments

  • PFC Walker's Disco Combo Scripts.zip
    712 bytes · Views: 15

xKiv

Active member
The first NPE is in "selected.requestFocus()" in
Code:
		int currentTabIndex = KoLDesktop.INSTANCE.tabs.getSelectedIndex();
		if ( tabIndex == currentTabIndex )
		{
			JComponent selected = (JComponent)KoLDesktop.INSTANCE.tabs.getSelectedComponent();
			selected.requestFocus();
		}

which at least *looks* like lack of synchronization (selected index has already been set, but selected component is still null).
Timing issues that can only comes up with extremely slow servers?

But the second exception looks like ... skill database has not been properly initialized yet .. in a way that doesn't seem to be possible (there would have to be a type COMBAT skill in skillTypeById but either a) not in skillById or ii) with null name or 3) not in canonicalNames ... oh, canonicalNames is initialized last, after skillById and skillByTypeId are completely populated, that might be it?)?
 
Top