-
Notifications
You must be signed in to change notification settings - Fork 23
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
Do not run EDT code in CodyFixHighlightPass:doCollectInformation #2289
Conversation
// >= HighlightSeverity.INFO | ||
myHighlights.mapNotNull { | ||
try { | ||
val range = document.codyRange(it.startOffset, it.endOffset) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
codyRange
already contains the same check.
if (progress.isCanceled) { | ||
break | ||
} | ||
|
||
val range = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to recompute the same thing again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tried it a few times.
before this change I was able to reproduce it
after this change I am not able to repro it
lgtm
Fixes #2287 ## Changes Looks like we cannot do EDT actions in the `CodyFixHighlightPass:doCollectInformation` or we are risking a deadlock. ## Test plan It's a bit hard to test deterministically but for me adding and removing few special characters on an empty file was triggering IDE crash pretty quickly (10-20 sec). I used combination of: `Option + \` (`«`) `Option + P` (`Ļ`) `Backspace` In a random order. Timing matters, keep changing the tempo of the keystrokes.
Fixes #2287 ## Changes Looks like we cannot do EDT actions in the `CodyFixHighlightPass:doCollectInformation` or we are risking a deadlock. ## Test plan It's a bit hard to test deterministically but for me adding and removing few special characters on an empty file was triggering IDE crash pretty quickly (10-20 sec). I used combination of: `Option + \` (`«`) `Option + P` (`Ļ`) `Backspace` In a random order. Timing matters, keep changing the tempo of the keystrokes.
Fixes #2287
Changes
Looks like we cannot do EDT actions in the
CodyFixHighlightPass:doCollectInformation
or we are risking a deadlock.Test plan
It's a bit hard to test deterministically but for me adding and removing few special characters on an empty file was triggering IDE crash pretty quickly (10-20 sec).
I used combination of:
Option + \
(«
)Option + P
(Ļ
)Backspace
In a random order.
Timing matters, keep changing the tempo of the keystrokes.