Bug - Fixed Autoselling causes debug logs today!

Bale

Minion
r9590 seems to have a problem autoselling stuff today! Here are three separate attempts to autosell with two different characters:

Code:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
         KoLmafia v14.6 r9590, Windows XP, Java 1.6.0_26
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Please note: do not post this log in the KoLmafia thread. If you
 would like the 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 the log as an attachment.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Timestamp: Thu Jul 07 00:13:29 EDT 2011
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Unexpected error, debug log printed.
class java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
	at java.lang.StringBuffer.toString(Unknown Source)
	at net.sourceforge.kolmafia.request.GenericRequest.addFormField(GenericRequest.java:541)
	at net.sourceforge.kolmafia.request.GenericRequest.addFormField(GenericRequest.java:575)
	at net.sourceforge.kolmafia.request.AutoSellRequest.<init>(AutoSellRequest.java:72)
	at net.sourceforge.kolmafia.request.AutoSellRequest.getSubInstance(AutoSellRequest.java:312)
	at net.sourceforge.kolmafia.request.AutoSellRequest.generateSubInstances(AutoSellRequest.java:288)
	at net.sourceforge.kolmafia.request.TransferItemRequest.runSubInstances(TransferItemRequest.java:146)
	at net.sourceforge.kolmafia.request.TransferItemRequest.run(TransferItemRequest.java:311)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:73)
	at net.sourceforge.kolmafia.textui.command.AutoSellCommand.run(AutoSellCommand.java:57)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeCommand(KoLmafiaCLI.java:544)
	at net.sourceforge.kolmafia.textui.RuntimeLibrary.batch_close(RuntimeLibrary.java:1450)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.sourceforge.kolmafia.textui.parsetree.LibraryFunction.execute(LibraryFunction.java:126)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:166)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:451)
	at net.sourceforge.kolmafia.textui.parsetree.Conditional.execute(Conditional.java:94)
	at net.sourceforge.kolmafia.textui.parsetree.If.execute(If.java:67)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:451)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:129)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:166)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:451)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:129)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:166)
	at net.sourceforge.kolmafia.textui.parsetree.Assignment.execute(Assignment.java:101)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:451)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:129)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:166)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionReturn.execute(FunctionReturn.java:98)



=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
         KoLmafia v14.6 r9590, Windows XP, Java 1.6.0_26
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Please note: do not post this log in the KoLmafia thread. If you
 would like the 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 the log as an attachment.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Timestamp: Thu Jul 07 00:52:14 EDT 2011
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Unexpected error, debug log printed.
class java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
	at java.io.CharArrayWriter.<init>(Unknown Source)
	at java.io.CharArrayWriter.<init>(Unknown Source)
	at java.net.URLEncoder.encode(Unknown Source)
	at net.sourceforge.kolmafia.request.GenericRequest.addFormField(GenericRequest.java:546)
	at net.sourceforge.kolmafia.request.GenericRequest.addFormField(GenericRequest.java:575)
	at net.sourceforge.kolmafia.request.AutoSellRequest.<init>(AutoSellRequest.java:72)
	at net.sourceforge.kolmafia.request.AutoSellRequest.getSubInstance(AutoSellRequest.java:312)
	at net.sourceforge.kolmafia.request.AutoSellRequest.generateSubInstances(AutoSellRequest.java:288)
	at net.sourceforge.kolmafia.request.TransferItemRequest.runSubInstances(TransferItemRequest.java:146)
	at net.sourceforge.kolmafia.request.TransferItemRequest.run(TransferItemRequest.java:311)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:73)
	at net.sourceforge.kolmafia.textui.command.AutoSellCommand.run(AutoSellCommand.java:57)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeCommand(KoLmafiaCLI.java:544)
	at net.sourceforge.kolmafia.textui.RuntimeLibrary.batch_close(RuntimeLibrary.java:1450)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.sourceforge.kolmafia.textui.parsetree.LibraryFunction.execute(LibraryFunction.java:126)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:166)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:451)
	at net.sourceforge.kolmafia.textui.parsetree.Conditional.execute(Conditional.java:94)
	at net.sourceforge.kolmafia.textui.parsetree.If.execute(If.java:67)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:451)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:129)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:166)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:451)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:129)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:166)
	at net.sourceforge.kolmafia.textui.parsetree.Assignment.execute(Assignment.java:101)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:451)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:129)



=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
         KoLmafia v14.6 r9590, Windows XP, Java 1.6.0_26
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Please note: do not post this log in the KoLmafia thread. If you
 would like the 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 the log as an attachment.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Timestamp: Thu Jul 07 01:27:06 EDT 2011
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Unexpected error, debug log printed.
class java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
	at java.util.ArrayList.<init>(Unknown Source)
	at java.util.ArrayList.<init>(Unknown Source)
	at net.sourceforge.kolmafia.request.TransferItemRequest.<init>(TransferItemRequest.java:72)
	at net.sourceforge.kolmafia.request.TransferItemRequest.<init>(TransferItemRequest.java:91)
	at net.sourceforge.kolmafia.request.AutoSellRequest.<init>(AutoSellRequest.java:71)
	at net.sourceforge.kolmafia.request.AutoSellRequest.getSubInstance(AutoSellRequest.java:312)
	at net.sourceforge.kolmafia.request.AutoSellRequest.generateSubInstances(AutoSellRequest.java:288)
	at net.sourceforge.kolmafia.request.TransferItemRequest.runSubInstances(TransferItemRequest.java:146)
	at net.sourceforge.kolmafia.request.TransferItemRequest.run(TransferItemRequest.java:311)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:73)
	at net.sourceforge.kolmafia.textui.command.AutoSellCommand.run(AutoSellCommand.java:57)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeCommand(KoLmafiaCLI.java:544)
	at net.sourceforge.kolmafia.textui.RuntimeLibrary.batch_close(RuntimeLibrary.java:1450)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.sourceforge.kolmafia.textui.parsetree.LibraryFunction.execute(LibraryFunction.java:126)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:166)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:451)
	at net.sourceforge.kolmafia.textui.parsetree.Conditional.execute(Conditional.java:94)
	at net.sourceforge.kolmafia.textui.parsetree.If.execute(If.java:67)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:451)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:129)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:166)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:451)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:129)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:166)
	at net.sourceforge.kolmafia.textui.parsetree.Assignment.execute(Assignment.java:101)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:451)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:129)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:166)
 

Bale

Minion
What?! Holy cow. Why did it only cause a problem for autoselling?

I'll reboot and see if it works.
 

Bale

Minion
I rebooted and it caused the same problem.

When OCD Inventory hits the autosell portion of its program my CPU usage spikes and stays that way for a while until I get an unexpected error. The autosell seems to be causing the error.

I tried a simple autosell command in the relay browser and it then works fine without even needing to restart KoL. Then I tried a CLI command to autosell 11 items and I ran into the CPU spike again. WTH?

I tried removing batch_open() and batch_close() from autoselling and it still didn't like me. I've had to completely disable autoselling.
 

AlbinoRhino

Active member
I rebooted and it caused the same problem.

When OCD Inventory hits the autosell portion of its program my CPU usage spikes and stays that way for a while until I get an unexpected error. The autosell seems to be causing the error.

I tried a simple autosell command in the relay browser and it then works fine without even needing to restart KoL. Then I tried a CLI command to autosell 11 items and I ran into the CPU spike again. WTH?

I tried removing batch_open() and batch_close() from autoselling and it still didn't like me. I've had to completely disable autoselling.

I've got the same symptoms.
 

roippi

Developer
Got it too.

Code:
> autosell 13 angry farmer candy

Code:
Exception in thread "CommandQueueHandler" java.lang.OutOfMemoryError: Java heap space
	at java.lang.AbstractStringBuilder.<init>(Unknown Source)
	at java.lang.StringBuffer.<init>(Unknown Source)
	at net.sourceforge.kolmafia.request.GenericRequest.addFormField(GenericRequest.java:541)
	at net.sourceforge.kolmafia.request.GenericRequest.addFormField(GenericRequest.java:575)
	at net.sourceforge.kolmafia.request.AutoSellRequest.<init>(AutoSellRequest.java:72)
	at net.sourceforge.kolmafia.request.AutoSellRequest.getSubInstance(AutoSellRequest.java:312)
	at net.sourceforge.kolmafia.request.AutoSellRequest.generateSubInstances(AutoSellRequest.java:288)
	at net.sourceforge.kolmafia.request.TransferItemRequest.runSubInstances(TransferItemRequest.java:146)
	at net.sourceforge.kolmafia.request.TransferItemRequest.run(TransferItemRequest.java:311)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:73)
	at net.sourceforge.kolmafia.textui.command.AutoSellCommand.run(AutoSellCommand.java:57)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeCommand(KoLmafiaCLI.java:544)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeLine(KoLmafiaCLI.java:418)
	at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.handleQueue(CommandDisplayFrame.java:202)
	at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.run(CommandDisplayFrame.java:183)
[ConditionalEventPump] Exception occurred during event dispatching:
java.lang.OutOfMemoryError: Java heap space
	at sun.awt.image.SunVolatileImage.createGraphics(Unknown Source)
	at java.awt.image.VolatileImage.getGraphics(Unknown Source)
	at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
	at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
	at javax.swing.RepaintManager.paint(Unknown Source)
	at javax.swing.JComponent._paintImmediately(Unknown Source)
	at javax.swing.JComponent.paintImmediately(Unknown Source)
	at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
	at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$000(Unknown Source)
	at java.awt.EventQueue$1.run(Unknown Source)
	at java.awt.EventQueue$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.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)
 

DoctorRotelle

Developer
I went from 9581 to 9590 and started having memory leak issues. Also encountering NPEs (of mysterious origin):

Code:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
         KoLmafia v14.6 r9593, Windows XP, Java 1.6.0_26
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Please note: do not post this log in the KoLmafia thread. If you
 would like the 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 the log as an attachment.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Timestamp: Thu Jul 07 08:24:06 PDT 2011
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Unexpected error, debug log printed.
class java.lang.NullPointerException: null
java.lang.NullPointerException
	at javax.swing.text.Utilities.isComposedTextElement(Unknown Source)
	at javax.swing.text.AbstractDocument.handleRemove(Unknown Source)
	at javax.swing.text.AbstractDocument.remove(Unknown Source)
	at javax.swing.JEditorPane.setText(Unknown Source)
	at net.sourceforge.kolmafia.swingui.panel.AdventureSelectPanel$SafetyField.setSafetyString(AdventureSelectPanel.java:987)
	at net.sourceforge.kolmafia.swingui.panel.AdventureSelectPanel$SafetyField.run(AdventureSelectPanel.java:962)
	at net.sourceforge.kolmafia.KoLCharacterAdapter.updateStatus(KoLCharacterAdapter.java:60)
	at net.sourceforge.kolmafia.KoLCharacter.updateStatus(KoLCharacter.java:3729)
	at net.sourceforge.kolmafia.KoLCharacter.setHP(KoLCharacter.java:1049)
	at net.sourceforge.kolmafia.request.CharPaneRequest.handleMiscPoints(CharPaneRequest.java:517)
	at net.sourceforge.kolmafia.request.CharPaneRequest.handleExpandedMode(CharPaneRequest.java:414)
	at net.sourceforge.kolmafia.request.CharPaneRequest.processCharacterPane(CharPaneRequest.java:242)
	at net.sourceforge.kolmafia.request.CharPaneRequest.processResults(CharPaneRequest.java:147)
	at net.sourceforge.kolmafia.request.GenericRequest.processResponse(GenericRequest.java:1839)
	at net.sourceforge.kolmafia.request.GenericRequest.retrieveServerReply(GenericRequest.java:1756)
	at net.sourceforge.kolmafia.request.GenericRequest.retrieveServerReply(GenericRequest.java:1496)
	at net.sourceforge.kolmafia.request.GenericRequest.execute(GenericRequest.java:1230)
	at net.sourceforge.kolmafia.request.GenericRequest.run(GenericRequest.java:1121)
	at net.sourceforge.kolmafia.request.CharPaneRequest.run(CharPaneRequest.java:140)
	at net.sourceforge.kolmafia.request.GenericRequest.processResponse(GenericRequest.java:1883)
	at net.sourceforge.kolmafia.request.GenericRequest.retrieveServerReply(GenericRequest.java:1756)
	at net.sourceforge.kolmafia.request.GenericRequest.retrieveServerReply(GenericRequest.java:1496)
	at net.sourceforge.kolmafia.request.GenericRequest.execute(GenericRequest.java:1230)
	at net.sourceforge.kolmafia.request.GenericRequest.run(GenericRequest.java:1121)
	at net.sourceforge.kolmafia.request.FamiliarRequest.run(FamiliarRequest.java:219)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:73)
	at net.sourceforge.kolmafia.textui.command.FamiliarCommand.run(FamiliarCommand.java:153)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeCommand(KoLmafiaCLI.java:544)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeLine(KoLmafiaCLI.java:418)
	at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.handleQueue(CommandDisplayFrame.java:202)
	at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.run(CommandDisplayFrame.java:183)
 
Last edited:

roippi

Developer
Okay. Tracked it down to 9584 (slime stack tracking) and, specifically, this function added to AdventureResult.java:

Code:
public int hashCode()
	{
		// objects equal according to equals() need to generate the same hash code
		char SEP = ' ';
		
		StringBuffer sb = new StringBuffer();
		
		// equal count sizes
		sb.append( count.length );
		
		// equal item IDs
		sb.append( SEP );
		if ( isItem() )
			sb.append( itemId );
		else
			sb.append( -1 );
		
		// equal names
		// put this last since it's the only thing which can contain a space
		sb.append( SEP );
		sb.append( name.toLowerCase() );
		
		return sb.hashCode();
	}
 

xKiv

Active member
I was also getting issues with *some* batches of autosell (three got through easily, the last one repeatedly - over several restarts and doubling available memory - ended like this, always in batch_close (no suprprise there)).
I wanted to check it in a debugger but I was already many hours past bedtime.
The one that didn't get through had some powders ... actually, I have the same scripts and datafiles on this computer now, I can check ...
...
the failed batch is (yesterday was - didn't try it now yet):
26 twinkly powder
70 twinkly nuggets
17 sleaze powder
...
(those should all be item_amount() - 100)
...
tried it now with the script (several empty batch_open(); .. ; batch_close();, then another with those three autosell() calls inside, got OutOfMemoryError inside (this time):
Code:
	at net.sourceforge.kolmafia.request.GenericRequest.addFormField(GenericRequest.java:541)
	at net.sourceforge.kolmafia.request.GenericRequest.addFormField(GenericRequest.java:575)
	at net.sourceforge.kolmafia.request.AutoSellRequest.<init>(AutoSellRequest.java:72)
	at net.sourceforge.kolmafia.request.AutoSellRequest.getSubInstance(AutoSellRequest.java:312)
	at net.sourceforge.kolmafia.request.AutoSellRequest.generateSubInstances(AutoSellRequest.java:288)
	at net.sourceforge.kolmafia.request.TransferItemRequest.runSubInstances(TransferItemRequest.java:146)
	at net.sourceforge.kolmafia.request.TransferItemRequest.run(TransferItemRequest.java:311)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:73)
	at net.sourceforge.kolmafia.textui.command.AutoSellCommand.run(AutoSellCommand.java:57)

It seems to be always inside generateSubInstances (unless it distance-affects the GUI, then it happens inside some GUI innards).


Test 2, directly from gCLI (only difference should be that I refer to the items with names, when batches convert them using \u00B6 and item id)
... same result.

EDIT: pre-empted by somebody who actually knows how to find the culprit!
So, I guess this is because the new hasCode compares counts, which get changed inside AutoSellRequest.generateSubInstances() (if I am looking correctly, which I probably amn't).
Then HashMap can't find (it.remove(); at line 283 of AutoSellRequest) can't find the AdventureRequest because its hash changed and it's now stored in a different slot.
Then others.size() is always > 0 and the while infini-loops, adding the same item to the items array over and over and over until it can't.
 
Last edited:

Veracity

Developer
Staff member
Ah ha. I pulled that in from Aankhen's patch because it LOOKED right - even though I didn't need it.
Out it goes.
 

Veracity

Developer
Staff member
Revision 9594. Tell me if it works, please, 'cause I'd love to spin a release and reclaim my life. :)
 

xKiv

Active member
Ah. Anyway, I was wrong. It's not because the values used in the "new" hasCode change, it's because it returns sb.hashCode on a different StringBuilder, which doesn't have it's own hashCode and therefore uses the default from Object, which is just the object id (therefore, the entire AdventureResult.hashCode method was completely bogus, creating string that was never used for anything).



ETA: works for me now.
 
Last edited:

Bale

Minion
I ran my extremely reproducible test case.

It's great now. Thank you. Go spin the release!
 
Top