skylot / jadx

Dex to Java decompiler
Apache License 2.0
41.95k stars 4.9k forks source link

[UI]java.lang.IndexOutOfBoundsException: len=-8 #1658

Open AdminHcat opened 2 years ago

AdminHcat commented 2 years ago

Please describe what you did before the error occurred. IMPORTANT! If the error occurs with a specific APK file please attach or provide link to apk file!

java.lang.IndexOutOfBoundsException: len=-8
    at java.desktop/sun.font.FontDesignMetrics.charsWidth(FontDesignMetrics.java:502)
    at org.fife.ui.rsyntaxtextarea.TokenImpl.getWidthUpTo(TokenImpl.java:601)
    at org.fife.ui.rsyntaxtextarea.TokenImpl.getWidth(TokenImpl.java:570)
    at org.fife.ui.rsyntaxtextarea.TokenUtils.getSubTokenList(TokenUtils.java:122)
    at org.fife.ui.rsyntaxtextarea.WrappedSyntaxView$WrappedLine.calculateLineCount(WrappedSyntaxView.java:1193)
    at org.fife.ui.rsyntaxtextarea.WrappedSyntaxView$WrappedLine.getPreferredSpan(WrappedSyntaxView.java:1241)
    at java.desktop/javax.swing.text.View.getMinimumSpan(View.java:249)
    at java.desktop/javax.swing.text.BoxView.calculateMajorAxisRequirements(BoxView.java:872)
    at java.desktop/javax.swing.text.BoxView.checkRequests(BoxView.java:931)
    at java.desktop/javax.swing.text.BoxView.setSpanOnAxis(BoxView.java:330)
    at java.desktop/javax.swing.text.BoxView.layout(BoxView.java:710)
    at java.desktop/javax.swing.text.BoxView.setSize(BoxView.java:398)
    at org.fife.ui.rsyntaxtextarea.WrappedSyntaxView.setSize(WrappedSyntaxView.java:1023)
    at java.desktop/javax.swing.plaf.basic.BasicTextUI$RootView.setSize(BasicTextUI.java:1818)
    at java.desktop/javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:1109)
    at java.desktop/javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:1087)
    at java.desktop/javax.swing.text.DefaultCaret.repaintNewCaret(DefaultCaret.java:1318)
    at java.desktop/javax.swing.text.DefaultCaret$1.run(DefaultCaret.java:1296)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:708)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
    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)

image

jpstotz commented 2 years ago

Does this problem always occur when you start Jadx or is it specific to an app?

I am not familiar with Eclipse OpenJ9 Java but the posted program args looks strange: it contains libraries of multiple Java installations that have a different Java versions and vendor. Have you tried to use a standard OpenJDK distribution like Java 11 from https://adoptium.net to run Jadx if it also shows this error?