Bug - Fixed Debug Log generated: Fighting Goblin Madame in TCRS

MCroft

Developer
Staff member
This happenes every time times at the Knob Goblin Madam. I'm a TCRS AT/Vole


Happens if I'm in the relay browser or if I run from the client.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
KoLmafia v19.7 r19556, Mac OS X, Java 10.0.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: Fri Sep 20 23:28:05 CDT 2019
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Unexpected error, debug log printed.
class java.lang.IllegalArgumentException: Illegal group reference
java.lang.IllegalArgumentException: Illegal group reference
at java.base/java.util.regex.Matcher.appendExpandedReplacement(Matcher.java:1068)
at java.base/java.util.regex.Matcher.appendReplacement(Matcher.java:908)
at net.sourceforge.kolmafia.webui.UseLinkDecorator.addUseLink(UseLinkDecorator.java:599)
at net.sourceforge.kolmafia.webui.UseLinkDecorator.addNormalUseLinks(UseLinkDecorator.java:331)
at net.sourceforge.kolmafia.webui.UseLinkDecorator.decorate(UseLinkDecorator.java:151)
at net.sourceforge.kolmafia.RequestEditorKit.applyGlobalAdjustments(RequestEditorKit.java:655)
at net.sourceforge.kolmafia.RequestEditorKit.getFeatureRichHTML(RequestEditorKit.java:321)
at net.sourceforge.kolmafia.RequestEditorKit.getFeatureRichHTML(RequestEditorKit.java:292)
at net.sourceforge.kolmafia.RequestEditorKit.getFeatureRichHTML(RequestEditorKit.java:226)
at net.sourceforge.kolmafia.request.FightRequest.updateCombatData(FightRequest.java:2834)
at net.sourceforge.kolmafia.request.FightRequest.processResults(FightRequest.java:2039)
at net.sourceforge.kolmafia.request.GenericRequest.parseResults(GenericRequest.java:2875)
at net.sourceforge.kolmafia.request.GenericRequest.processResponse(GenericRequest.java:2609)
at net.sourceforge.kolmafia.request.GenericRequest.retrieveServerReply(GenericRequest.java:2517)
at net.sourceforge.kolmafia.request.GenericRequest.retrieveServerReply(GenericRequest.java:2090)
at net.sourceforge.kolmafia.request.GenericRequest.externalExecute(GenericRequest.java:1648)
at net.sourceforge.kolmafia.request.GenericRequest.execute(GenericRequest.java:1631)
at net.sourceforge.kolmafia.request.GenericRequest.run(GenericRequest.java:1349)
at net.sourceforge.kolmafia.request.RelayRequest.run(RelayRequest.java:3593)
at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:286)
at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:249)
at net.sourceforge.kolmafia.webui.RelayAgent.readServerResponse(RelayAgent.java:596)
at net.sourceforge.kolmafia.webui.RelayAgent.performRelay(RelayAgent.java:162)
at net.sourceforge.kolmafia.webui.RelayAgent.run(RelayAgent.java:135)
 

Veracity

Developer
Staff member
Knob perfume or whalebone corset?
Not that either fails for me. Just went to Harem and fought madams and found both items with no errors.
 

heeheehee

Developer
Staff member
The only thing I can think of (in UseLinkDecorator.java) is if link.getItemHtml() contains a dollar sign somehow (related to TCRS?). The regex always contains four capturing groups, even if some of them might be empty on occasion, so the base replacement string looks fine.
 

MCroft

Developer
Staff member
I've got a hewn spoon, so it may be searching for something it's not finding. I can try it with that on and off.
 

MCroft

Developer
Staff member
Effect for perfume has a $ in it...

anodized pressed Knob Goblin perfume
This is a bottle of perfume from the Knob Goblin Harem.If you put it on, it will make you smell like a Knob Goblin Harem Girl.

Type: potion
Selling Price: 27 Meat.
Effect: Make Meat FA$T! (61 Adventures)+20% Meat from Monsters
 

Veracity

Developer
Staff member
Can you get a debug log of (the last round of) a fight where you acquire the perfume?
Looking at the item matching pattern, I don't see how the effect it offers would appear.
 

Veracity

Developer
Staff member
Well ... I see the stack trace in your DEBUG log. I extracted the HTML from the immediately preceding fight and tested with it (in the gCLI, not logged in):

Code:
[color=green]> tcrs test Accordion Thief, Vole[/color]

Using data override: data/TCRS_Accordion_Thief_Vole.txt
Read file TCRS_Accordion_Thief_Vole.txt
Using data override: data/TCRS_Accordion_Thief_Vole_cafe_booze.txt
Read file TCRS_Accordion_Thief_Vole_cafe_booze.txt
Using data override: data/TCRS_Accordion_Thief_Vole_cafe_food.txt
Read file TCRS_Accordion_Thief_Vole_cafe_food.txt
Using data override: data/mallprices.txt

[color=green]> ash string_modifier( $item[ knob goblin perfume ], "Modifiers" )[/color]

Returned: Effect: "Make Meat FA$T!", Effect Duration: 61

[color=green]> test load perfume.txt[/color]

Read 18,156 bytes into a 18,156 character string

[color=green]> test fight 1[/color]

Round 2: Knob Goblin Madam takes 135 damage.
Round 2: wins the fight!
After Battle: Cubert slurps around, picking up discarded stash and bits.
You acquire an item: Knob Goblin perfume
You acquire an item: whalebone corset
After Battle: You gain 9 Fortitude
You gain a Muscle point!
After Battle: You gain 7 Enchantedness
After Battle: You gain 10 Sarcasm
Now, I added some debug printing and got this on my shell:

Code:
group(0) = You acquire an item: <b>whalebone corset</b></td>
group(1) = You acquire
group(2) =  an item: 
group(3) = whalebone corset
group(4) =
Not seeing the Knob gobline perfume, even though I see it in the page HTML. Investigating...
 

Veracity

Developer
Staff member
I had to edit another line to make it assume I was in TCRS so it would not validate the item name.

Code:
group(0) = You acquire an item: <b>anodized pressed Knob Goblin perfume</b></td>
group(1) = You acquire
group(2) =  an item: 
group(3) = anodized pressed Knob Goblin perfume
group(4) = 
group(0) = You acquire an item: <b>whalebone corset</b></td>
group(1) = You acquire
group(2) =  an item: 
group(3) = whalebone corset
group(4) =
No error. Pondering.
 

Veracity

Developer
Staff member
Ooh! Ohh! Got it.

Code:
group(0) = You acquire an item: <b>anodized pressed Knob Goblin perfume</b></td>
group(1) = You acquire
group(2) =  an item: 
group(3) = anodized pressed Knob Goblin perfume
group(4) = 
item HTML = <font size=1>[<a href="javascript:multiUse('multiuse.php',307,2);void(0);"><span style='position: relative;' onMouseOver="document.getElementById('whatif2').style.visibility='visible';" onMouseOut="document.getElementById('whatif2').style.visibility='hidden';"><table border=2 id='whatif2' style='background-color: white; visibility: hidden; position: absolute; right: 0px; top: 1.2em;'><tr><td>Meat Drop</td><td>20.00 (+20.00)</td></tr><tr><td>Effect Duration</td><td>61.00 (+61.00)</td></tr><tr><td>Effect</td><td>Make Meat FA$T!</td></tr></table>use multiple</span></a>]</font>
Our mouseover text includes the effect name.

OK, we need to quote any $ in the HTML.
 
Top