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

Prevent IllegalArgumentException #421

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jbonzohln
Copy link

When running my tests I get this error:

java.lang.IllegalArgumentException: Count 'n' must be non-negative, but was -5.

	at kotlin.text.StringsKt__StringsJVMKt.repeat(StringsJVM.kt:775)
	at org.jetbrains.kotlinx.lincheck.strategy.managed.TraceNodePrefixFactory.prefixForNode$lambda$5(TraceReporter.kt:628)
	at org.jetbrains.kotlinx.lincheck.strategy.managed.TraceNode.getPrefix(TraceReporter.kt:354)
	at org.jetbrains.kotlinx.lincheck.strategy.managed.TraceLeafEvent.addRepresentationTo(TraceReporter.kt:415)
	at org.jetbrains.kotlinx.lincheck.strategy.managed.TraceReporterKt.traceGraphToRepresentationList(TraceReporter.kt:343)
	at org.jetbrains.kotlinx.lincheck.strategy.managed.TraceReporterKt.appendShortTrace(TraceReporter.kt:43)
	at org.jetbrains.kotlinx.lincheck.strategy.managed.TraceReporterKt.appendTrace(TraceReporter.kt:31)
	at org.jetbrains.kotlinx.lincheck.ReporterKt.appendFailure(Reporter.kt:392)
	at org.jetbrains.kotlinx.lincheck.strategy.LincheckFailure.toString(LincheckFailure.kt:22)
	at java.base/java.lang.StringConcatHelper.stringOf(StringConcatHelper.java:467)
	at java.base/java.lang.StringConcatHelper.simpleConcat(StringConcatHelper.java:422)
	at org.jetbrains.kotlinx.lincheck.LincheckAssertionError.<init>(LincheckAssertionError.kt:17)
	at org.jetbrains.kotlinx.lincheck.LinChecker$check$1.invoke(LinChecker.kt:48)
	at org.jetbrains.kotlinx.lincheck.LinChecker$check$1.invoke(LinChecker.kt:47)
	at org.jetbrains.kotlinx.lincheck.LinChecker.checkImpl$lincheck(LinChecker.kt:67)
	at org.jetbrains.kotlinx.lincheck.LinChecker.check(LinChecker.kt:47)
	at org.jetbrains.kotlinx.lincheck.LinChecker$Companion.check(LinChecker.kt:195)
	at org.jetbrains.kotlinx.lincheck.LinChecker.check(LinChecker.kt)

@eupp eupp requested a review from avpotapov00 October 29, 2024 12:33
@eupp
Copy link
Collaborator

eupp commented Oct 29, 2024

Could be related to #404

@avpotapov00
Copy link
Collaborator

Hi, @jbonzohln
Thanks for the PR!
Could you please provide the test that caused the failure?
Let's fix it a little bit in a different way.

@jbonzohln
Copy link
Author

@avpotapov00 No, sorry it's company code I can't share. I believe the cause is a very deep call stack though.

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

Successfully merging this pull request may close these issues.

3 participants