Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 370403 - CCE while debugging
Summary: CCE while debugging
Status: CLOSED DUPLICATE of bug 282974
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.8   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-02 03:51 EST by Deepak Azad CLA
Modified: 2013-02-28 16:37 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Deepak Azad CLA 2012-02-02 03:51:09 EST
Version: 4.2.0
Build id: I20120131-2200

I got the following exception while debugging. Let me see if I can provide steps to reproduce as well.
-------------------------------------------------------------------------------
Exception processing async thread queue

java.lang.ClassCastException: org.eclipse.jdt.internal.debug.core.model.JDIClassType incompatible with org.eclipse.jdt.debug.core.IJavaValue
	at org.eclipse.jdt.internal.debug.eval.ast.instructions.Instruction.popValue(Instruction.java:113)
	at org.eclipse.jdt.internal.debug.eval.ast.instructions.PushFieldVariable.execute(PushFieldVariable.java:50)
	at org.eclipse.jdt.internal.debug.eval.ast.engine.Interpreter.execute(Interpreter.java:66)
	at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine$EvalRunnable$1EvaluationRunnable.run(ASTEvaluationEngine.java:685)
	at org.eclipse.jdt.internal.debug.core.model.JDIThread.runEvaluation(JDIThread.java:764)
	at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine$EvalRunnable.run(ASTEvaluationEngine.java:735)
	at org.eclipse.jdt.internal.debug.core.model.JDIThread$ThreadJob.run(JDIThread.java:3157)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
-------------------------------------------------------------------------------
Comment 1 Michael Rennie CLA 2012-02-02 10:24:35 EST
Can you paste the snippet you were trying to evaluate?
Comment 2 Deepak Azad CLA 2012-02-09 14:48:15 EST
Now I cannot reproduce this with I20120207-2200. Did it get fixed last week?
Comment 3 Michael Rennie CLA 2012-02-09 15:04:23 EST
(In reply to comment #2)
> Now I cannot reproduce this with I20120207-2200. Did it get fixed last week?

No. still waiting on that snippet :)
Comment 4 Deepak Azad CLA 2012-02-09 21:59:35 EST
The thing is now I cannot reproduce the problem even with I20120131-2200.

In any case I will try to describe the problem as I remember, maybe you get a clue..

1. Create a 'Plug-in' project (not a Java project)
2. Create a type
package p;
class A {
	void foo() {
            String s = "abc";		
	}
}
3. Source > Externalize Strings (..and follow the steps in the wizard)

4. Breakpoint at 
org.eclipse.jdt.internal.ui.propertiesfileeditor.PropertiesFileEditor
Line 311 - 	return accessorType;

5. Open the Properties file created in step 3
=> the debugger will stop at the breakpoint
6. Step Over
=> Exception

I was essentially following these steps last week, but for some reason I do not see an exception today. Maybe something (else) went wrong in my previous debugger session?
Comment 5 Deepak Azad CLA 2012-02-10 01:11:39 EST
Ha! can reproduce now even with I20120207-2200.

1. Breakpoint at 
org.eclipse.jdt.internal.ui.propertiesfileeditor.PropertiesFileEditor
Line 308 -     private IType findAccessorType(IProgressMonitor pm) ...

2. Add 'fIsStateValidationEnabled' as a watch expression. This is a private field in a supertype of PropertiesFileEditor, see org.eclipse.ui.texteditor.AbstractTextEditor.fIsStateValidationEnabled.

3. Open any properties file
=> Breakpoint from step 1 is reached
=> Exception
=> Expressions view shows the value of 'fIsStateValidationEnabled' as "(pending)"
Comment 6 Michael Rennie CLA 2013-02-28 16:37:33 EST

*** This bug has been marked as a duplicate of bug 282974 ***