btraceio / btrace

BTrace - a safe, dynamic tracing tool for the Java platform
5.82k stars 961 forks source link

Exception in thread "main" java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0 #695

Closed successfBoy closed 1 month ago

successfBoy commented 3 months ago

gradle: classpath 'com.android.tools.build:gradle:7.2.2' distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip

配置: apply plugin: 'com.bytedance.rhea-trace'

implementation "com.bytedance.btrace:rhea-core:2.0.3-rc03"

rheaTrace { compilation { traceFilterFilePath = "" needPackageWithMethodMap = true applyMethodMappingFilePath = "" } }

执行命令: java -jar rhea-trace-processor-2.0.0.jar -a com.weo.projectz -t 10 -o output.pb rhea.all sched -fullClassName -debug -mode simple

报错

08-13 15:06:15.180 D RheaTrace : SystemTime is 0 08-13 15:06:15.180 D RheaTrace : BootTime is 16038188335075 08-13 15:06:15.180 D RheaTrace : Monotonic is 15431727692913 Exception in thread "main" java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0 at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100) at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106) at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302) at java.base/java.util.Objects.checkIndex(Objects.java:365) at java.base/java.util.ArrayList.get(ArrayList.java:428) at com.bytedance.rheatrace.processor.core.AppTraceProcessor.processBinary(AppTraceProcessor.java:200) at com.bytedance.rheatrace.processor.core.AppTraceProcessor.getBinaryTrace(AppTraceProcessor.java:50) at com.bytedance.rheatrace.processor.lite.LiteCapture.process(LiteCapture.java:73) at com.bytedance.rheatrace.processor.Main.main(Main.java:108) 08-13 15:06:15.236 D RheaTrace : Run adb shell setprop debug.rhea.startWhenAppLaunch 0 08-13 15:06:15.279 D RheaTrace : Run adb shell setprop debug.rhea.mainThreadOnly 0 08-13 15:06:15.324 D RheaTrace : Run adb shell setprop debug.rhea.methodDurThreshold 0 08-13 15:06:15.373 D RheaTrace : Run adb shell setprop debug.rhea.category.all 0 log.log

github-actions[bot] commented 1 month ago

Stale issue message

jbachorik commented 1 month ago

This issue is for a different 'btrace' (com.bytedance.rhea-trace)