Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KMST 1.2.173: Certain Skill Tooltips give an error #260

Open
PirateIzzy opened this issue May 16, 2024 · 4 comments
Open

KMST 1.2.173: Certain Skill Tooltips give an error #260

PirateIzzy opened this issue May 16, 2024 · 4 comments

Comments

@PirateIzzy
Copy link
Contributor

PirateIzzy commented May 16, 2024

A few new skills were added in KMST 1.2.173 as part of the anniversary event give errors when rendering.

image
It applies to skill IDs 80003671, 80003672, and 80003677

Stack trace:

************** Exception Text **************
System.InvalidOperationException: Stack empty.
   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.Stack`1.Pop()
   at WzComparerR2.Calculator.Suffix(List`1 tokens)
   at WzComparerR2.Calculator.Parse(String mathExpression, Decimal[] args)
   at WzComparerR2.CharaSim.SummaryParser.GetSkillSummary(String H, Int32 Level, Dictionary`2 CommonProps, SummaryParams param, SkillSummaryOptions options)
   at WzComparerR2.CharaSim.SummaryParser.GetSkillSummary(Skill skill, Int32 level, StringResult sr, SummaryParams param, SkillSummaryOptions options)
   at WzComparerR2.CharaSimControl.SkillTooltipRender2.RenderSkill(CanvasRegion region, Int32& picH, List`1& splitterH)
   at WzComparerR2.CharaSimControl.SkillTooltipRender2.Render()
   at WzComparerR2.CharaSimControl.AfrmTooltip.PreRender()
   at WzComparerR2.CharaSimControl.AfrmTooltip.Refresh()
   at WzComparerR2.MainForm.quickView(Node node)
   at WzComparerR2.MainForm.advTree2_AfterNodeSelect_2(Object sender, AdvTreeNodeEventArgs e)
   at DevComponents.AdvTree.AdvTreeNodeEventHandler.Invoke(Object sender, AdvTreeNodeEventArgs e)
   at DevComponents.AdvTree.AdvTree.OnAfterNodeSelect(AdvTreeNodeEventArgs args)
   at DevComponents.AdvTree.AdvTree.SelectNode(Node node, eTreeAction action)
   at DevComponents.AdvTree.AdvTree.ٹ(Node ْ, MouseEventArgs ؾ, Point ٧)
   at DevComponents.AdvTree.AdvTree.OnMouseDown(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
@Kagamia
Copy link
Owner

Kagamia commented May 16, 2024

Any details? Could you help post a screenshot for the skill common properties?

@PirateIzzy
Copy link
Contributor Author

This is from 80003671:
image

80003672:
image

80003677:
image

For comparison this is 80003670, which renders fine:
image

I think the reason is because it has an extra ) at the end, i.e. 10*x-5*d(x/2)) instead of 10*x-5*d(x/2)

@Kagamia
Copy link
Owner

Kagamia commented May 16, 2024

So it is still due to the wrong math expression.

da*n Ne*on

@HikariCalyx
Copy link
Contributor

HikariCalyx commented Jul 8, 2024

I created a function named ExcessiveBracketFilter as a workaround for this issue, as shown in this commit:
HikariCalyx@a3989c7

image
Not sure if it's the best workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants