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

IDEA hangs during test generation #1207

Closed
tyuldashev opened this issue Oct 21, 2022 · 3 comments
Closed

IDEA hangs during test generation #1207

tyuldashev opened this issue Oct 21, 2022 · 3 comments
Assignees
Labels
ctg-bug Issue is a bug priority-blocker Bug blocking some of the main features status-verified Bug fix is verified

Comments

@tyuldashev
Copy link
Collaborator

tyuldashev commented Oct 21, 2022

Description

I've faced the problem that IDEA becomes not responsible during several test generations with the latest RC builds. While it's most probably caused by insufficient memory allocated to IDEA, UTBot test generation should not cause hang of IDEA without ability to cancel test generation process.

To Reproduce

Most of the times I've faced that problem after the following steps:

  1. Open UTBot project
  2. Generate tests for org.utbot.examples.algorithms.Sort

Expected behavior

Tests are generated

Actual behavior

Test generation started but in a about a minute IDEA stops to respond to user interaction. Once it finished generation in about 17min, but latter hanged again. Other times I killed IDEA after waiting for several minutes.

Visual proofs (screenshots, logs, images)

Thread dumps

Environment
IDEA 2022.1.4, with default -Xmx2022m in VM settings
UTBot - utbot-intellij-2022.10.459 - build from unittestbot/rc10192022

Additional information
Increasing IDEA memory to 4Gb seems resolves the problem. But I believe UTBot still should not cause hangs in IDEA and still be cancelable.

@tyuldashev tyuldashev added the ctg-bug Issue is a bug label Oct 21, 2022
@tyuldashev tyuldashev moved this to Todo in UTBot Java Oct 21, 2022
@alisevych alisevych added the priority-blocker Bug blocking some of the main features label Oct 21, 2022
@alisevych
Copy link
Member

alisevych commented Oct 21, 2022

Additional details

Same happened to me once - on other version - newest IDEA 2022.2.3 - and with build from next release candidate branch.
UTBot - utbot-intellij-2022.10.464 - build from unittestbot/rc10202022
IDE hanged after test generation had already finished - and some imports and build project were being made.
It hanged for about 16 hours and only kill process helped.

@tyuldashev
Copy link
Collaborator Author

That seems caused by #1225. If we try to open such file in IDEA it would warn that this file is too big and would skip formatting and analyzing it. We may implement similar or the same check, to prevent such problem.

Vassiliy-Kudryashov added a commit that referenced this issue Oct 24, 2022
Prevent reformatting for too big generated files
@tyuldashev
Copy link
Collaborator Author

Tested with build from main branch #483
IDEA 2022.1.4 & 2022.2.3

Repository owner moved this from Todo to Done in UTBot Java Oct 27, 2022
@tyuldashev tyuldashev added the status-verified Bug fix is verified label Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ctg-bug Issue is a bug priority-blocker Bug blocking some of the main features status-verified Bug fix is verified
Projects
Archived in project
Development

No branches or pull requests

3 participants