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

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

Open
AdminHcat opened this issue Aug 27, 2022 · 1 comment
Open

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

AdminHcat opened this issue Aug 27, 2022 · 1 comment

Comments

@AdminHcat
Copy link

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!

  • Jadx version: 1.4.4.70-d6c23a2a
  • Java version: 11.0.14.1
  • Java VM: Eclipse OpenJ9 Eclipse OpenJ9 VM
  • Platform: Windows 10 (10.0 amd64)
  • Max heap size: 5507 MB
  • Program args: -Xoptionsfile=D:\JDK\semeru-11.0.14.1\lib\options.default -Xlockword:mode=default,noLockword=java/lang/String,noLockword=java/util/MapEntry,noLockword=java/util/HashMap$Entry,noLockword=org/apache/harmony/luni/util/ModifiedMap$Entry,noLockword=java/util/Hashtable$Entry,noLockword=java/lang/invoke/MethodType,noLockword=java/lang/invoke/MethodHandle,noLockword=java/lang/invoke/CollectHandle,noLockword=java/lang/invoke/ConstructorHandle,noLockword=java/lang/invoke/ConvertHandle,noLockword=java/lang/invoke/ArgumentConversionHandle,noLockword=java/lang/invoke/AsTypeHandle,noLockword=java/lang/invoke/ExplicitCastHandle,noLockword=java/lang/invoke/FilterReturnHandle,noLockword=java/lang/invoke/DirectHandle,noLockword=java/lang/invoke/ReceiverBoundHandle,noLockword=java/lang/invoke/DynamicInvokerHandle,noLockword=java/lang/invoke/FieldHandle,noLockword=java/lang/invoke/FieldGetterHandle,noLockword=java/lang/invoke/FieldSetterHandle,noLockword=java/lang/invoke/StaticFieldGetterHandle,noLockword=java/lang/invoke/StaticFieldSetterHandle,noLockword=java/lang/invoke/IndirectHandle,noLockword=java/lang/invoke/InterfaceHandle,noLockword=java/lang/invoke/VirtualHandle,noLockword=java/lang/invoke/PrimitiveHandle,noLockword=java/lang/invoke/InvokeExactHandle,noLockword=java/lang/invoke/InvokeGenericHandle,noLockword=java/lang/invoke/VarargsCollectorHandle,noLockword=java/lang/invoke/ThunkTuple -Xjcl:jclse29 -Dcom.ibm.oti.vm.bootstrap.library.path=D:\JDK\semeru-11.0.14.1\bin\default;D:\JDK\semeru-11.0.14.1\bin -Dsun.boot.library.path=D:\JDK\semeru-11.0.14.1\bin\default;D:\JDK\semeru-11.0.14.1\bin -Djava.library.path=D:\JDK\semeru-11.0.14.1\bin\default;D:\JDK\semeru-11.0.14.1\bin;C:\Windows\system32;C:\Windows;D:\JDK\semeru-11.0.14.1\bin;"D:\JDK\corretto-11.0.13\bin;D:\JDK\corretto-11.0.13\jre\bin";C:\Program Files (x86)\VMware\VMware Workstation\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;D:\010 Editor;C:\Program Files\dotnet;C:\Program Files\Git\cmd;C:\Program Files\WinMerge;C:\Program Files\nodejs;D:\JDK\openjdk-17.0.1\bin;G:\Go\bin;C:\Program Files\Git LFS;D:\phpstudy_pro\Extensions\php\php8.0.2nts;D:\HcatRun;C:\Program Files\CMake\bin;;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Users\Hcat\AppData\Local\Programs\Python\Python39\Scripts;C:\Users\Hcat\AppData\Local\Programs\Python\Python39;C:\Users\Hcat\AppData\Local\Microsoft\WindowsApps;F:\PHP72;C:\Users\Hcat\AppData\Local\ComposerSetup\bin;C:\Users\Hcat\AppData\Roaming\Composer\vendor\bin;C:\Program Files\OpenSSL-Win64\bin;C:\Users\Hcat\AppData\Local\Pandoc;C:\Users\Hcat\AppData\Roaming\npm;C:\Users\Hcat\go\bin;C:\Users\Hcat\AppData\Local\Programs\EmEditor;D:\Sofaware\PhpStorm\bin;C:\Users\Hcat.dotnet\tools;D:\JDK\semeru-11.0.14.1\bin;. -Djava.home=D:\JDK\semeru-11.0.14.1 -Duser.dir=D:\Downloads\jadx-gui-1.4.4.70-d6c23a2a-no-jre-win.exe -Djava.class.path=.;D:\JDK\openjdk-17.0.1\lib\dt.jar;D:\JDK\openjdk-17.0.1\lib\tools.jar; -Xms393m -Xmx5507m -Dawt.useSystemAAFontSettings=lcd -Dswing.aatext=true -XX:+UseG1GC -Djava.util.Arrays.useLegacyMergeSort=true -Djava.class.path=D:\Downloads\jadx-gui-1.4.4.70-d6c23a2a-no-jre-win.exe\jadx-gui-1.4.4.70-d6c23a2a.exe;lib\jadx-gui-1.4.4.70-d6c23a2a-all.jar -Dsun.java.command=jadx.gui.JadxGUI -Dsun.java.launcher=SUN_STANDARD
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

@AdminHcat AdminHcat changed the title java.lang.IndexOutOfBoundsException: len=-8 [UI]java.lang.IndexOutOfBoundsException: len=-8 Aug 27, 2022
@jpstotz
Copy link
Collaborator

jpstotz commented Aug 27, 2022

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?

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

2 participants