Search results

  1. H

    Bug $class[none] causes java.lang.NullPointerException

    The root cause is that if this.content == null, then this: public Value get_path() { return DataTypes.makePathValue(getAscensionClass().getPath()); } tries to access getPath() on a null pointer.
  2. H

    Bug $class[none] causes java.lang.NullPointerException

    Two relevant pieces: 1. (note the absence of "path") 2. Unexpected error, debug log printed. class java.lang.NullPointerException: Cannot invoke "net.sourceforge.kolmafia.textui.AshRuntime.runtimeException(String)" because "interpreter" is null java.lang.NullPointerException: Cannot invoke...
  3. H

    Feature Functions as first-class objects in ASH

    I believe the traditional (unoptimized) interpreter implements lexically-scoped closures by creating a new scope on each function call (with the parent scope being where the function is defined), which allows you to capture the value of any provided arguments and local variables. Would I be...
  4. H

    Feature Functions as first-class objects in ASH

    Maybe in Java, but that's actually atypical, as far as I'm aware. function makeCounter(a) { // `a` below is bound to the provided function argument return () => a += 1; } > counter = makeCounter(5) () => a += 1 > counter() 6 > counter() 7 Closures have the ability to provide a...
  5. H

    Bug Images fail to load and multiple "Unexpected error, debug log printed" when clicking on any link in Relay

    You seem to have a DNS issue (per java.nio.channels.UnresolvedAddressException). Can you visit https://d2uyhvukfffg5a.cloudfront.net/otherimages/leftswordguy.gif in your browser?
  6. H

    Bug 1952 Mickey mantle pick in Deck of Every Card crash

    This looks very different from the deadlocks we were seeing. The only notable thread that I saw: "CommandQueueHandler" #138 prio=5 os_prio=0 cpu=196539.00ms elapsed=3659.80s tid=0x00007fbc5c499870 nid=0x28d2 waiting on condition [0x00007fbb6abfc000] java.lang.Thread.State: WAITING...
  7. H

    Bug - Not A Bug Effects stuck at zero turns, cannot continue without re-upping

    These effects are in your current Mood. (You can click on the Mood Setup subtab on the Adventure tab)
  8. H

    Bug 1952 Mickey mantle pick in Deck of Every Card crash

    I think this particular failure mode would, since I don't think any of these listeners are setting properties.
  9. H

    Bug 1952 Mickey mantle pick in Deck of Every Card crash

    I got timein to succeed locally, although I'm still tweaking the code. I suspect that in general, we need to trigger listener updates on the Swing event dispatch thread, to avoid Swing synchronization from causing deadlocks with preference reads.
  10. H

    Bug 1952 Mickey mantle pick in Deck of Every Card crash

    Okay. It turns out even if we move that out of the lock, we still run into issues, since LoginManager.timein() grabs the lock up the stack. I suppose I can make AdventureFrame.updateFromPreferences schedule on the event thread...
  11. H

    Bug 1952 Mickey mantle pick in Deck of Every Card crash

    This reproduces even with saveSettingsOnSet set to false. It looks like we're doing UI processing off the Swing Event dispatch thread (CommandQueueHandler is updating models...) which is causing a deadlock between Swing UI updates and preference reads. I made an edit that prints out the...
  12. H

    Bug 1952 Mickey mantle pick in Deck of Every Card crash

    This was triggered simply by executing `timein` in the CLI. It silently prints a debug log, but it can't really notify the user about that because the GUI is stalled.
  13. H

    Bug 1952 Mickey mantle pick in Deck of Every Card crash

    (I wrote a deadlock detector that spits out debug logs.)
  14. H

    Bug 1952 Mickey mantle pick in Deck of Every Card crash

    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= KoLmafia r27526-M, Linux, Java 17.0.8 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Please note: do not post this log in the KoLmafia thread of KoL's Gameplay-Discussion forum. If you would...
  15. H

    Bug 1952 Mickey mantle pick in Deck of Every Card crash

    I've stared at the code some more, and I think this could only be problematic when timing in across rollover. That's not relevant here (even if it is a real bug, which I'm still not convinced of). I don't see anything special about cheating for the Mickey Mantle card (in the code or otherwise)...
  16. H

    Bug 1952 Mickey mantle pick in Deck of Every Card crash

    This should be reverted as of r27526. Sorry for the breakage. @fronobulax I've started tinkering in https://github.com/kolmafia/kolmafia/pull/1889 if you want to play around there.
  17. H

    Bug 1952 Mickey mantle pick in Deck of Every Card crash

    One instance of deadlock potential: resetDailies (holding userValues) calls Preferences.setString, which eventually dispatches to setObject. If saveSettingsOnSet is true, this calls maybeSaveToFileAfterUpdating() which in turn calls saveToFile, which grabs lock. Meanwhile, reset() will grab...
  18. H

    Bug 1952 Mickey mantle pick in Deck of Every Card crash

    One of the threads is most likely the timein. In Veracity's case, that sounds like it was blocking the Swing event dispatch thread (since it was triggered by clicking on a UI element). ApiRequest.updateStatus(boolean) is a synchronized function. This calls ApiRequest.run(), which delegates to...
  19. H

    Bug 1952 Mickey mantle pick in Deck of Every Card crash

    Well. The usual questions I ask are more pedagogical to figure out what's going on. Java synchronized sections should be reentrant, namely that if a single thread can acquire the same lock multiple times in a call stack. For anyone who reproduced this: was Mafia pegging a full CPU core? That...
  20. H

    Bug 1952 Mickey mantle pick in Deck of Every Card crash

    My general rule of thumb is "revert and ask questions later".
Top