Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upconditional breakpoint fails if String condition is set/used #782
Comments
|
Cannot reproduce it. Could you share the whole context and the conditional expression you used? |
|
Hi @testforstephen, just found out when this happens, it happens only when the conditional breakpoint is used in a part of code that runs in parallel, so when the breakpoint needs to be evaluated on more parallel threads. For example, in this case, all threads that run that code stop on the conditional breakpoint, vscode messages that the breakpoint is not a valid boolean, but if I continue all other suspended threads but one, then the breakpoint can be evaluated on that point. I have created a test: |
|
@blassmegod, thank you for the details. i can reproduce it with your sample project. |

[provide a description of the issue]
Environment
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_242-b08)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.242-b08, mixed mode)
Version: 1.43.1 (system setup)
Commit: fe22a9645b44368865c0ba92e2fb881ff1afce94
Date: 2020-03-18T07:01:20.184Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.17763
Steps To Reproduce
Set a conditional breakpoint with string condition
Debug and wait to stop at breakpoint
[attach a sample project reproducing the error]
attach logs
[Warn - 10:32:00] 20-Mar-2020 10:32:00 Failed to destory launch files, will retry again.
[Error - 10:32:11] 20-Mar-2020 10:32:11 [ConditionalBreakpoint]:
org.eclipse.debug.core.DebugException:
at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine$EvalRunnable.run(ASTEvaluationEngine.java:829)
at org.eclipse.jdt.internal.debug.core.model.JDIThread$ThreadJob.run(JDIThread.java:3641)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.util.EmptyStackException
at java.util.Stack.peek(Stack.java:102)
at java.util.Stack.pop(Stack.java:84)
at org.eclipse.jdt.internal.debug.eval.ast.engine.Interpreter.pop(Interpreter.java:165)
at org.eclipse.jdt.internal.debug.eval.ast.instructions.Instruction.pop(Instruction.java:108)
at org.eclipse.jdt.internal.debug.eval.ast.instructions.SendMessage.execute(SendMessage.java:52)
at org.eclipse.jdt.internal.debug.eval.ast.engine.Interpreter.execute(Interpreter.java:69)
at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine$EvalRunnable$1EvaluationRunnable.run(ASTEvaluationEngine.java:751)
at org.eclipse.jdt.internal.debug.core.model.JDIThread.runEvaluation(JDIThread.java:849)
at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine$EvalRunnable.run(ASTEvaluationEngine.java:804)
... 2 more
[Error - 10:32:11] 20-Mar-2020 10:32:11 [ConditionalBreakpoint]:
org.eclipse.debug.core.DebugException:
at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine$EvalRunnable.run(ASTEvaluationEngine.java:829)
at org.eclipse.jdt.internal.debug.core.model.JDIThread$ThreadJob.run(JDIThread.java:3641)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.lang.NullPointerException
at org.eclipse.jdt.internal.debug.eval.ast.instructions.Instruction.setLastValue(Instruction.java:48)
at org.eclipse.jdt.internal.debug.eval.ast.instructions.SendMessage.execute(SendMessage.java:71)
at org.eclipse.jdt.internal.debug.eval.ast.engine.Interpreter.execute(Interpreter.java:69)
at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine$EvalRunnable$1EvaluationRunnable.run(ASTEvaluationEngine.java:751)
at org.eclipse.jdt.internal.debug.core.model.JDIThread.runEvaluation(JDIThread.java:849)
at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine$EvalRunnable.run(ASTEvaluationEngine.java:804)
... 2 more
[Error - 10:32:11] 20-Mar-2020 10:32:11 [ConditionalBreakpoint]:
org.eclipse.debug.core.DebugException:
at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine$EvalRunnable.run(ASTEvaluationEngine.java:829)
at org.eclipse.jdt.internal.debug.core.model.JDIThread$ThreadJob.run(JDIThread.java:3641)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.lang.NullPointerException
at org.eclipse.jdt.internal.debug.eval.ast.instructions.Instruction.setLastValue(Instruction.java:48)
at org.eclipse.jdt.internal.debug.eval.ast.instructions.SendMessage.execute(SendMessage.java:71)
at org.eclipse.jdt.internal.debug.eval.ast.engine.Interpreter.execute(Interpreter.java:69)
at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine$EvalRunnable$1EvaluationRunnable.run(ASTEvaluationEngine.java:751)
at org.eclipse.jdt.internal.debug.core.model.JDIThread.runEvaluation(JDIThread.java:849)
at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine$EvalRunnable.run(ASTEvaluationEngine.java:804)
... 2 more
Current Result
Result of breakpoint condition '"something".equals(xRole)' is not a boolean, please correct your expression.
Expected Result
That the condition inside the conditional breakpoint is evaluated correctly.
Additional Informations