anathema / anathema_legacy

Anathema is an exhaustive suite for all aspects of Exalted series management. This repository hold the code to support Exalted 1, Exalted 2 and Exalted 2.5.
http://anathema.github.com
69 stars 70 forks source link

Java Error On Some Custom Charms #350

Closed thegreatersea closed 11 years ago

thegreatersea commented 11 years ago

I have been adding custom charms. Most of these are displaying correctly, but a few (no more than two per tree) are showing on the tree, but the tooltip doesn't display and generates a java error. I though it might be punctuation-related, but there doesn't seem to be any rhyme or reason to which charms have tooltips and which don't. The error follows:

java.lang.ArrayIndexOutOfBoundsException: 1
    at net.sf.anathema.character.generic.framework.magic.stringbuilder.SpecialCharmStringBuilder.printTieredLimit(SpecialCharmStringBuilder.java:53)
    at net.sf.anathema.character.generic.framework.magic.stringbuilder.SpecialCharmStringBuilder.buildStringForMagic(SpecialCharmStringBuilder.java:43)
    at net.sf.anathema.character.generic.framework.magic.stringbuilder.CharmInfoStringBuilder.getInfoString(CharmInfoStringBuilder.java:36)
    at net.sf.anathema.charmtree.presenter.view.AbstractCharmTreeViewProperties.getToolTip(AbstractCharmTreeViewProperties.java:31)
    at net.sf.anathema.platform.tree.view.interaction.SetToolTipWithDetails$TooltipSetter.toggled(SetToolTipWithDetails.java:31)
    at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.jmock.example.announcer.Announcer.announce(Announcer.java:43)
    at org.jmock.example.announcer.Announcer.access$000(Announcer.java:11)
    at org.jmock.example.announcer.Announcer$1.invoke(Announcer.java:22)
    at com.sun.proxy.$Proxy25.toggled(Unknown Source)
    at net.sf.anathema.platform.tree.view.container.DefaultContainerCascade$1.run(DefaultContainerCascade.java:25)
    at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.jmock.example.announcer.Announcer.announce(Announcer.java:43)
    at org.jmock.example.announcer.Announcer.access$000(Announcer.java:11)
    at org.jmock.example.announcer.Announcer$1.invoke(Announcer.java:22)
    at com.sun.proxy.$Proxy26.run(Unknown Source)
    at net.sf.anathema.platform.tree.view.draw.FilledPolygon.toggle(FilledPolygon.java:34)
    at net.sf.anathema.platform.tree.view.interaction.SetToolTipWithDetails.execute(SetToolTipWithDetails.java:24)
    at net.sf.anathema.platform.tree.view.interaction.ElementExecutor.perform(ElementExecutor.java:14)
    at net.sf.anathema.platform.tree.view.interaction.ToolTipListener.mouseMoved(ToolTipListener.java:21)
    at java.awt.AWTEventMulticaster.mouseMoved(AWTEventMulticaster.java:330)
    at java.awt.AWTEventMulticaster.mouseMoved(AWTEventMulticaster.java:329)
    at java.awt.Component.processMouseMotionEvent(Component.java:6550)
    at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3339)
    at java.awt.Component.processEvent(Component.java:6274)
    at java.awt.Container.processEvent(Container.java:2229)
    at java.awt.Component.dispatchEventImpl(Component.java:4861)
    at java.awt.Container.dispatchEventImpl(Container.java:2287)
    at java.awt.Component.dispatchEvent(Component.java:4687)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4505)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
    at java.awt.Container.dispatchEventImpl(Container.java:2273)
    at java.awt.Window.dispatchEventImpl(Window.java:2719)
    at java.awt.Component.dispatchEvent(Component.java:4687)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:729)
    at java.awt.EventQueue.access$200(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:688)
    at java.awt.EventQueue$3.run(EventQueue.java:686)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.awt.EventQueue$4.run(EventQueue.java:702)
    at java.awt.EventQueue$4.run(EventQueue.java:700)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:699)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

While I can handle xml, I can't parse java, and can't tell what exactly is the problem.

Thanks in advance!

UrsKR commented 11 years ago

I am on vacation and will have a look when I am back. In the meantime, could you post any of the offending Charms so I can run an experiment?

thegreatersea commented 11 years ago

I was about to go through and list a few problematic charms, but I just found the problem. The tooltip won't display correctly for charms with repurchases if I don't define the initial purchase as well. So, if I have an essence 2 charm with repurchases at 4 and 6, I have to define repurchases for 2, 4, and 6. Thanks for the quick response!

UrsKR commented 11 years ago

I was expecting something like this, but I could not be sure without your Charm. Thanks for taking care of it yourself!