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

Incorrect log text with {this}, and NullPointerException on hover, for texts of copied abilities #13268

Open
Cguy7777 opened this issue Jan 28, 2025 · 0 comments
Labels
bug Bugs and errors

Comments

@Cguy7777
Copy link
Contributor

Tested on most recent commit at time of writing. (266f5ee)

To reproduce:

  1. Activate or trigger an ability, with or without {this} in its text.
  2. Copy that ability using e.g. Lithoform Engine.

Expected results:
The log explaining what just happened includes the text of the ability with "{this}" replaced by the proper name if necessary.
You can hover over the highlighted stack ability in the log for more information.

Actual results:
If present, the literal text "{this}" is kept in the log.
If it was a triggered ability, hovering over the highlighted text for the ability instantly results in a NPE (log below).

Example hover text copying the ETB of a Navigator's Compass:
12:06 AM, T2.M1: Human activates: copy target activated or triggered ability you control. You may choose new targets for the copy. from Lithoform Engine [749] targeting stack ability (When {this} enters, you gain 3 life.) [0c2]


Error type: CLIENT - unhandled error in GUI - NullPointerException

Client version: 1.4.55-V3 (build: runtime)
Java version: 11.0.25
Default charset: UTF-8

NullPointerException - look at server or client logs for more details

Stack trace:
mage.client.util.gui.GuiDisplayUtil.replaceNamesInRule(GuiDisplayUtil.java:432)
mage.client.util.gui.GuiDisplayUtil.getRulesFromCardView(GuiDisplayUtil.java:409)
org.mage.plugins.card.info.CardInfoPaneImpl.lambda$setCard$0(CardInfoPaneImpl.java:56)
java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
java.base/java.security.AccessController.doPrivileged(Native Method)
java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
and other 6 lines

@Cguy7777 Cguy7777 added the bug Bugs and errors label Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs and errors
Projects
None yet
Development

No branches or pull requests

1 participant