Bug - Fixed Crafting broken by r12816

heeheehee

Developer
Staff member
Different bugs call for different threads.

My CLI and debug look the same, and I can't craft booze (haven't tried anything else yet):
Code:
Creating dry vodka martini (1)...
Looking at item #0...
Unexpected error, debug log printed.
Creation failed, no results detected.

ETA: note that this is after kol "restart" and last know quote from CDM is "Fixes are still in progress. Had an actual hardware failure on a crucial server. (Which even had a failover twin... but we had already failed over to this server after a previous issue and hadn't gotten the redundant server back up yet. Stupid Murphy!) ". Might be kol-side problem.

This is an issue with r12816, I believe (since that was the only change since r12815 that affected crafting items). With debugging on, I see that Mafia no longer specifies the two items to craft:

Code:
Verifying ingredients for vodka martini (1)...
Creating vodka martini (1)...
class net.sourceforge.kolmafia.request.CreateItemRequest
Connecting to craft.php...

Requesting: http://www.kingdomofloathing.com/craft.php?action=craft&mode=cocktail&ajax=1
3 request properties
Field: Cookie = [appserver=www8; PHPSESSID=blah]
Field: User-Agent = [KoLmafia v16.0]
Field: Content-Type = [application/x-www-form-urlencoded]

Retrieving server reply...

Retrieved: http://www.kingdomofloathing.com/craft.php?action=craft&mode=cocktail&ajax=1
10 header fields
Field: null = [HTTP/1.1 200 OK]
Field: Date = [Tue, 08 Oct 2013 00:47:24 GMT]
Field: Content-Length = [509]
Field: Expires = [Thu, 19 Nov 1981 08:52:00 GMT]
Field: Connection = [keep-alive]
Field: Content-Type = [text/html; charset=UTF-8]
Field: X-Powered-By = [PHP/5.3.3]
Field: Server = [nginx/1.0.15]
Field: Pragma = [no-cache]
Field: Cache-Control = [no-store, no-cache, must-revalidate, post-check=0, pre-check=0]

Retrieving server reply
ResponseText has 509 characters.
<script type="text/javascript">top.charpane.location.href="charpane.php";</script><script type="text/javascript">if (window.updateInv) updateInv([])</script><center><table  width=95%  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>Results:</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td>You need to pick two things in order to get your craft on.</td></tr></table></center></td></tr><tr><td height=4></td></tr></table></center>
Processing results...

I don't have time at the moment to look more closely into a fix, unfortunately :|
 

xKiv

Active member
Code:
         @Override
         public int getAdventuresUsed()
         {
 -               return  CreateItemRequest.getMultiplier( this.mixingMethod ) > 0 ?
 -                       CreateItemRequest.getAdventuresUsed( this.mixingMethod, this.quantityNeeded ) : 0;
 +               this.reconstructFields();
 +               return CreateItemRequest.getAdventuresUsed( this );
         }

reconstructFields throws away everything (including fields a and b, which are the two components) and builds a new one ... without the fields.
Why is this called in getAdventuresUsed???
 

xKiv

Active member
Damn, this "update to HEAD before checking a new bugfix" business is hard ...
Eventually verified fixed. At least for dirty martini.
 
Top