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

Null pointer exception in ArrayList initialization in concrete #2554

Closed
EgorkaKulikov opened this issue Aug 25, 2023 · 0 comments · Fixed by #2555
Closed

Null pointer exception in ArrayList initialization in concrete #2554

EgorkaKulikov opened this issue Aug 25, 2023 · 0 comments · Fixed by #2555
Assignees
Labels
comp-instrumented-process Issue is related to Instrumented process comp-spring Issue is related to Spring projects support ctg-bug Issue is a bug

Comments

@EgorkaKulikov
Copy link
Collaborator

Description

Try to generate unit tests with standard flow for spring-boot-testing project, method OrderService.getOrders.

Expected behavior

Tests are generated properly.
There are no Default concrete execution failed messages.

Actual behavior

The following exceptions is found in logs:

Caused by: java.lang.NullPointerException: Cannot read the array length because "a" is null
	at java.base/java.util.ArrayList.<init>(ArrayList.java:182)
	at org.utbot.instrumentation.instrumentation.execution.constructors.UtModelConstructor.findEqualValueOfWellKnownType(UtModelConstructor.kt:352)
	at org.utbot.instrumentation.instrumentation.execution.constructors.UtModelConstructor.constructFromAny(UtModelConstructor.kt:341)
	at org.utbot.instrumentation.instrumentation.execution.constructors.UtModelConstructor.construct(UtModelConstructor.kt:178)
	at org.utbot.instrumentation.instrumentation.execution.constructors.UtModelConstructor.construct(UtModelConstructor.kt:137)
	at org.utbot.instrumentation.instrumentation.execution.phases.ModelConstructionPhase.convertToExecutionResult(ModelConstructionPhase.kt:121)
	at org.utbot.instrumentation.instrumentation.execution.SimpleUtExecutionInstrumentation$invoke$1$1$2.invoke(SimpleUtExecutionInstrumentation.kt:106)
	at org.utbot.instrumentation.instrumentation.execution.SimpleUtExecutionInstrumentation$invoke$1$1$2.invoke(SimpleUtExecutionInstrumentation.kt:92)
	at org.utbot.instrumentation.instrumentation.execution.phases.PhasesController$executePhaseInTimeout$1$result$1.invoke(PhasesController.kt:78)
	at org.utbot.common.ThreadBasedExecutor$invokeWithTimeout$1.invoke(ThreadUtil.kt:70)
	at org.utbot.common.ThreadBasedExecutor$ensureThreadIsAlive$1.invoke(ThreadUtil.kt:124)
	at org.utbot.common.ThreadBasedExecutor$ensureThreadIsAlive$1.invoke(ThreadUtil.kt:120)
	at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)
@EgorkaKulikov EgorkaKulikov added ctg-bug Issue is a bug comp-instrumented-process Issue is related to Instrumented process comp-spring Issue is related to Spring projects support labels Aug 25, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in UTBot Java Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-instrumented-process Issue is related to Instrumented process comp-spring Issue is related to Spring projects support ctg-bug Issue is a bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants