Bug - Not A Bug Ed forgets servants after logout

Xande1

Member
Recently, whenever I log in as Ed during a run, mafia thinks the only servant I have available is the active one. The mafia UI familiar switcher doesn't show any servants to switch to, and the "servants" command shows only one servant (the current one) available. Visiting the servant's quarters doesn't fix it, but manually switching servants "reminds" mafia that the one switched to exists (you have to switch to each available servant for mafia to recognize it, and upon logging out and back in, all servants except the current one are forgotten). This happens on multiple accounts. Let me know what other info I can provide.
 

lostcalpolydude

Developer
Staff member
You didn't bother to mention what mafia version you are using, so I'm going to assume this is part of the image URL changeover and was already fixed by 16843 or 16845.
 

Xande1

Member
The original report was written on r16843. I'm now running r16846, and it's still happening, so it's not fixed yet. But I think you're right that it's related to the image URL changeover. See attached screenshot of the servants' quarters, the image for the current servant is there, but all the other servants are broken. For whatever reason, the URL to the active servant image is correct, but all the inactive servants are pointing to a URL which starts with the text ".IMAGES.".

kolmafia-bug2.png

Also, here's a debug log when visiting the servants' quarters.
Code:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
           KoLmafia v17.2 r16846, Linux, Java 1.7.0_95
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 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 Apr 03 21:19:42 CDT 2016
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


class net.sourceforge.kolmafia.request.RelayRequest
Connecting to place.php...

Requesting: http://www.kingdomofloathing.com/place.php?whichplace=edbase&action=edbase_door
2 request properties
Field: Cookie = [chatpwd=197; charpwd=186; appserver=www8; PHPSESSID=tqs1ltl7l09jj5me6f57oa5dq1]
Field: User-Agent = [KoLmafia v17.2]

Retrieving server reply...

Retrieved: http://www.kingdomofloathing.com/place.php?whichplace=edbase&action=edbase_door
11 header fields
Field: null = [HTTP/1.1 302 Found]
Field: Date = [Mon, 04 Apr 2016 02:19:44 GMT]
Field: Content-Length = [0]
Field: Expires = [Thu, 19 Nov 1981 08:52:00 GMT]
Field: Location = [choice.php?forceoption=0]
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]

Starting relay script: choice.ash
class net.sourceforge.kolmafia.request.RelayRequest
Connecting to choice.php...

Requesting: http://www.kingdomofloathing.com/choice.php?forceoption=0
2 request properties
Field: Cookie = [appserver=www8; PHPSESSID=tqs1ltl7l09jj5me6f57oa5dq1]
Field: User-Agent = [KoLmafia v17.2]

Retrieving server reply...

Retrieved: http://www.kingdomofloathing.com/choice.php?forceoption=0
10 header fields
Field: null = [HTTP/1.1 200 OK]
Field: Transfer-Encoding = [chunked]
Field: Date = [Mon, 04 Apr 2016 02:19:44 GMT]
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 13485 characters.
<html><head><script language=Javascript><!--if (parent.frames.length == 0) location.href="game.php";//--></script><script language=Javascript src="https://s3.amazonaws.com/images.kingdomofloathing.com/scripts/jquery-1.5.1.js"></script><script language=Javascript src="https://s3.amazonaws.com/images.kingdomofloathing.com/scripts/keybinds.min.2.js"></script><script language=Javascript src="https://s3.amazonaws.com/images.kingdomofloathing.com/scripts/window.20111231.js"></script><script language="javascript">function chatFocus(){if(top.chatpane.document.chatform.graf) top.chatpane.document.chatform.graf.focus();}if (typeof defaultBind != 'undefined') { defaultBind(47, 2, chatFocus); defaultBind(190, 2, chatFocus);defaultBind(191, 2, chatFocus); defaultBind(47, 8, chatFocus);defaultBind(190, 8, chatFocus); defaultBind(191, 8, chatFocus); }</script><script>function switchFocus(){if (top.chatpane.document.chatform.graf.focus)top.chatpane.document.chatform.graf.focus();return false;}function repeat(){var linx = document.getElementsByTagName("A");for (var i = 0; i < linx.length; i++){if (typeof timersfunc != 'undefined') {if (!timersfunc()) {return;}timersfunc = null;}var link = linx[i];if (link.innerHTML.match(/Adventure Again/) || link.innerHTML.match(/Do it again/))location.href = link.href;}}defaultBind(47, CTRL, switchFocus);defaultBind(191, CTRL, switchFocus);defaultBind(47, META, switchFocus);defaultBind(191, META, switchFocus);defaultBind(192, NONE, repeat);defaultBind(220, NONE, repeat);</script><script language="javascript">function updateParseItem(iid, field, info) {var tbl = $('#ic'+iid);var data = parseItem(tbl);if (!data) return;data[field] = info;var out = [];for (i in data) {if (!data.hasOwnProperty(i)) continue;out.push(i+'='+data[i]);}tbl.attr('rel', out.join('&'));}function parseItem(tbl) {tbl = $(tbl);var rel = tbl.attr('rel');var data = {};if (!rel) return data;var parts = rel.split('&');for (i in parts) {if (!parts.hasOwnProperty(i)) continue;var kv = parts[i].split('=');tbl.data(kv[0], kv[1]);data[kv[0]] = kv[1];}return data;}</script><script type="text/javascript" src="https://s3.amazonaws.com/images.kingdomofloathing.com/scripts/pop_query.20130705.js"></script><script type="text/javascript" src="https://s3.amazonaws.com/images.kingdomofloathing.com/scripts/ircm.20150220.js"></script><script type="text/javascript">function pop_ircm_contents(i, some) {var contents = '',shown = 0,da = ' <a href="#" rel="?" class="small dojaxy">[some]</a> <a href="#" rel="',db = '" class="small dojaxy">[all]</a>',dc = '<div style="width:100%; padding-bottom: 3px;" rel="',dd = '<a href="#" rel="1" class="small dojaxy">[';one = 'one'; ss=some;if (i.d==1 && i.s>0) { shown++;contents += dc + 'sellstuff.php?action=sell&ajax=1&type=quant&whichitem%5B%5D=IID&howmany=NUM&pwd=0694bad07c94c992167b4e5a379d0483" id="pircm_'+i.id+'"><b>Auto-Sell ('+i.s+' meat):</b> '+dd+one+']</a>';if (ss) { contents += da + i.n + db;}contents += '</div>';}one = 'one'; ss=some;if (i.q==0) { shown++;contents += dc + 'inventory.php?action=closetpush&ajax=1&whichitem=IID&qty=NUM&pwd=0694bad07c94c992167b4e5a379d0483" id="pircm_'+i.id+'"><b>Closet:</b> '+dd+one+']</a>';if (ss) { contents += da + i.n + db;}contents += '</div>';}one = 'one'; ss=some;if (i.q==0 && i.g==0 && i.t==1) { shown++;contents += dc + 'managestore.php?action=additem&qty1=NUM&item1=IID&price1=&limit1=&ajax=1&pwd=0694bad07c94c992167b4e5a379d0483" id="pircm_'+i.id+'"><b>Stock in Mall:</b> '+dd+one+']</a>';if (ss) { contents += da + i.n + db;}contents += '</div>';}one = 'one'; ss=some;if (i.q==0) { shown++;contents += dc + 'managecollection.php?action=put&ajax=1&whichitem1=IID&howmany1=NUM&pwd=0694bad07c94c992167b4e5a379d0483" id="pircm_'+i.id+'"><b>Add to Display Case:</b> '+dd+one+']</a>';if (ss) { contents += da + i.n + db;}contents += '</div>';}one = 'one'; ss=some;if (i.q==0 && i.t==1) { shown++;contents += dc + 'clan_stash.php?action=addgoodies&ajax=1&item1=IID&qty1=NUM&pwd=0694bad07c94c992167b4e5a379d0483" id="pircm_'+i.id+'"><b>Contribute to Clan:</b> '+dd+one+']</a>';if (ss) { contents += da + i.n + db;}contents += '</div>';}one = 'one'; ss=some;if (i.q==0 && i.p==0 && i.u=="q" && i.d==1 && i.t==1) { shown++;contents += dc + 'craft.php?action=pulverize&ajax=1&smashitem=IID&qty=NUM&pwd=0694bad07c94c992167b4e5a379d0483" id="pircm_'+i.id+'"><b>Pulverize:</b> '+dd+one+']</a>';if (ss) { contents += da + i.n + db;}contents += '</div>';}one = 'one'; ss=some;if (i.u && i.u != ".") { shown++;contents += dc + 'inv_'+(i.u=="a"?"redir":(lab=(i.u=="u"?"use":(i.u=="e"?"eat":(i.u=="b"?"booze":(i.u=="s"?"spleen":"equip"))))))+'.php?ajax=1&whichitem=IID&itemquantity=NUM&quantity=NUM'+(i.u=="q"?"&action=equip":"")+'&pwd=0694bad07c94c992167b4e5a379d0483" id="pircm_'+i.id+'"><b>'+ucfirst(unescape(i.ou ? i.ou.replace(/\+/g," ") : (lab=="booze"?"drink":lab)))+':</b> '+dd+one+']</a>';if (ss && i.u != 'q' && !(i.u=='u' && i.m==0)) { contents += da + i.n + db;}contents += '</div>';}return [contents, shown];}var todo = [];function nextAction() {var next_todo = todo.shift();if (next_todo) {eval(next_todo);}}function dojax(dourl, afterFunc, hoverCaller, failureFunc, method, params) {$.ajax({type: method || 'GET', url: dourl, cache: false,data: params || null,global: false,success: function (out) {nextAction();if (out.match(/no\|/)) {var parts = out.split(/\|/);if (failureFunc) failureFunc(parts[1]);else if (window.dojaxFailure) window.dojaxFailure(parts[1]);else if (top.chatpane.handleMessage) top.chatpane.handleMessage({type: 'event', msg: 'Oops!  Sorry, Dave, you appear to be ' + parts[1]});else  $('#ChatWindow').append('<font color="green">Oops!  Sorry, Dave, you appear to be ' + parts[1] + '.</font><br />' + "\n");return;}if (hoverCaller)  {float_results(hoverCaller, out);if (afterFunc) { afterFunc(out); }return;}$(top.mainpane.document).find("#effdiv").remove(); if(!window.dontscroll || (window.dontscroll && dontscroll==0)) { window.scroll(0,0);}var $eff = $(top.mainpane.document).find('#effdiv');if ($eff.length == 0) {var d = top.mainpane.document.createElement('DIV');d.id = 'effdiv';var b = top.mainpane.document.body;if ($('#content_').length > 0) {b = $('#content_ div:first')[0];}b.insertBefore(d, b.firstChild);$eff = $(d);}$eff.find('a[name="effdivtop"]').remove().end().prepend('<a name="effdivtop"></a><center>' + out + '</center>').css('display','block');if (!window.dontscroll || (window.dontscroll && dontscroll==0)) {top.mainpane.document.location = top.mainpane.document.location + "#effdivtop";}if (afterFunc) { afterFunc(out); }}});}</script><script>var currentkey = 49;$(document).ready(function () {$('form').each(function () {var form = this;defaultBind(currentkey++, NONE, function () { form.submit(); });return currentkey < 58;});});</script>	<link rel="stylesheet" type="text/css" href="https://s3.amazonaws.com/images.kingdomofloathing.com/styles.20151006.css"><style type='text/css'>.faded {zoom: 1;filter: alpha(opacity=35);opacity: 0.35;-khtml-opacity: 0.35;-moz-opacity: 0.35;}</style></head><body><Center><table  width=95%  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>The Servants' Quarters</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td>Most of the servants who were buried with you are still sealed in their fancy stone sarcophagi. Being dead's no excuse for slacking on the job, though. Perhaps it's time you woke one of them up and put them to work.<p><b>Busy Servant</b>: <img src=https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/edserv3.gif>Temabamen, the Maid (lvl. 14, 208 XP) <small>[<a href=# id="ren">rename</a>]</small><br><span class=tiny>   <font color=blue><B>Level 1:</b> Helps find meat</font><br>   <font color=blue><b>Level 7:</b> Attacks enemies</font><br>   <font color=blue><b>Level 14:</b> Prevents enemy attacks</font><br>   <font color=gray><b>Level 21:</b> Teaches you how to find meat</font><br></span><div style="display: none" id="rename"><form method="post" action="choice.php" style="display:inline"><input type="hidden" name="whichchoice" value="1053" /><input type="hidden" name="option" value="2" /><input type="hidden" name="pwd" value="0694bad07c94c992167b4e5a379d0483" /><input type="hidden" name="sid" value="3" /><input type="text" size="30" maxlen="30" name="name" value="Temabamen" /><input type="submit" class="button" value="Rename" /></form></div><p><b>Freed, but Lazy Servants</b><table><tr><td valign=top><img src='.IMAGES.'itemimages/edserv6.gif></td><td>Sennesamun, the Priest<br><span class=tiny>   <font color=blue><B>Level 1:</b> Attacks undead enemies</font><br>   <font color=blue><b>Level 7:</b> Improves evocation spells</font><br>   <font color=blue><b>Level 14:</b> Improves Ka drops</font><br>   <font color=blue><b>Level 21:</b> Teaches you how to improve spell damage</font><br></span></td><td valign=top>(level 21, 441 xp)</td><td valign=top><form method="post" action="choice.php" style="display:inline"><input type="hidden" name="whichchoice" value="1053" /><input type="hidden" name="option" value="1" /><input type="hidden" name="pwd" value="0694bad07c94c992167b4e5a379d0483" /><input type="hidden" name="sid" value="6" /><input type="submit" class="button" value="Put to Work" /></form></td></tr><tr><td valign=top><img src='.IMAGES.'itemimages/edserv1.gif></td><td>Ankhaten, the Cat<br><span class=tiny>   <font color=blue><B>Level 1:</b> Gives unpleasant gifts</font><br>   <font color=blue><b>Level 7:</b> Helps find items</font><br>   <font color=gray><b>Level 14:</b> Lowers enemy stats</font><br>   <font color=gray><b>Level 21:</b> Teaches you how to find items</font><br></span></td><td valign=top>(level 10, 102 xp)</td><td valign=top><form method="post" action="choice.php" style="display:inline"><input type="hidden" name="whichchoice" value="1053" /><input type="hidden" name="option" value="1" /><input type="hidden" name="pwd" value="0694bad07c94c992167b4e5a379d0483" /><input type="hidden" name="sid" value="1" /><input type="submit" class="button" value="Put to Work" /></form></td></tr><tr><td valign=top><img src='.IMAGES.'itemimages/edserv5.gif></td><td>Bahkhemose, the Scribe<br><span class=tiny>   <font color=blue><B>Level 1:</b> Improves stat gains</font><br>   <font color=blue><b>Level 7:</b> Improves spell crit</font><br>   <font color=gray><b>Level 14:</b> Improves spell damage</font><br>   <font color=gray><b>Level 21:</b> Teaches you how to improve stat gains</font><br></span></td><td valign=top>(level 7, 63 xp)</td><td valign=top><form method="post" action="choice.php" style="display:inline"><input type="hidden" name="whichchoice" value="1053" /><input type="hidden" name="option" value="1" /><input type="hidden" name="pwd" value="0694bad07c94c992167b4e5a379d0483" /><input type="hidden" name="sid" value="5" /><input type="submit" class="button" value="Put to Work" /></form></td></tr></table><p><b>Entombed Servants</b> - You may release 0 more servants.<table><tr><td valign=top><img src='.IMAGES.'itemimages/edserv2.gif></td><td>Belly-Dancer<br><span class=tiny>   <font color=gray><B>Level 1:</b> Lowers enemy stats</font><br>   <font color=gray><b>Level 7:</b> Restores MP</font><br>   <font color=gray><b>Level 14:</b> Picks pockets</font><br>   <font color=gray><b>Level 21:</b> Teaches you how to restore MP</font><br></span></td></tr><tr><td valign=top><img src='.IMAGES.'itemimages/edserv4.gif></td><td>Bodyguard<br><span class=tiny>   <font color=gray><B>Level 1:</b> Prevents enemy attacks</font><br>   <font color=gray><b>Level 7:</b> Attacks enemies</font><br>   <font color=gray><b>Level 14:</b> Attacks enemies even when guarding</font><br>   <font color=gray><b>Level 21:</b> Teaches you how to defend yourself</font><br></span></td></tr><tr><td valign=top><img src='.IMAGES.'itemimages/edserv7.gif></td><td>Assassin<br><span class=tiny>   <font color=gray><B>Level 1:</b> Attacks enemies</font><br>   <font color=gray><b>Level 7:</b> Lowers enemy stats</font><br>   <font color=gray><b>Level 14:</b> Staggers enemies</font><br>   <font color=gray><b>Level 21:</b> Teaches you how to improve physical attacks</font><br></span></td></tr></table><p><script>jQuery(function ($) {$('#ren').click(function (e) { $('#rename').toggle(); if ($('#rename').is(':visible')) $('#rename input[name="name"]')[0].focus(); } );});</script><p><center><a href="place.php?whichplace=edbase">Back to your Tomb</a></center></td></tr></table></center></td></tr><tr><td height=4></td></tr></table><!--faaaaaaart--></body></html>
Processing results...
Finished relay script: choice.ash
> debug off
 
Last edited:

heeheehee

Developer
Staff member
Hm. That... actually looks like a KoL error with some PHP that didn't actually concatenate strings properly. Check that it works in vanilla KoL (and if it doesn't, file an in-game bug report)?

based on this being in the debug log:
HTML:
<b>Busy Servant</b>: <img src=https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/edserv3.gif>
...
<b>Freed, but Lazy Servants</b><table><tr><td valign=top><img src='.IMAGES.'itemimages/edserv6.gif></td><td>Sennesamun, the Priest
 

Xande1

Member
Thanks for that. I hadn't even considered it might be a native KoL bug (but I also didn't realize it might be related to the image hosting change until you said so). It's fixed on the KoL end now.
 
Top