Closed JavierSegoviaCordoba closed 1 year ago
I have the same issue on mac
Same here on a Mac too, I had to get back on version 0.5.0-RC2
to make build properly.
Hi, sorry for the delay,
did you specify a custom version of the intellij engine?
@JavierSegoviaCordoba, could you provide your binary files of the report (files /build/kover/*.ic
) from Windows for analysis?
Don't worry @shanshin, I am using the default one provided by Kover 0.5.0. I can't access them because they are on CI. I will try to get them in my local machine.
Thanks, it will be very helpful!
hi @shanshin any update on this thread getting same error on mac. Log---
Task :android-sdk:koverHtmlReport FAILED Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 7 out of bounds for length 7 at jetbrains.coverage.report.idea.IDEACoverageClassInfo.getStatementStats(IDEACoverageClassInfo.java:129) at jetbrains.coverage.report.impl.StatisticsCalculatorImpl.computeForClass(StatisticsCalculatorImpl.java:51) at jetbrains.coverage.report.impl.StatisticsCalculatorImpl.doCompute(StatisticsCalculatorImpl.java:40) at jetbrains.coverage.report.impl.StatisticsCalculatorImpl.compute(StatisticsCalculatorImpl.java:34) at jetbrains.coverage.report.impl.html.HTMLReportBuilderImpl.generateReport(HTMLReportBuilderImpl.java:80) at jetbrains.coverage.report.impl.html.HTMLReportBuilderImpl.generateReport(HTMLReportBuilderImpl.java:76) at com.intellij.rt.coverage.report.Reporter.createHTMLReport(Reporter.java:53) at com.intellij.rt.coverage.report.Main.main(Main.java:48)
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':android-sdk:koverHtmlReport'.
Process 'command '/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
I tried to reproduce in my local machine but there it is working. @TiwariPankaj can you share what @shanshin needs? If not I have to setup the CI to save those files and it will take me some weeks.
@JavierSegoviaCordoba can you share any secure method to share binary, or do you want me to upload here?
If your project is open source you can share it here, if not I am not sure if you can be leaking private things.
@TiwariPankaj hi, we could not reproduce the problem on our local machines, so binary reports from problematic builds would be very useful. If you have an open source project or you can create a small reproducer, then you can publish binary reports for it - they contain information about all classes called inside the JVM, not just the classes of the project.
i faced the same issue. So far don't know the root cause unable to reproduce on macbook (os 12.0.1) problematic CI image: cimg/android:2022.01.1
Same here. on both local mackbook (12.3) and piepline (ubuntu).
I'm facing the same issue on Doist/ffs:
> Task :koverMergedHtmlReport FAILED
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 33 out of bounds for length 25
at jetbrains.coverage.report.idea.IDEACoverageClassInfo.getStatementStats(IDEACoverageClassInfo.java:129)
at jetbrains.coverage.report.impl.StatisticsCalculatorImpl.computeForClass(StatisticsCalculatorImpl.java:51)
at jetbrains.coverage.report.impl.StatisticsCalculatorImpl.doCompute(StatisticsCalculatorImpl.java:40)
at jetbrains.coverage.report.impl.StatisticsCalculatorImpl.compute(StatisticsCalculatorImpl.java:34)
at jetbrains.coverage.report.impl.html.HTMLReportBuilderImpl.generateReport(HTMLReportBuilderImpl.java:80)
at jetbrains.coverage.report.impl.html.HTMLReportBuilderImpl.generateReport(HTMLReportBuilderImpl.java:76)
at com.intellij.rt.coverage.report.Reporter.createHTMLReport(Reporter.java:53)
at com.intellij.rt.coverage.report.Main.main(Main.java:48)
Here are the binary files:
Same issue on my Mac
[2022.04.30 14:22:30] (Coverage): Failed to process unloaded class: org.revcloud.vader.specs.specs.Spec4$Spec4Builder, error: Index 145 out of bounds for length 117
java.lang.ArrayIndexOutOfBoundsException: Index 145 out of bounds for length 117
at org.jetbrains.coverage.org.objectweb.asm.ClassReader.readLabel(ClassReader.java:2644)
at org.jetbrains.coverage.org.objectweb.asm.ClassReader.createLabel(ClassReader.java:2660)
at org.jetbrains.coverage.org.objectweb.asm.ClassReader.createLabel(ClassReader.java:2671)
at org.jetbrains.coverage.org.objectweb.asm.ClassReader.readTypeAnnotations(ClassReader.java:2738)
at org.jetbrains.coverage.org.objectweb.asm.ClassReader.readCode(ClassReader.java:1902)
at org.jetbrains.coverage.org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1482)
at org.jetbrains.coverage.org.objectweb.asm.ClassReader.accept(ClassReader.java:712)
at org.jetbrains.coverage.org.objectweb.asm.ClassReader.accept(ClassReader.java:395)
at com.intellij.rt.coverage.instrumentation.SaveHook.appendUnloadedClass(SaveHook.java:318)
at com.intellij.rt.coverage.instrumentation.SaveHook$5.consume(SaveHook.java:299)
at com.intellij.rt.coverage.util.classFinder.ClassPathEntry$DirectoryEntryProcessor.collectClasses(ClassPathEntry.java:110)
at com.intellij.rt.coverage.util.classFinder.ClassPathEntry$DirectoryEntryProcessor.collectClasses(ClassPathEntry.java:122)
at com.intellij.rt.coverage.util.classFinder.ClassPathEntry$DirectoryEntryProcessor.collectClasses(ClassPathEntry.java:122)
at com.intellij.rt.coverage.util.classFinder.ClassPathEntry$DirectoryEntryProcessor.collectClasses(ClassPathEntry.java:122)
at com.intellij.rt.coverage.util.classFinder.ClassPathEntry$DirectoryEntryProcessor.collectClasses(ClassPathEntry.java:122)
at com.intellij.rt.coverage.util.classFinder.ClassPathEntry$DirectoryEntryProcessor.collectClasses(ClassPathEntry.java:122)
at com.intellij.rt.coverage.util.classFinder.ClassPathEntry$DirectoryEntryProcessor.iterateMatchedClasses(ClassPathEntry.java:96)
at com.intellij.rt.coverage.util.classFinder.ClassPathEntry.iterateMatchedClasses(ClassPathEntry.java:47)
at com.intellij.rt.coverage.util.classFinder.ClassFinder.iterateMatchedClasses(ClassFinder.java:60)
at com.intellij.rt.coverage.instrumentation.SaveHook.appendUnloadedFullAnalysis(SaveHook.java:292)
at com.intellij.rt.coverage.report.data.ProjectReport.collectCoverageInformationFromOutputs(ProjectReport.java:70)
at com.intellij.rt.coverage.report.data.ProjectReport.getProjectData(ProjectReport.java:48)
at com.intellij.rt.coverage.report.Reporter.createXMLReport(Reporter.java:41)
at com.intellij.rt.coverage.report.Main.main(Main.java:37)
Here is my project: https://github.com/overfullstack/vader-root
i faced the same issue. So far don't know the root cause unable to reproduce on macbook (os 12.0.1) problematic CI image: cimg/android:2022.01.1
i have been fixed my problem. the main reason for this problem from me is that i have multiple files with same package name (due to package rename but getting confused after many PR conflicts)
@goncalossilva I have successfully reproduced the issue with your project, thanks! Could you please try running test with kover with the latest IJCoverage agent, the issue must be solved there (it works for me). Just add to the build.gradle:
kover {
intellijEngineVersion.set("1.0.674")
}
Fixed in 0.6.0
, feel free to reopen if the problem reproduced again.
Run: https://github.com/JavierSegoviaCordoba/mokoki/runs/5340224331
It is passing on Linux.