From 22036150857f70acb449ebb25b0577d6cdf5005c Mon Sep 17 00:00:00 2001 From: Yan Zhulanow Date: Mon, 2 Jul 2018 15:25:43 +0300 Subject: [PATCH] Check if the stackFrame we use is valid (EA-120312) Unfortunately, the 'isValid' is a private field in StackFrameImpl so we have to catch an exception with an empty catch block. --- .../kotlin/idea/debugger/evaluate/KotlinCodeFragmentFactory.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/evaluate/KotlinCodeFragmentFactory.kt b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/evaluate/KotlinCodeFragmentFactory.kt index 81dd87c3f28..3b471ade7a9 100644 --- a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/evaluate/KotlinCodeFragmentFactory.kt +++ b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/evaluate/KotlinCodeFragmentFactory.kt @@ -171,6 +171,8 @@ class KotlinCodeFragmentFactory : CodeFragmentFactory() { frameInfo = FrameInfo(frame?.thisObject(), visibleVariables) } catch (ignored: AbsentInformationException) { // Debug info unavailable + } catch (ignored: InvalidStackFrameException) { + // Thread is resumed, the frame we have is not valid anymore } finally { semaphore.up() }