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

IDE fatal error during tests generation #68

Closed
EgorkaKulikov opened this issue May 30, 2022 · 0 comments · Fixed by #379
Closed

IDE fatal error during tests generation #68

EgorkaKulikov opened this issue May 30, 2022 · 0 comments · Fixed by #379
Assignees
Labels
comp-ui Improvements of plugin UI appearence and functionality ctg-bug Issue is a bug

Comments

@EgorkaKulikov
Copy link
Collaborator

EgorkaKulikov commented May 30, 2022

Description

IDE fatal error occured during tests generation. The stack trace of this error is represented on the attached screenshot.

To Reproduce

Unfortunately, this problem is flacky.

Exception stack trace is

Freeze in EDT for 21 seconds
Sampled time: 14900ms, sampling rate: 100ms, GC time: 194ms (1%), Class loading: 6%

com.intellij.diagnostic.Freeze
	at org.jetbrains.kotlin.idea.project.ResolveElementCache.functionAdditionalResolve(ResolveElementCache.kt:678)
	at org.jetbrains.kotlin.idea.project.ResolveElementCache.performElementAdditionalResolve(ResolveElementCache.kt:397)
	at org.jetbrains.kotlin.idea.project.ResolveElementCache.getElementsAdditionalResolve(ResolveElementCache.kt:225)
	at org.jetbrains.kotlin.idea.project.ResolveElementCache.resolveToElements(ResolveElementCache.kt:284)
	at org.jetbrains.kotlin.idea.caches.resolve.ModuleResolutionFacadeImpl$analyze$3.invoke(ModuleResolutionFacadeImpl.kt:74)
	at org.jetbrains.kotlin.idea.caches.resolve.ModuleResolutionFacadeImpl$analyze$3.invoke(ModuleResolutionFacadeImpl.kt:41)
	at com.intellij.openapi.progress.impl.CancellationCheck.withCancellationCheck(CancellationCheck.kt:48)
	at com.intellij.openapi.progress.impl.CancellationCheck$Companion.runWithCancellationCheck(CancellationCheck.kt:80)
	at org.jetbrains.kotlin.idea.util.application.ApplicationUtilsKt.runWithCancellationCheck(ApplicationUtils.kt:46)
	at org.jetbrains.kotlin.idea.caches.resolve.ModuleResolutionFacadeImpl.analyze(ModuleResolutionFacadeImpl.kt:73)
	at org.jetbrains.kotlin.idea.caches.resolve.ResolutionFacadeWithDebugInfo.analyze(ResolutionFacadeWithDebugInfo.kt:51)
	at org.jetbrains.kotlin.idea.core.ShortenReferences$shortenReferencesInFile$$inlined$runReadAction$2$lambda$1.invoke(ShortenReferences.kt:231)
	at org.jetbrains.kotlin.idea.core.ShortenReferences$shortenReferencesInFile$$inlined$runReadAction$2$lambda$1.invoke(ShortenReferences.kt:42)
	at org.jetbrains.kotlin.idea.caches.resolve.ResolveInDispatchThreadManagerKt.allowResolveInDispatchThread(ResolveInDispatchThreadManager.kt:132)
	at org.jetbrains.kotlin.idea.core.ShortenReferences$shortenReferencesInFile$$inlined$runReadAction$2.compute(actions.kt:82)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:851)
	at org.jetbrains.kotlin.idea.core.ShortenReferences.shortenReferencesInFile(ShortenReferences.kt:801)
	at org.jetbrains.kotlin.idea.core.ShortenReferences.process(ShortenReferences.kt:181)
	at org.jetbrains.kotlin.idea.core.ShortenReferences.process(ShortenReferences.kt:103)
	at org.jetbrains.kotlin.idea.core.ShortenReferences.process(ShortenReferences.kt:111)
	at org.jetbrains.kotlin.idea.core.ShortenReferences.process$default(ShortenReferences.kt:109)
	at org.utbot.intellij.plugin.generator.TestGenerator.reformat(TestGenerator.kt:251)
	at org.utbot.intellij.plugin.generator.TestGenerator.addTestMethodsAndSaveReports(TestGenerator.kt:208)
	at org.utbot.intellij.plugin.generator.TestGenerator.generateTestsInternal(TestGenerator.kt:88)

Visual proofs (screenshots, logs, images)

image

@EgorkaKulikov EgorkaKulikov added the ctg-bug Issue is a bug label May 30, 2022
@EgorkaKulikov EgorkaKulikov added the comp-ui Improvements of plugin UI appearence and functionality label May 30, 2022
@EgorkaKulikov EgorkaKulikov moved this to Todo in UTBot Java May 30, 2022
@EgorkaKulikov EgorkaKulikov removed the status in UTBot Java May 30, 2022
@EgorkaKulikov EgorkaKulikov moved this to Todo in UTBot Java May 30, 2022
@Vassiliy-Kudryashov Vassiliy-Kudryashov moved this from Todo to In Progress in UTBot Java Jun 28, 2022
@Vassiliy-Kudryashov Vassiliy-Kudryashov linked a pull request Jul 1, 2022 that will close this issue
4 tasks
Vassiliy-Kudryashov added a commit that referenced this issue Jul 4, 2022
Vassiliy-Kudryashov added a commit that referenced this issue Jul 4, 2022
Latch-related comment for the future
Vassiliy-Kudryashov added a commit that referenced this issue Jul 4, 2022
Repository owner moved this from In Progress to Done in UTBot Java Jul 4, 2022
rudolf101 added a commit that referenced this issue Jul 8, 2022
commit 31fbc83
Author: Andrey Tarbeev <dinis.taranov@mail.ru>
Date:   Fri Jul 8 10:50:52 2022 +0300

    Minimize exceptions in signature (#418)

    * Minimize exceptions in test methods signatures

commit 63eb9b0
Author: Yury Kamenev <yurkam447@gmail.com>
Date:   Thu Jul 7 15:13:45 2022 +0300

    Removed always used coverage-based minimization strategy (#450)

commit fe0f7f8
Author: Yury Kamenev <yurkam447@gmail.com>
Date:   Thu Jul 7 14:19:53 2022 +0300

    Disabled NPE checks for non-public library fields by default (#353)

commit d1b51fe
Author: Yury Kamenev <yurkam447@gmail.com>
Date:   Thu Jul 7 13:44:46 2022 +0300

    Fixed NPE for processing static field as first statement in MUT (#433)

commit acc2fff
Author: Nikita Vlaev <nikitavlaev00@gmail.com>
Date:   Wed Jul 6 15:37:28 2022 +0300

    Added ForceStaticMockListener to run "configure mockito-inline" action.
    Refactored url listener in notifications.

commit 80c2328
Author: Nikita Stroganov <54814796+IdeaSeeker@users.noreply.github.com>
Date:   Thu Jul 7 11:21:13 2022 +0300

    Support -P parameters in the utbot-gradle (#377)

commit a92e289
Author: Sergey Pospelov <sergeypospelov59@gmail.com>
Date:   Tue Jul 5 10:29:45 2022 +0300

    Fix searching of modifiers field for JDK 8-17

commit 9a3acb6
Author: Amandel Pie <105506115+amandelpie@users.noreply.github.com>
Date:   Wed Jul 6 14:16:09 2022 +0300

    Disabled clustering of tests generated by Fuzzer (#431)

    * Disabled clustering of tests generated by Fuzzer

    * Refactored the multiple calls

commit c09568f
Author: Vassiliy Kudryashov <vassiliy.kudryashov@gmail.com>
Date:   Wed Jul 6 10:21:52 2022 +0300

    Existing test file without test class obstruct generation #160 (#425)

commit 2ec8fb3
Author: Denis Fokin <Denis.Fokin@gmail.com>
Date:   Tue Jul 5 16:52:42 2022 +0300

    Better naming

commit 68c66ef
Author: Vassiliy Kudryashov <vassiliy.kudryashov@gmail.com>
Date:   Tue Jul 5 19:51:55 2022 +0300

    SVG logo contains 'inaccurate' holes #330 (#411)

commit 1d48789
Author: Dmitrii Timofeev <dtim@comitative.com>
Date:   Tue Jul 5 17:08:38 2022 +0300

    Workaround: run concrete execution for invokedynamic

commit 65d95c1
Author: Vassiliy Kudryashov <vassiliy.kudryashov@gmail.com>
Date:   Tue Jul 5 19:42:55 2022 +0300

    Plugin fails with an exception if no SDK is configured for the test module #399 (#424)

commit 6f9f2d8
Author: Maksim Pelevin <maks.pelevin@gmail.com>
Date:   Tue Jul 5 17:49:58 2022 +0300

    Fix CNFE: kotlin.collections.ArrayDeque in ContestEstimator (#419)

commit 67cc7d9
Author: Denis Fokin <Denis.Fokin@gmail.com>
Date:   Tue Jul 5 11:58:40 2022 +0300

    Put concrete executor jar in resources for contest estimator

commit 63e2252
Author: Alena Lisevych <37301492+alisevych@users.noreply.github.com>
Date:   Tue Jul 5 15:48:29 2022 +0300

    Tooltips correction for #343 (#410)

    Co-authored-by: Alena Lisevych <>

commit 8b3defa
Author: Vassiliy Kudryashov <vassiliy.kudryashov@gmail.com>
Date:   Tue Jul 5 13:22:31 2022 +0300

    Write access exception on test generating in Idea project with JDK 11 #350 (#409)

commit c02883c
Author: Amandel Pie <105506115+amandelpie@users.noreply.github.com>
Date:   Tue Jul 5 11:21:21 2022 +0300

    Enables 40 tests for utbot-summary module (#389)

    * Repair testPow

    * Repaired ReturnExampleTest tests

    * Restored SummaryCycleTest.kt

    * Restored all the tests

commit 65c07f8
Author: Victoria <32179813+victoriafomina@users.noreply.github.com>
Date:   Tue Jul 5 09:51:44 2022 +0300

    Update Dockerfile_java_cli (#396)

commit 3b21112
Author: Alexey Menshutin <alex.menshutin99@gmail.com>
Date:   Mon Jul 4 21:16:53 2022 +0300

    ToString support for abstract collection using makeSymbolic #391

commit c2673df
Author: Vassiliy Kudryashov <vassiliy.kudryashov@gmail.com>
Date:   Mon Jul 4 21:56:43 2022 +0300

    IDE fatal error during tests generation #68 (#379)

commit 43693fb
Author: Nikita Vlaev <vlaev.nikita@huawei.com>
Date:   Mon Jul 4 18:59:57 2022 +0300

    Bring back test class generation (#403)

commit 1c01193
Author: Yury Kamenev <yurkam447@gmail.com>
Date:   Mon Jul 4 20:24:03 2022 +0300

    Added the wrapper for static methods of java.util.List (#400)

commit a805f31
Author: Nikita Vlaev <vlaev.nikita@huawei.com>
Date:   Fri Jul 1 20:16:28 2022 +0300

    Add title pane with unsupported jdk notification (#373)

commit 16c13fb
Author: Dmitrii Timofeev <dtim@comitative.com>
Date:   Mon Jul 4 18:35:36 2022 +0300

    Initiate concrete execution if a wrapper method is missing (#392)

    If a JVM class is overridden but a method is missing from the wrapper,
    the engine will discard the path and fall back to concrete execution
    instead of analysing the real JVM code graph.

    This approach fixes the problem with methods that have been introduced
    in newer JDKs. Now wrappers are mostly limited to Java 1.8 interfaces
    and fail to analyze methods like `String::isBlank` or `String::lines`
    when the code runs under JDK 11. Building graphs from the real JDK code
    fails because the wrapper does not have private fields that the original
    code uses.

    TODO: to allow symbolic analysis of the code, missing methods should be
    actually implemented in corresponding wrappers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-ui Improvements of plugin UI appearence and functionality ctg-bug Issue is a bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants