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

[bug] rare bug where renaming a (parameter?) will cause ArrayIndexOutOfBoundsException #89

Closed
Decencies opened this issue Apr 9, 2023 · 8 comments · Fixed by #90
Closed
Assignees
Labels
bug Something isn't working user interface affects the enigma ui

Comments

@Decencies
Copy link
Contributor

Decencies commented Apr 9, 2023

Occured when renaming parameter x (was previously var1, renamed to x) (also occurs when naming x as x)

image

When the exception is ignored, and the (deobf) package tree is focused, the containing package for the class in which the exception occured (in this case: package container from com/moonsworth/lunar/bridge/client/gui/container/GuiContainerBridge) will no longer be represented as a package, but as a class.

image

When the parent package (in this case: gui) is re-opened, it persists, until the class is re-named.

java_pGnXiq2z3p

Trace:

java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
	at java.base/java.util.Vector.elementAt(Vector.java:466)
	at java.desktop/javax.swing.tree.DefaultMutableTreeNode.getChildAt(DefaultMutableTreeNode.java:258)
	at java.desktop/javax.swing.tree.DefaultTreeModel.getChild(DefaultTreeModel.java:189)
	at java.desktop/javax.swing.tree.VariableHeightLayoutCache.createNodeAt(VariableHeightLayoutCache.java:764)
	at java.desktop/javax.swing.tree.VariableHeightLayoutCache.treeStructureChanged(VariableHeightLayoutCache.java:648)
	at java.desktop/javax.swing.plaf.basic.BasicTreeUI$Handler.treeStructureChanged(BasicTreeUI.java:4407)
	at java.desktop/javax.swing.tree.DefaultTreeModel.fireTreeStructureChanged(DefaultTreeModel.java:616)
	at java.desktop/javax.swing.tree.DefaultTreeModel.reload(DefaultTreeModel.java:320)
	at cuchaz.enigma.gui.ClassSelector.reload(ClassSelector.java:298)
	at cuchaz.enigma.gui.node.ClassSelectorClassNode$1.done(ClassSelectorClassNode.java:64)
	at java.desktop/javax.swing.SwingWorker$5.run(SwingWorker.java:750)
	at java.desktop/javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:848)
	at java.desktop/sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112)
	at java.desktop/javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:858)
	at java.desktop/javax.swing.Timer.fireActionPerformed(Timer.java:311)
	at java.desktop/javax.swing.Timer$DoPostEvent.run(Timer.java:243)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:771)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:741)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Version: latest

@ix0rai ix0rai added bug Something isn't working user interface affects the enigma ui labels Apr 9, 2023
@ix0rai ix0rai self-assigned this Apr 9, 2023
@uniformization
Copy link
Contributor

Same thing happened to me after I updated from b9edb8d to the latest commit.

@ix0rai
Copy link
Member

ix0rai commented Apr 10, 2023

to clarify, this wasn't happening before the merge of #84?

@ix0rai
Copy link
Member

ix0rai commented Apr 10, 2023

@Decencies also, could you provide the jar and mappings that are causing the issue?

@Decencies
Copy link
Contributor Author

@Decencies also, could you provide the jar and mappings that are causing the issue?

here https://github.com/Lunar-Mapping-Project/mappings/releases/tag/93d4dd4%2Fmaster haha

@Decencies Decencies reopened this Apr 10, 2023
@Decencies
Copy link
Contributor Author

Whoops

@ix0rai
Copy link
Member

ix0rai commented Apr 10, 2023

can reproduce, thank you!

@ix0rai
Copy link
Member

ix0rai commented Apr 10, 2023

this issue seems to not be a problem with #84, but a problem introduced in #60. looking into it!

@ix0rai
Copy link
Member

ix0rai commented Apr 10, 2023

fixed in 1.7.6.

ix0rai added a commit to ix0rai/enigma that referenced this issue Apr 11, 2023
ix0rai added a commit that referenced this issue Apr 12, 2023
* reload parent of updated class node upon stat reload completion (fixes #89)

* fix mapping stats skipping lambda parameters

* Revert "reload parent of updated class node upon stat reload completion (fixes #89)"

This reverts commit 0f85045.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working user interface affects the enigma ui
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants