Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315337 - An internal error occurred during: "Semantic Highlighting Job".
Summary: An internal error occurred during: "Semantic Highlighting Job".
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 critical with 3 votes (vote)
Target Milestone: ---   Edit
Assignee: PHP UI CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-01 23:22 EDT by Zhongwei Zhao CLA
Modified: 2020-05-14 11:08 EDT (History)
12 users (show)

See Also:


Attachments
Patch (929 bytes, patch)
2010-06-01 23:24 EDT, Zhongwei Zhao CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zhongwei Zhao CLA 2010-06-01 23:22:34 EDT
Sometimes when I open a php file of Zend Framework,I will get this error,with the following stack trace.

java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
at java.util.HashMap$ValueIterator.next(HashMap.java:822)
at org.eclipse.dltk.internal.core.index.sql.h2.H2Cache.searchElements(H2Cache.java:293)
at org.eclipse.dltk.internal.core.index.sql.h2.H2ElementDao.search(H2ElementDao.java:194)
at org.eclipse.dltk.internal.core.index.sql.SqlSearchEngine.search(SqlSearchEngine.java:146)
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.php.internal.core.model.PhpModelAccess.findIncludes(PhpModelAccess.java:110)
at org.eclipse.php.internal.core.filenetwork.FileNetworkUtility.internalBuildReferencedFilesTree(FileNetworkUtility.java:261)
at org.eclipse.php.internal.core.filenetwork.FileNetworkUtility.internalBuildReferencedFilesTree(FileNetworkUtility.java:296)
at org.eclipse.php.internal.core.filenetwork.FileNetworkUtility.internalBuildReferencedFilesTree(FileNetworkUtility.java:296)
at org.eclipse.php.internal.core.filenetwork.FileNetworkUtility.buildReferencedFilesTree(FileNetworkUtility.java:246)
at org.eclipse.php.internal.core.filenetwork.FileNetworkUtility.buildReferencedFilesTree(FileNetworkUtility.java:221)
at org.eclipse.php.internal.core.typeinference.PHPModelUtils.fileNetworkFilter(PHPModelUtils.java:185)
at org.eclipse.php.internal.core.typeinference.PHPModelUtils.fileNetworkFilter(PHPModelUtils.java:154)
at org.eclipse.php.internal.core.typeinference.PHPModelUtils.filterElements(PHPModelUtils.java:243)
at org.eclipse.php.internal.core.typeinference.PHPModelUtils.getTypes(PHPModelUtils.java:1366)
at org.eclipse.php.internal.core.typeinference.PHPTypeInferenceUtils.internalGetModelElements(PHPTypeInferenceUtils.java:160)
at org.eclipse.php.internal.core.typeinference.PHPTypeInferenceUtils.getModelElements(PHPTypeInferenceUtils.java:127)
at org.eclipse.php.internal.core.typeinference.BindingUtility.getModelElement(BindingUtility.java:286)
at org.eclipse.php.internal.core.typeinference.BindingUtility.getModelElement(BindingUtility.java:275)
at org.eclipse.php.internal.core.ast.nodes.DefaultBindingResolver.getModelElements(DefaultBindingResolver.java:231)
at org.eclipse.php.internal.core.ast.nodes.DefaultBindingResolver.resolveExpressionType(DefaultBindingResolver.java:326)
at org.eclipse.php.internal.core.ast.nodes.Expression.resolveTypeBinding(Expression.java:107)
at org.eclipse.php.internal.ui.editor.highlighter.ModelUtils.getMethod(ModelUtils.java:42)
at org.eclipse.php.internal.ui.editor.highlighters.StaticMethodHighlighting$StaticMethodApply.visit(StaticMethodHighlighting.java:59)
at org.eclipse.php.internal.core.ast.nodes.MethodInvocation.accept0(MethodInvocation.java:73)
at org.eclipse.php.internal.core.ast.nodes.ASTNode.accept(ASTNode.java:275)
at org.eclipse.php.internal.core.ast.nodes.InfixExpression.childrenAccept(InfixExpression.java:189)
at org.eclipse.php.internal.core.ast.nodes.InfixExpression.accept0(InfixExpression.java:183)
at org.eclipse.php.internal.core.ast.nodes.ASTNode.accept(ASTNode.java:275)
at org.eclipse.php.internal.core.ast.nodes.IfStatement.childrenAccept(IfStatement.java:95)
at org.eclipse.php.internal.core.ast.nodes.IfStatement.accept0(IfStatement.java:89)
at org.eclipse.php.internal.core.ast.nodes.ASTNode.accept(ASTNode.java:275)
at org.eclipse.php.internal.core.ast.nodes.Block.childrenAccept(Block.java:97)
at org.eclipse.php.internal.core.ast.nodes.Block.accept0(Block.java:90)
at org.eclipse.php.internal.core.ast.nodes.ASTNode.accept(ASTNode.java:275)
at org.eclipse.php.internal.core.ast.nodes.FunctionDeclaration.childrenAccept(FunctionDeclaration.java:108)
at org.eclipse.php.internal.core.ast.nodes.FunctionDeclaration.accept0(FunctionDeclaration.java:97)
at org.eclipse.php.internal.core.ast.nodes.ASTNode.accept(ASTNode.java:275)
at org.eclipse.php.internal.core.ast.nodes.MethodDeclaration.childrenAccept(MethodDeclaration.java:90)
at org.eclipse.php.internal.core.ast.nodes.MethodDeclaration.accept0(MethodDeclaration.java:82)
at org.eclipse.php.internal.core.ast.nodes.ASTNode.accept(ASTNode.java:275)
at org.eclipse.php.internal.core.ast.nodes.Block.childrenAccept(Block.java:97)
at org.eclipse.php.internal.core.ast.nodes.Block.accept0(Block.java:90)
at org.eclipse.php.internal.core.ast.nodes.ASTNode.accept(ASTNode.java:275)
at org.eclipse.php.internal.core.ast.nodes.ClassDeclaration.childrenAccept(ClassDeclaration.java:118)
at org.eclipse.php.internal.core.ast.nodes.ClassDeclaration.accept0(ClassDeclaration.java:104)
at org.eclipse.php.internal.core.ast.nodes.ASTNode.accept(ASTNode.java:275)
at org.eclipse.php.internal.core.ast.nodes.Program.childrenAccept(Program.java:195)
at org.eclipse.php.internal.core.ast.nodes.Program.accept0(Program.java:188)
at org.eclipse.php.internal.core.ast.nodes.ASTNode.accept(ASTNode.java:275)
at org.eclipse.php.internal.ui.editor.highlighter.AbstractSemanticHighlighting.consumes(AbstractSemanticHighlighting.java:93)
at org.eclipse.php.internal.ui.editor.highlighter.AbstractSemanticHighlighting.consumes(AbstractSemanticHighlighting.java:102)
at org.eclipse.wst.sse.ui.internal.style.SemanticHighlightingReconciler.reconcile(SemanticHighlightingReconciler.java:125)
at org.eclipse.wst.sse.ui.internal.style.SemanticHighlightingReconciler$1.run(SemanticHighlightingReconciler.java:279)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 1 Zhongwei Zhao CLA 2010-06-01 23:24:35 EDT
Created attachment 170737 [details]
Patch
Comment 2 Roy Ganor CLA 2010-06-02 02:26:13 EDT
hi Michael, 
Can you please take a look and verify Zhao's patch? it's a critical issue that we came across very lately.

Thanks!
Comment 3 Zhongwei Zhao CLA 2010-06-16 23:30:56 EDT
I am sure this bug really exists now in my devenv with the latest code from pdt and dltk.
Comment 4 Christof Damian CLA 2010-06-17 01:58:04 EDT
(In reply to comment #3)
> I am sure this bug really exists now in my devenv with the latest code from pdt
> and dltk.

I also see it regularly at work where we have or own rather large framework. 

I am using Helios RC4 with PDT 2.2.0
Comment 5 Kir CLA 2010-06-29 10:27:58 EDT
(In reply to comment #3)
> I am sure this bug really exists now in my devenv with the latest code from pdt
> and dltk.

I see it every time at several files in my project.

PDT 2.2 not ready for real work.
Comment 6 Kir CLA 2010-07-07 11:30:49 EDT
Lol.

If i try to off all checkbox "Enabled" in code coloring for each "Syntax element" then PDT will be work normal.

But i don't like standart colors. 

Then i checked "Enabled" and changed style(color) of "Syntax element".
After it i unchek "Enabled" Eclpse(PDT) did not show to me this bug anymore.
Comment 7 Maarten Kossen CLA 2010-07-14 05:20:31 EDT
This error also occurs on Ubuntu Lucid amd64 with large projects (300+MB).
Comment 8 Nate CLA 2010-07-22 14:39:07 EDT
This is also happening for me on Mac OS X 10.6.

I can recreate at will by opening up wp-includes/functions.php.  This file is part of WordPress 3.0 - wordpress.org.  Simply create a project using the WordPress code and open the file.  RAM usage surges from 300MB to 600+MB.

An internal error occurred during: "Semantic Highlighting Job".
Java heap space

In my case it looks PDT is exceeding the maximum size for the Java memory heap.
Comment 9 Nate CLA 2010-07-22 14:49:01 EDT
I just tried what Kir suggested and sure enough, I don't experience the issue after unchecking all the "Enabled" check boxes under Preferences > PHP > Editor > Syntax Coloring.

Thanks for your suggestion Kir!  At least my search for a better PHP IDE can take a break for the time being.
Comment 10 Kir CLA 2010-07-31 03:44:30 EDT
(In reply to comment #9)
> I just tried what Kir suggested and sure enough, I don't experience the issue
> after unchecking all the "Enabled" check boxes under Preferences > PHP > Editor
> > Syntax Coloring.

but in big projects this trick don't work -((
Comment 11 Roy Ganor CLA 2010-08-04 03:56:30 EDT
several fixes contributed to resolve this issue.

Needs to be verified on next build
Comment 12 Zhongwei Zhao CLA 2010-08-04 04:26:59 EDT
now in my devenv I can still get java.util.ConcurrentModificationException,and after apply my patch,I could not get it for a long time
Comment 13 securitycenter.pl CLA 2010-08-04 05:41:52 EDT
Hello,

@zhaozhongwei - How can I implement Your patch to Eclipse?
Comment 14 Zhongwei Zhao CLA 2010-08-04 05:44:40 EDT
I do not know,because my patch is for dltk
Comment 15 securitycenter.pl CLA 2010-08-04 05:46:37 EDT
(In reply to comment #14)
> I do not know,because my patch is for dltk

So, when it is possible to update Windows users? I can't work with that error, You know about that. I had the same stack trace, so if You fix it, Your fix help me. Maybe another people can help?
Comment 16 Roy Ganor CLA 2010-08-04 06:01:15 EDT
you can install the latest dltk integration build (for DLTK 2.0) and the last PDT integration build (for PDT 2.2).
Comment 17 securitycenter.pl CLA 2010-08-04 07:32:09 EDT
(In reply to comment #16)
> you can install the latest dltk integration build (for DLTK 2.0) and the last
> PDT integration build (for PDT 2.2).

As I see in filename, that PDT is from 2010-05-19, where that bug was fixed today, so? :-)
Comment 18 Kir CLA 2010-08-04 17:32:47 EDT
(In reply to comment #16)
> you can install the latest dltk integration build (for DLTK 2.0) and the last
> PDT integration build (for PDT 2.2).

when will be next millestone with this patch?
i don't wish build from source
Comment 19 Roy Ganor CLA 2010-08-05 03:22:14 EDT
We'll try to release a milestone soon, after DLTK provide their milestone build.
Comment 20 Wiktor Jarka CLA 2010-09-22 07:30:13 EDT
I am also suffering from having this bug. Any ETA on the new release?
Comment 21 Roy Ganor CLA 2010-09-26 18:11:35 EDT
(In reply to comment #20)
> I am also suffering from having this bug. Any ETA on the new release?

you can check out Helios SR-1 which was release last weekend.

eclipse.org/downloads
Comment 22 pphilipp CLA 2010-09-28 11:46:51 EDT
Latest nightly seems to fix that problem - at least on my installation.
You can download the latest nightly directly from hudson (But since the nightly build has been fixed there will be links again on the pdt page).
Link to hudson and more related information you'll find here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=325817
Comment 23 Sylvia Tancheva CLA 2010-10-06 04:43:06 EDT
Don't see the error on Helios SR-1 as Roy suggested.
Closing the bug.
If someone can still reproduce please reopen and give more details.
Comment 24 Pasqualle CLA 2010-11-11 05:36:18 EST
I still see this error on Helios SR1

error:
An internal error occurred during: "Semantic Highlighting Job".
Java heap space

I work on Drupal 7. [http://drupal.org/project/drupal]
when I open the /includes/common.inc file then Eclipse becomes quite unresponsive and within a minute I get this error..
Comment 25 pphilipp CLA 2010-11-11 06:06:21 EST
(In reply to comment #24)
> I still see this error on Helios SR1
> 
> error:
> An internal error occurred during: "Semantic Highlighting Job".
> Java heap space
> 
> I work on Drupal 7. [http://drupal.org/project/drupal]
> when I open the /includes/common.inc file then Eclipse becomes quite
> unresponsive and within a minute I get this error..

Pasqualle did you install the latest nightly? I'm working with D7 too. And all the problems are gone since I installed the nightly from 2010-09-28. Also debugging works much better!
Unfortunately the nightly is not available on the official download-page - more info about that you'll find here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=325817
But instead using a nightly you could give a try the latest maintenance build: http://www.eclipse.org/pdt/downloads/#M201010110334
Comment 26 Hans Meier CLA 2011-01-22 10:22:04 EST
No, this isn't fixed. I downloaded PDT 2.2 today and when I imported my code folder and opened WordPress functions.php like a previous commenter did, Eclipse hangs, consuming an insane amount of RAM and after some time it shows the "Semantic Highlighting job - Java heap" error.

PDT Helios is simply unusable because of this.
Comment 27 jkn CLA 2011-03-22 14:30:51 EDT
Hi,

I have Helios 3.6.2.r362_v20110210 with PDT 2.2.1.v20101001-2300 installed on Snow Leopard and Eclipse hangs every time I open an HTML template (I open it in PHP editor) which includes PHP tags.

I've waited for an error message, but Eclipse just stops responding and eventually I have to force shutdown.