Bug - Not A Bug JAR versions after 26714 fail after login, no windows open

Hi!!! I finally got Java 17 installed from https://adoptium.net, and it fixed nothing. I went to the only KoLmafia that will run on this computer, and it just said KoLmafia.exe. Remembered revision is in titlebar: r26714. Found the JAR for that in Recycle Bin, restored it, works perfectly. Later and latest versions all fail immediately after login. Here is the entire debug log:

Code:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
         KoLmafia v21.9 r20942, Windows 10, Java 17.0.4.1
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 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: Sun Sep 11 20:55:17 CDT 2022
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 User: Christoph
 Current run: 38045
 MRU Script: Unknown
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Unexpected error, debug log printed.
class org.json.JSONException: A JSONArray text must start with '[' at 2 [character 1 line 2]
org.json.JSONException: A JSONArray text must start with '[' at 2 [character 1 line 2]
    at org.json.JSONTokener.syntaxError(JSONTokener.java:507)
    at org.json.JSONArray.<init>(JSONArray.java:109)
    at org.json.JSONArray.<init>(JSONArray.java:162)
    at net.sourceforge.kolmafia.persistence.ScriptManager.getJSONArray(ScriptManager.java:173)
    at net.sourceforge.kolmafia.persistence.ScriptManager.updateRepoScripts(ScriptManager.java:149)
    at net.sourceforge.kolmafia.persistence.ScriptManager.<clinit>(ScriptManager.java:136)
    at net.sourceforge.kolmafia.swingui.widget.TableCellFactory.getColumnNames(TableCellFactory.java:471)
    at net.sourceforge.kolmafia.swingui.widget.ShowDescriptionTable.<init>(ShowDescriptionTable.java:307)
    at net.sourceforge.kolmafia.swingui.widget.ShowDescriptionTable.<init>(ShowDescriptionTable.java:166)
    at net.sourceforge.kolmafia.swingui.panel.ItemTableManagePanel.<init>(ItemTableManagePanel.java:48)
    at net.sourceforge.kolmafia.swingui.panel.ItemTableManagePanel.<init>(ItemTableManagePanel.java:61)
    at net.sourceforge.kolmafia.swingui.panel.InventoryPanel.<init>(InventoryPanel.java:121)
    at net.sourceforge.kolmafia.swingui.panel.CreateSpecialPanel.<init>(CreateSpecialPanel.java:86)
    at net.sourceforge.kolmafia.swingui.ItemManageFrame.<init>(ItemManageFrame.java:218)
    at net.sourceforge.kolmafia.swingui.ItemManageFrame.<init>(ItemManageFrame.java:126)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
    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.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:308)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:771)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:741)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)



=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
            KoLmafia r26737, Windows 10, Java 17.0.4.1
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 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: Sun Sep 11 21:03:53 CDT 2022
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 User: Christoph
 Current run: 38045
 MRU Script: Unknown
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Unexpected error, debug log printed.
class org.json.JSONException: A JSONArray text must start with '[' at 2 [character 1 line 2]
org.json.JSONException: A JSONArray text must start with '[' at 2 [character 1 line 2]
    at org.json.JSONTokener.syntaxError(JSONTokener.java:521)
    at org.json.JSONArray.<init>(JSONArray.java:109)
    at org.json.JSONArray.<init>(JSONArray.java:162)
    at net.sourceforge.kolmafia.persistence.ScriptManager.getJSONArray(ScriptManager.java:122)
    at net.sourceforge.kolmafia.persistence.ScriptManager.updateRepoScripts(ScriptManager.java:102)
    at net.sourceforge.kolmafia.persistence.ScriptManager.<clinit>(ScriptManager.java:91)
    at net.sourceforge.kolmafia.swingui.widget.TableCellFactory.getColumnNames(TableCellFactory.java:397)
    at net.sourceforge.kolmafia.swingui.widget.ShowDescriptionTable.<init>(ShowDescriptionTable.java:241)
    at net.sourceforge.kolmafia.swingui.widget.ShowDescriptionTable.<init>(ShowDescriptionTable.java:112)
    at net.sourceforge.kolmafia.swingui.panel.ItemTableManagePanel.<init>(ItemTableManagePanel.java:16)
    at net.sourceforge.kolmafia.swingui.panel.ItemTableManagePanel.<init>(ItemTableManagePanel.java:36)
    at net.sourceforge.kolmafia.swingui.panel.InventoryPanel.<init>(InventoryPanel.java:64)
    at net.sourceforge.kolmafia.swingui.panel.CreateSpecialPanel.<init>(CreateSpecialPanel.java:39)
    at net.sourceforge.kolmafia.swingui.ItemManageFrame.<init>(ItemManageFrame.java:115)
    at net.sourceforge.kolmafia.swingui.ItemManageFrame.<init>(ItemManageFrame.java:73)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
    at net.sourceforge.kolmafia.CreateFrameRunnable.runConstruction(CreateFrameRunnable.java:205)
    at net.sourceforge.kolmafia.CreateFrameRunnable.createFrame(CreateFrameRunnable.java:119)
    at net.sourceforge.kolmafia.CreateFrameRunnable.run(CreateFrameRunnable.java:105)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:308)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:771)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:741)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

I really, really hope I've formed this post well. I don't want to be annoying. I've gotten this same error report on multiple JAR versions -- after r26714. Thank you so much.
 

heeheehee

Developer
Staff member
Does the file data/svnrepo.json exist? It sounds like you might have ended up with a bad cached file. Try deleting that, if so?

Aside: I am curious where these line numbers come from:
at net.sourceforge.kolmafia.persistence.ScriptManager.getJSONArray(ScriptManager.java:173)
at net.sourceforge.kolmafia.persistence.ScriptManager.updateRepoScripts(ScriptManager.java:149)
because that's not what my repo shows for the latest few revisions of ScriptManager.java.
 
Does the file data/svnrepo.json exist? It sounds like you might have ended up with a bad cached file. Try deleting that, if so?

Thanks for all the responses. This one made me start testing in a new folder. KoLmafia-26737.jar worked. I deleted all the subfolders and tried with KoLmafia-26728.jar, 26727, and 26726 -- deleting all created folders in between, just to be sure. The all worked!

So I apologize for my poor troubleshooting, remind myself error does not equal bug, and thank you all again.
 

heeheehee

Developer
Staff member
It looks like you're not running later versions, too:
Ah yes, good point. r25704 moved the requested svnrepo.json URL from Sourceforge to Github, and r25745 actually deletes svnrepo.json and tries to re-download it if it throws a JSONException when trying to parse.

Anyways, glad to see you figured out the problem.
 
Top