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

Breakpoint condition fails with ObjectCollectedException #568

Open
Trass3r opened this issue Sep 3, 2024 · 0 comments
Open

Breakpoint condition fails with ObjectCollectedException #568

Trass3r opened this issue Sep 3, 2024 · 0 comments

Comments

@Trass3r
Copy link

Trass3r commented Sep 3, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant