Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359569 - Project validation produces many errors in Error Log and freezes
Summary: Project validation produces many errors in Error Log and freezes
Status: CLOSED DUPLICATE of bug 311212
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7.1   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-30 10:32 EDT by Victor Homyakov CLA
Modified: 2012-01-03 10:27 EST (History)
6 users (show)

See Also:


Attachments
GUI freeze - thread dump 1 (33.46 KB, text/plain)
2011-10-04 04:10 EDT, Victor Homyakov CLA
no flags Details
GUI freeze - thread dump 2 (28.45 KB, text/plain)
2011-10-04 04:11 EDT, Victor Homyakov CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Homyakov CLA 2011-09-30 10:32:27 EDT
After rebuilding web project validator starts project validation and produces many (>100) similar error records in Error Log. Sometimes it freezes for a very long time or hangs Eclipse (at least once a week).

Error Log record:

Message: Error occurred while firing Node Parsed event

Exception Stack Trace:
java.lang.NullPointerException
	at org.eclipse.jst.jsp.core.taglib.ProjectDescription.updateWebXML(ProjectDescription.java:2574)
	at org.eclipse.jst.jsp.core.taglib.ProjectDescription$Indexer.visit(ProjectDescription.java:227)
	at org.eclipse.core.internal.resources.Resource$1.visitElement(Resource.java:65)
	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:82)
	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86)
	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86)
	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86)
	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86)
	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86)
	at org.eclipse.core.internal.watson.ElementTreeIterator.iterate(ElementTreeIterator.java:127)
	at org.eclipse.core.internal.resources.Resource.accept(Resource.java:75)
	at org.eclipse.jst.jsp.core.taglib.ProjectDescription.index(ProjectDescription.java:1463)
	at org.eclipse.jst.jsp.core.taglib.ProjectDescription.restoreReferences(ProjectDescription.java:1909)
	at org.eclipse.jst.jsp.core.taglib.ProjectDescription.<init>(ProjectDescription.java:708)
	at org.eclipse.jst.jsp.core.taglib.TaglibIndex.createDescription(TaglibIndex.java:719)
	at org.eclipse.jst.jsp.core.taglib.TaglibIndex.internalResolve(TaglibIndex.java:899)
	at org.eclipse.jst.jsp.core.taglib.TaglibIndex.resolve(TaglibIndex.java:540)
	at org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager.getCacheKey(TLDCMDocumentManager.java:686)
	at org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager.getCMDocument(TLDCMDocumentManager.java:701)
	at org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager$DirectiveStructuredDocumentRegionHandler.enableTags(TLDCMDocumentManager.java:121)
	at org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager$DirectiveStructuredDocumentRegionHandler.processXMLStartTag(TLDCMDocumentManager.java:345)
	at org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager$DirectiveStructuredDocumentRegionHandler.processRegionCollection(TLDCMDocumentManager.java:182)
	at org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager$DirectiveStructuredDocumentRegionHandler.nodeParsed(TLDCMDocumentManager.java:191)
	at org.eclipse.wst.xml.core.internal.parser.XMLSourceParser.fireNodeParsed(XMLSourceParser.java:135)
	at org.eclipse.jst.jsp.core.internal.parser.JSPSourceParser.parseNodes(JSPSourceParser.java:296)
	at org.eclipse.wst.xml.core.internal.parser.XMLSourceParser.getDocumentRegions(XMLSourceParser.java:173)
	at org.eclipse.wst.sse.core.internal.text.StructuredDocumentReParser._core_reparse_text(StructuredDocumentReParser.java:310)
	at org.eclipse.wst.sse.core.internal.text.StructuredDocumentReParser.core_reparse(StructuredDocumentReParser.java:707)
	at org.eclipse.jst.jsp.core.internal.parser.JSPReParser.reparse(JSPReParser.java:153)
	at org.eclipse.wst.sse.core.internal.text.StructuredDocumentReParser.reparse(StructuredDocumentReParser.java:1288)
	at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.updateModel(BasicStructuredDocument.java:2713)
	at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.internalReplaceText(BasicStructuredDocument.java:1923)
	at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.replaceText(BasicStructuredDocument.java:2423)
	at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.set(BasicStructuredDocument.java:2935)
	at org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer.setDocumentContent(ResourceTextFileBuffer.java:575)
	at org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer.initializeFileBufferContent(ResourceTextFileBuffer.java:286)
	at org.eclipse.core.internal.filebuffers.ResourceFileBuffer.create(ResourceFileBuffer.java:245)
	at org.eclipse.core.internal.filebuffers.TextFileBufferManager.connect(TextFileBufferManager.java:112)
	at org.eclipse.wst.sse.core.internal.FileBufferModelManager.getModel(FileBufferModelManager.java:660)
	at org.eclipse.wst.sse.core.internal.model.ModelManagerImpl._doCommonGetModel(ModelManagerImpl.java:544)
	at org.eclipse.wst.sse.core.internal.model.ModelManagerImpl._commonGetModel(ModelManagerImpl.java:508)
	at org.eclipse.wst.sse.core.internal.model.ModelManagerImpl._commonGetModel(ModelManagerImpl.java:481)
	at org.eclipse.wst.sse.core.internal.model.ModelManagerImpl.getModelForRead(ModelManagerImpl.java:1419)
	at org.eclipse.jst.jsp.core.internal.java.search.JSPSearchDocument.getJSPTranslation(JSPSearchDocument.java:112)
	at org.eclipse.jst.jsp.core.internal.java.search.JSPSearchDocument.getCharContents(JSPSearchDocument.java:77)
	at org.eclipse.jst.jsp.core.internal.java.search.JavaSearchDocumentDelegate.getCharContents(JavaSearchDocumentDelegate.java:41)
	at org.eclipse.jdt.internal.core.search.indexing.SourceIndexer.indexDocument(SourceIndexer.java:60)
	at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.indexDocument(JavaSearchParticipant.java:72)
	at org.eclipse.jst.jsp.core.internal.java.search.JSPSearchParticipant.indexDocument(JSPSearchParticipant.java:72)
	at org.eclipse.jdt.internal.core.search.indexing.IndexManager.indexDocument(IndexManager.java:453)
	at org.eclipse.jdt.internal.core.search.indexing.IndexManager$1.execute(IndexManager.java:853)
	at org.eclipse.jdt.internal.core.search.processing.JobManager.run(JobManager.java:405)
	at java.lang.Thread.run(Thread.java:662)

Eclipse: Eclipse Java EE IDE for Web Developers
Version: Indigo Service Release 1
Build id: 20110916-0149
Comment 1 Nitin Dahyabhai CLA 2011-09-30 13:21:21 EDT
Valid bug, but you should double-check and make sure your web.xml points to valid tag libraries.
Comment 2 Nitin Dahyabhai CLA 2011-09-30 13:27:11 EDT
Not sure about the freezing, though.
Comment 3 Victor Homyakov CLA 2011-10-03 02:40:29 EDT
(In reply to comment #1)
> make sure your web.xml points to valid tag libraries.

I use servlet 2.5, and web.xml does not contain any taglib declarations - all tag information is taken directly from jars.
Comment 4 Victor Homyakov CLA 2011-10-03 02:46:28 EDT
(In reply to comment #2)
> Not sure about the freezing, though.

How to get additional info about the cause of freezing/hangup?
Comment 5 Nitin Dahyabhai CLA 2011-10-03 08:46:55 EDT
(In reply to comment #4)
> (In reply to comment #2)
> > Not sure about the freezing, though.
> 
> How to get additional info about the cause of freezing/hangup?

http://wiki.eclipse.org/index.php/How_to_report_a_deadlock
Comment 6 Victor Homyakov CLA 2011-10-04 04:10:40 EDT
Created attachment 204491 [details]
GUI freeze - thread dump 1
Comment 7 Victor Homyakov CLA 2011-10-04 04:11:09 EDT
Created attachment 204492 [details]
GUI freeze - thread dump 2
Comment 8 Victor Homyakov CLA 2011-10-04 04:16:18 EDT
Attached two thread dumps while Eclipse was freezed for 2 minutes with "Validating 3%..." progress indicator.

I have just updated project from SVN, then project rebuild started automatically, and after that project validation was started.

Eclipse:
Eclipse Java EE IDE for Web Developers.
Version: Indigo Service Release 1
Build id: 20110916-0149

Java:
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Server VM (build 20.1-b02, mixed mode)
Comment 9 Nitin Dahyabhai CLA 2011-10-24 10:55:59 EDT
Victor, can you confirm which version of the org.eclipse.jst.jsp.core plug-in is installed, as well as whether the workspace and all libraries/jars you're referring to from it are on a local disk (not a mounted network or removable filesystem)?
Comment 10 Victor Homyakov CLA 2011-10-25 04:04:09 EDT
(In reply to comment #9)
> which version of the org.eclipse.jst.jsp.core plug-in
> is installed

org.eclipse.jst.jsp.core_1.2.401.v201108302147.jar  654823 bytes

> whether the workspace and all libraries/jars you're
> referring to from it are on a local disk (not a mounted network or removable
> filesystem)?

Eclipse, workspace and all other jars are located on the same local disk, on the same partition (exactly: ~/bin/eclipse-3.7, ~/workspace, ~/.m2/repository). All required libraries are placed either in workspace or in maven local repository.
Comment 11 Kapil Verma CLA 2011-11-07 11:22:49 EST
I can see this error while opening any JSP for editing. Even while debugging, if a breakpoint in JSP is hit, this error pops-up. The major problem is that the error message appears more than 20 times and it doesn't go in background till you click Ok.

My platform details are:

Version: Indigo Release
Build id: 20110615-0604
OS: openSuseLinux 11.4
Java: java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
Java HotSpot(TM) Server VM (build 20.4-b02, mixed mode)


Regards,
Kapil
Comment 12 Nick Sandonato CLA 2011-11-17 17:02:53 EST
Both stack dumps show JDT in the UI thread during the freeze. Passing to JDT to see if they know anything about this particular problem.

The NPE has been fixed.
Comment 13 Deepak Azad CLA 2011-11-23 06:24:13 EST
(In reply to comment #12)
> Both stack dumps show JDT in the UI thread during the freeze. Passing to JDT to
> see if they know anything about this particular problem.

I have not seen this with only JDT installed. Also both stack dumps are different as far as the UI thread is concerned. 

Feel free to move the bug back if you this with Eclipse Classic SDK or you have more info.
Comment 14 Markus Keller CLA 2011-12-07 14:30:17 EST
Do you have class folders with a lot of .class files on the build path? If yes, then I think the freezing is bug 311212.

If you can reproduce the problem, then please try again with a recent 3.8/4.2 build. If you don't see the freezing any more, then this would support us in backporting bug 311212 to 3.7.2.
Comment 15 Victor Homyakov CLA 2011-12-09 02:36:02 EST
(In reply to comment #14)
> Do you have class folders with a lot of .class files on the build path?

The largest project has 126 src folders and 812 .java files, build folder with 812 .class files.

> If yes, then I think the freezing is bug 311212.

Looks similar.

> If you can reproduce the problem, then please try again with a recent 3.8/4.2
> build. If you don't see the freezing any more, then this would support us in
> backporting bug 311212 to 3.7.2.

I've started downloading version 4.2 M3 for Java EE, however installing and checking projects will require some time.
Comment 16 Markus Keller CLA 2011-12-09 06:23:10 EST
(In reply to comment #15)
> I've started downloading version 4.2 M3 for Java EE, however installing and
> checking projects will require some time.

Sorry, I should have been more specific. The fix for bug 311212 has only been released after M3 (on 2011-11-07). You have to wait for M4 (to be declared till next Monday) or take a more recent I-build.
Comment 17 Victor Homyakov CLA 2011-12-12 03:21:20 EST
(In reply to comment #16)
> Sorry, I should have been more specific. The fix for bug 311212 has only been
> released after M3 (on 2011-11-07).

:(

> You have to wait for M4 (to be declared till
> next Monday) or take a more recent I-build.

Can you make a small patch (or jar with changed class) for Eclipse 3.7? I'll check this in existing Eclipse 3.7.1 installation much faster (just copy jar and restart) than downloading 3.8 + installing needed plugins (also are current versions of m2e and svn plugin compatible with 3.8?) + checking projects from SVN again.
Comment 18 Markus Keller CLA 2011-12-13 09:59:46 EST
(In reply to comment #17)
> Can you make a small patch (or jar with changed class) for Eclipse 3.7? I'll
> check this in existing Eclipse 3.7.1 installation much faster [..]

Here's a patched jdt.ui JAR for 3.7.1:
http://dl.dropbox.com/u/9385300/org.eclipse.jdt.ui_3.7.1.r371_v20110824-0800.zip
Comment 19 Victor Homyakov CLA 2011-12-14 02:49:03 EST
(In reply to comment #18)
> Here's a patched jdt.ui JAR for 3.7.1:
> http://dl.dropbox.com/u/9385300/org.eclipse.jdt.ui_3.7.1.r371_v20110824-0800.zip

Thanks. Downloaded and installed into Eclipse. At the first glance seems a bit more responsive while building/validating projects, but I should work for a while for more correct results.
Comment 20 Victor Homyakov CLA 2011-12-15 05:44:23 EST
Working for two days. Eclipse is more responsive and not freezing during build/validation process. General impression is better than before this patch.
Comment 21 Victor Homyakov CLA 2011-12-26 02:54:49 EST
I think Eclipse works better with this patch. I would like to see this patch in 3.7.2.
Comment 22 Nick Sandonato CLA 2012-01-03 10:17:54 EST
Markus, thanks for taking a look at this! I'm going to pass this back to JDT UI since it seems your patch has helped Victor out.
Comment 23 Dani Megert CLA 2012-01-03 10:27:57 EST

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