Breakpoint condition fails with ObjectCollectedException
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
Research direction
Reproduce the conditional breakpoint in ConvertModels.java around the linked function and compare it with the Debug Console behavior. Start with SetBreakpointsRequestHandler and the JDI evaluation stack shown in the logs, including JDIThread.invokeMethod. Done means String conditions such as contains and startsWith no longer report ObjectCollectedException.
Written by the indexing model from the issue text.
Description
In a function with 2nd parameter being a String name a conditional breakpoint on the first statement with name.contains("xyz") results in
Breakpoint condition 'name.contains("xyz")' error: com.sun.jdi.ObjectCollectedException occurred invoking method.
The expression does work on the same line in Debug Console.
A BP with !name.isEmpty() does work.
.startsWith("xyz") also throws.
The Java LSP logs contain:
com.microsoft.java.debug.core.adapter.handler.SetBreakpointsRequestHandler handleEvaluationResult
SEVERE: [ConditionalBreakpoint]: com.sun.jdi.ObjectCollectedException occurred invoking method.
org.eclipse.debug.core.DebugException: com.sun.jdi.ObjectCollectedException occurred invoking method.
at org.eclipse.jdt.internal.debug.core.model.JDIDebugElement.throwDebugException(JDIDebugElement.java:263)
at org.eclipse.jdt.internal.debug.core.model.JDIDebugElement.requestFailed(JDIDebugElement.java:202)
at org.eclipse.jdt.internal.debug.core.model.JDIThread.invokeFailed(JDIThread.java:1257)
at org.eclipse.jdt.internal.debug.core.model.JDIThread.invokeFailed(JDIThread.java:1226)
at org.eclipse.jdt.internal.debug.core.model.JDIThread.invokeMethod(JDIThread.java:1026)
at org.eclipse.jdt.internal.debug.core.model.JDIObjectValue.sendMessage(JDIObjectValue.java:162)
at org.eclipse.jdt.internal.debug.eval.ast.instructions.SendMessage.execute(SendMessage.java:60)
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:843)
at org.eclipse.jdt.internal.debug.core.model.JDIThread.runEvaluation(JDIThread.java:832)
at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine$EvalRunnable.run(ASTEvaluationEngine.java:896)
at org.eclipse.jdt.internal.debug.core.model.JDIThread$ThreadJob.run(JDIThread.java:3490)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: com.sun.jdi.ObjectCollectedException
at org.eclipse.jdi.internal.MirrorImpl.defaultReplyErrorHandler(MirrorImpl.java:294)
at org.eclipse.jdi.internal.ObjectReferenceImpl.referenceType(ObjectReferenceImpl.java:530)
at org.eclipse.jdi.internal.ObjectReferenceImpl.type(ObjectReferenceImpl.java:547)
at org.eclipse.jdi.internal.ValueImpl.checkValue(ValueImpl.java:196)
at org.eclipse.jdi.internal.ValueImpl.checkValues(ValueImpl.java:172)
at org.eclipse.jdi.internal.ObjectReferenceImpl.invokeMethod(ObjectReferenceImpl.java:414)
at org.eclipse.jdt.internal.debug.core.model.JDIThread.invokeMethod(JDIThread.java:1009)
... 8 more
com.microsoft.java.debug.core.UsageDataSession recordResponse
WARNING: abnormal response
eclipse_adoptium-21-amd64-windows.2
- Dominant language
- Java
- Stars
- 409
- Forks
- 204
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 4
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/java-debug
-
ai-triaged bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
microsoft/java-debug#611 · 2 comments ·
-
ai-triaged enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
microsoft/java-debug#608 · 3 comments ·
-
ai-triaged question
Difficulty 5/5 Over a week Newbie friendliness 30/100
microsoft/java-debug#597 · 1 comment ·
-
ai-triaged bug
Difficulty 4/5 3-5 days Newbie friendliness 25/100
microsoft/java-debug#588 · 1 comment ·
-
ai-triaged question
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
microsoft/java-debug#582 · 1 comment ·
All issues in microsoft/java-debug
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
elastic/gradle-plugins#157 ·
-
enhancement Tools
Difficulty 1/5 Under an hour Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
apache/rocketmq-dashboard#5008 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
DETECT_PARAMETER_NAMES=false silently disables @ConstructorProperties-based Creator detection too Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
FasterXML/jackson-databind#6229 ·