Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321596 - Semantic highlighting error
Summary: Semantic highlighting error
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Zhongwei Zhao CLA
QA Contact: Ilina Stefanova CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-03 10:14 EDT by Arthur Gravina CLA
Modified: 2020-05-14 13:22 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arthur Gravina CLA 2010-08-03 10:14:29 EDT
Build Identifier: Build id: 20100617-1415

Whenever the following is entered in a php page Eclipse goes into a hard loop and eventually needs to abort. Report a "semantic highlighting error" restart Eclipse.

$current_user->ID  (I think will also fail with any of the other elements such as name.

Reproducible: Always

Steps to Reproduce:
1. Enter the following code
// get the id of the current user
function agv_current_user_id() {
	global $current_user;
    get_currentuserinfo();
    return $current_user->ID;
}
2.When you enter the last line it will go into an hard loop
3.
Comment 1 Zhongwei Zhao CLA 2010-08-04 01:34:59 EDT
(In reply to comment #0)
> Build Identifier: Build id: 20100617-1415
> 
> Whenever the following is entered in a php page Eclipse goes into a hard loop
> and eventually needs to abort. Report a "semantic highlighting error" restart
> Eclipse.
> 
> $current_user->ID  (I think will also fail with any of the other elements such
> as name.
> 
> Reproducible: Always
> 
> Steps to Reproduce:
> 1. Enter the following code
> // get the id of the current user
> function agv_current_user_id() {
>     global $current_user;
>     get_currentuserinfo();
>     return $current_user->ID;
> }
> 2.When you enter the last line it will go into an hard loop
> 3.

I could not reproduce this bug follow your steps.
Can you reproduce it in a new project that only contain only one file?
Comment 2 Arthur Gravina CLA 2010-08-04 07:54:49 EDT
(In reply to comment #1)
> (In reply to comment #0)
> > Build Identifier: Build id: 20100617-1415
> > 
> > Whenever the following is entered in a php page Eclipse goes into a hard loop
> > and eventually needs to abort. Report a "semantic highlighting error" restart
> > Eclipse.
> > 
> > $current_user->ID  (I think will also fail with any of the other elements such
> > as name.
> > 
> > Reproducible: Always
> > 
> > Steps to Reproduce:
> > 1. Enter the following code
> > // get the id of the current user
> > function agv_current_user_id() {
> >     global $current_user;
> >     get_currentuserinfo();
> >     return $current_user->ID;
> > }
> > 2.When you enter the last line it will go into an hard loop
> > 3.
> I could not reproduce this bug follow your steps.
> Can you reproduce it in a new project that only contain only one file?

You are correct. If I create a single file project it does not occur. It happens in the context of a large project, one part of which is "wordpress". I'll try to break out "wordpress" and see if I can reproduce it within that.
Comment 3 Todd Chaffee CLA 2010-09-07 10:44:04 EDT
I am getting this same error with PDT and a wordpress project.  It happens so often Eclipse has become unusable.  An extract of my log file is below.

!ENTRY org.eclipse.core.jobs 4 2 2010-09-07 15:31:07.571
!MESSAGE An internal error occurred during: "Semantic Highlighting Job".
!STACK 0
java.lang.StackOverflowError
	at org.h2.message.TraceObject.<init>(TraceObject.java:27)
	at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:130)
	at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.<init>(JdbcXAConnection.java:484)
	at org.h2.jdbcx.JdbcXAConnection.getConnection(JdbcXAConnection.java:125)
	at org.h2.jdbcx.JdbcConnectionPool.getConnectionNow(JdbcConnectionPool.java:225)
	at org.h2.jdbcx.JdbcConnectionPool.getConnection(JdbcConnectionPool.java:201)
	at org.eclipse.dltk.internal.core.index.sql.h2.H2DbFactory.createConnection(H2DbFactory.java:146)
	at org.eclipse.dltk.internal.core.index.sql.SqlSearchEngine.search(SqlSearchEngine.java:66)
	at org.eclipse.dltk.core.index2.search.ModelAccess.findElements(ModelAccess.java:285)
	at org.eclipse.dltk.core.index2.search.ModelAccess.findElements(ModelAccess.java:263)
	at org.eclipse.dltk.core.index2.search.ModelAccess.findFields(ModelAccess.java:70)
	at org.eclipse.php.internal.core.model.PhpModelAccess.findFields(PhpModelAccess.java:39)
	at org.eclipse.php.internal.core.typeinference.evaluators.GlobalVariableReferencesEvaluator.init(GlobalVariableReferencesEvaluator.java:71)
	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.typeinference.PHPTypeInferenceUtils.resolveExpression(PHPTypeInferenceUtils.java:92)
	at org.eclipse.php.internal.core.typeinference.BindingUtility.getFunctionReturnType(BindingUtility.java:490)
	at org.eclipse.php.internal.core.ast.nodes.MethodBinding.getReturnType(MethodBinding.java:148)
	at org.eclipse.php.internal.core.typeinference.evaluators.MethodReturnTypeEvaluator.resolveReturnType(MethodReturnTypeEvaluator.java:154)
	at org.eclipse.php.internal.core.typeinference.evaluators.MethodReturnTypeEvaluator.init(MethodReturnTypeEvaluator.java:111)
	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.typeinference.PHPTypeInferenceUtils.resolveExpression(PHPTypeInferenceUtils.java:92)
	at org.eclipse.php.internal.core.typeinference.BindingUtility.getFunctionReturnType(BindingUtility.java:490)
	at org.eclipse.php.internal.core.ast.nodes.MethodBinding.getReturnType(MethodBinding.java:148)
	at org.eclipse.php.internal.core.typeinference.evaluators.MethodReturnTypeEvaluator.resolveReturnType(MethodReturnTypeEvaluator.java:154)
	at org.eclipse.php.internal.core.typeinference.evaluators.MethodReturnTypeEvaluator.init(MethodReturnTypeEvaluator.java:111)
	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.typeinference.PHPTypeInferenceUtils.resolveExpression(PHPTypeInferenceUtils.java:92)
	at org.eclipse.php.internal.core.typeinference.BindingUtility.getFunctionReturnType(BindingUtility.java:490)
	at org.eclipse.php.internal.core.ast.nodes.MethodBinding.getReturnType(MethodBinding.java:148)
	at org.eclipse.php.internal.core.typeinference.evaluators.MethodReturnTypeEvaluator.resolveReturnType(MethodReturnTypeEvaluator.java:154)
	at org.eclipse.php.internal.core.typeinference.evaluators.MethodReturnTypeEvaluator.init(MethodReturnTypeEvaluator.java:111)
	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.typeinference.PHPTypeInferenceUtils.resolveExpression(PHPTypeInferenceUtils.java:92)
	at org.eclipse.php.internal.core.typeinference.BindingUtility.getFunctionReturnType(BindingUtility.java:490)
	at org.eclipse.php.internal.core.ast.nodes.MethodBinding.getReturnType(MethodBinding.java:148)
	at org.eclipse.php.internal.core.typeinference.evaluators.MethodReturnTypeEvaluator.resolveReturnType(MethodReturnTypeEvaluator.java:154)
	at org.eclipse.php.internal.core.typeinference.evaluators.MethodReturnTypeEvaluator.init(MethodReturnTypeEvaluator.java:111)
	at org.eclipse.dltk.ti.GoalEngine.evaluateGoal(GoalEngine.java:220)
Comment 4 Hans Meier CLA 2011-01-19 12:11:09 EST
Still occurs with PDT Helios, I got it when opening WordPress functions.php.
Comment 5 Zhongwei Zhao CLA 2011-05-12 04:07:16 EDT
Todd's bug has been fixed,please use the latest PDT release.
If your log is not same as Todd's,please reopen it,and then upload the log,thanks very much!
Comment 6 Kalin CLA 2011-08-02 04:13:49 EDT
Verified.
Closing...