Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 366274 - ClassCastException in PHP code assist
Summary: ClassCastException in PHP code assist
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PHP Core CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-09 18:19 EST by Alexander Gurov CLA
Modified: 2020-05-14 11:17 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Gurov CLA 2011-12-09 18:19:47 EST
3.0.0.v20110516-1100

What steps will reproduce the problem?
1. Edit a PHP file with a single class in it
2. Do copy/paste several times
3. After awhile it crashes

P.S.
I get this error alot after migrating from Helios to Indigo. The most ugly thing is that error dialogs keep poping up until I open the Error Log view. Since there might be dozen of exceptions at once it really gets on the nerve to hit the enter key or to switch to the Error Log in the most unexpected moment. :)

-- Error Details --
Date: Sat Dec 10 00:48:00 EET 2011
Message: PHPCore plugin internal error
Severity: Error
Product: Eclipse SDK 3.7.1.v201109091335 (org.eclipse.sdk.ide)
Plugin: org.eclipse.php.core
Session Data:
eclipse.buildId=M20110909-1335
java.version=1.6.0_22
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=ru_RU
Command-line arguments:  -os win32 -ws win32 -arch x86

Exception Stack Trace:
java.lang.ClassCastException: org.eclipse.dltk.internal.core.SourceField cannot be cast to org.eclipse.dltk.core.IMethod
	at org.eclipse.php.internal.core.typeinference.evaluators.FormalParameterEvaluator.init(FormalParameterEvaluator.java:54)
	at org.eclipse.dltk.ti.GoalEngine.evaluateGoal(GoalEngine.java:220)
	at org.eclipse.dltk.ti.DefaultTypeInferencer.evaluateType(DefaultTypeInferencer.java:223)
	at org.eclipse.dltk.ti.DefaultTypeInferencer.evaluateType(DefaultTypeInferencer.java:231)
	at org.eclipse.php.internal.core.codeassist.CodeAssistUtils.getVariableType(CodeAssistUtils.java:142)
	at org.eclipse.php.internal.core.codeassist.CodeAssistUtils.innerGetClassName(CodeAssistUtils.java:438)
	at org.eclipse.php.internal.core.codeassist.CodeAssistUtils.getTypesFor(CodeAssistUtils.java:333)
	at org.eclipse.php.internal.core.codeassist.PHPSelectionEngine.internalResolve(PHPSelectionEngine.java:585)
	at org.eclipse.php.internal.core.codeassist.PHPSelectionEngine.select(PHPSelectionEngine.java:140)
	at org.eclipse.dltk.internal.core.Openable.codeSelect(Openable.java:624)
	at org.eclipse.dltk.internal.core.Openable.codeSelect(Openable.java:636)
	at org.eclipse.dltk.internal.core.AbstractSourceModule.codeSelect(AbstractSourceModule.java:86)
	at org.eclipse.dltk.internal.core.AbstractSourceModule.codeSelect(AbstractSourceModule.java:77)
	at org.eclipse.php.internal.core.ast.nodes.DefaultBindingResolver.resolveFunction(DefaultBindingResolver.java:628)
	at org.eclipse.php.internal.core.ast.nodes.DefaultBindingResolver.resolveName(DefaultBindingResolver.java:301)
	at org.eclipse.php.internal.core.ast.nodes.Identifier.resolveBinding(Identifier.java:165)
	at org.eclipse.php.internal.ui.actions.OpenCallHierarchyAction.getSelectionModelElement(OpenCallHierarchyAction.java:254)
	at org.eclipse.php.internal.ui.actions.OpenCallHierarchyAction.isEnabled(OpenCallHierarchyAction.java:152)
	at org.eclipse.php.internal.ui.actions.OpenCallHierarchyAction.selectionChanged(OpenCallHierarchyAction.java:111)
	at org.eclipse.php.internal.ui.actions.OpenCallHierarchyAction.selectionChanged(OpenCallHierarchyAction.java:119)
	at org.eclipse.dltk.ui.actions.SelectionDispatchAction.dispatchSelectionChanged(SelectionDispatchAction.java:247)
	at org.eclipse.dltk.ui.actions.SelectionDispatchAction.selectionChanged(SelectionDispatchAction.java:242)
	at org.eclipse.wst.sse.ui.StructuredTextEditor$4.run(StructuredTextEditor.java:592)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.wst.sse.ui.StructuredTextEditor$StructuredSelectionProvider.fireSelectionChanged(StructuredTextEditor.java:590)
	at org.eclipse.wst.sse.ui.StructuredTextEditor$StructuredSelectionProvider.handlePostSelectionChanged(StructuredTextEditor.java:671)
	at org.eclipse.wst.sse.ui.StructuredTextEditor$3.selectionChanged(StructuredTextEditor.java:564)
	at org.eclipse.jface.text.TextViewer.firePostSelectionChanged(TextViewer.java:2749)
	at org.eclipse.jface.text.TextViewer.firePostSelectionChanged(TextViewer.java:2697)
	at org.eclipse.jface.text.TextViewer$5.run(TextViewer.java:2676)
	at org.eclipse.swt.widgets.Display.runTimer(Display.java:4266)
	at org.eclipse.swt.widgets.Display.messageProc(Display.java:3353)
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2531)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Comment 1 Zhongwei Zhao CLA 2012-05-03 02:25:26 EDT
fixed.
Comment 2 Kalin CLA 2012-07-04 08:58:39 EDT
Verified fixed.
Closing...

Kalin Yanev
kalin.a@zend.com