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

gradlew koverHtmlReport koverVerify launches "Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException" #183

Closed
skyviolantea opened this issue May 24, 2022 · 8 comments
Labels

Comments

@skyviolantea
Copy link

Hi,

When I try to run "gradlew koverHtmlReport koverVerify" to generate a report, I receive the following error. It seems something has changed in my application that generates an error as some commits ago I was able to do it without encountering problems. Now it happens and I don't understand where to find the problem or how can I debug this.

[ERROR] [system.err] Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 7 out of bounds for length 7
[ERROR] [system.err] at jetbrains.coverage.report.idea.IDEACoverageClassInfo.getStatementStats(IDEACoverageClassInfo.java:129)
[ERROR] [system.err] at jetbrains.coverage.report.impl.StatisticsCalculatorImpl.computeForClass(StatisticsCalculatorImpl.java:51)
[ERROR] [system.err] at jetbrains.coverage.report.impl.StatisticsCalculatorImpl.doCompute(StatisticsCalculatorImpl.java:40)
[ERROR] [system.err] at jetbrains.coverage.report.impl.StatisticsCalculatorImpl.compute(StatisticsCalculatorImpl.java:34)
[ERROR] [system.err] at jetbrains.coverage.report.impl.html.HTMLReportBuilderImpl.generateReport(HTMLReportBuilderImpl.java:80)
[ERROR] [system.err] at jetbrains.coverage.report.impl.html.HTMLReportBuilderImpl.generateReport(HTMLReportBuilderImpl.java:76)
[ERROR] [system.err] at com.intellij.rt.coverage.report.Reporter.createHTMLReport(Reporter.java:53)
[ERROR] [system.err] at com.intellij.rt.coverage.report.Main.main(Main.java:48)
[DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: FAILED
[DEBUG] [org.gradle.process.internal.DefaultExecHandle] Process 'command 'C:\Program Files\Java\jdk11015\bin\java.exe'' finished with exit value 1 (state: FAILED)

Can you help me to understand what should I check and what should I do to solve the problem?

Thanks a lot!

@shanshin
Copy link
Collaborator

Hi,
is your project open source?

@shanshin
Copy link
Collaborator

Related #166

@skyviolantea
Copy link
Author

Hi! No, it isn't

@k3marek
Copy link

k3marek commented Jun 2, 2022

I've experienced same issue; in my case with android modules. Switching to intellijEngineVersion.set('1.0.671') solved it

@chris-hatton
Copy link

chris-hatton commented Jun 18, 2022

Seeing the same error with Kover 0.5.1, IntelliJ Engine 1.0.668, when executing koverMergedHtmlReport, but only when on our Linux CI machine: The same task locally on an M1 Mac succeeds.

@saschpe
Copy link

saschpe commented Jul 13, 2022

Same here using Cover 0.5.1 on Apple M1. Setting intellijEngineVersion.set("1.0.674") fixed it as well.

@aSemy
Copy link
Contributor

aSemy commented Jul 26, 2022

You can get the latest IntelliJ engine version from looking at the versions in Maven Central: https://search.maven.org/artifact/org.jetbrains.intellij.deps/intellij-coverage-agent

@shanshin
Copy link
Collaborator

Must be fixed in 0.6.0, feel free to reopen if the problem reproduced again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants