Bug 15065 - [infrastructure] Organize Imports blocks Eclipse
Summary: [infrastructure] Organize Imports blocks Eclipse
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.0 M5   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-02 05:41 EDT by oliver jehle CLA
Modified: 2003-10-24 10:41 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 oliver jehle CLA 2002-05-02 05:41:47 EDT
Problem is, i cannot supply an example for the problem... 

the problem occurs, if you work with eclipse for a time, then do an organzie
imports, normaly it works, but it happens, that after some time do it on another
source, eclipse is hanging... not using a lot of cpu, only hangs... you have to
kill the java runtime and start again...
Comment 1 Philipe Mulet CLA 2002-05-02 06:11:58 EDT
Can you launch with console (-consoleLog), and if it occurs again please try to 
hit ctrl-Pause in the console, so as to force a Java core dump (won't crash 
Eclipse) providing some indication about what offending code is running.

Comment 2 oliver jehle CLA 2002-05-03 06:55:35 EDT
i've done like you proposed and opened eclipse with a console log. 
but i'm sorry.. ctrl->pause didn't work on my station :-) perhaps kill -3  ??? 

but there's comming a stacktrace, and after the stacktrace occurs, when i do a
organize import, eclipse hangs... 


and here it is...



java.lang.ClassCastException
        at org.eclipse.jdt.internal.core.index.impl.IndexerOutput.addRef(Indexer
Output.java(Compiled Code))
        at org.eclipse.jdt.internal.core.index.impl.IndexerOutput.addRef(Indexer
Output.java(Compiled Code))
        at org.eclipse.jdt.internal.core.index.impl.IndexerOutput.addRef(Indexer
Output.java(Compiled Code))
        at org.eclipse.jdt.internal.core.search.indexing.AbstractIndexer.addCons
tructorReference(AbstractIndexer.java:67)
        at org.eclipse.jdt.internal.core.search.indexing.SourceIndexerRequestor.
acceptConstructorReference(SourceIndexerRequestor.java:37)
        at org.eclipse.jdt.internal.compiler.SourceElementParser.notifySourceEle
mentRequestor(SourceElementParser.java(Compiled Code))
        at org.eclipse.jdt.internal.compiler.SourceElementParser.notifySourceEle
mentRequestor(SourceElementParser.java:963)
        at org.eclipse.jdt.internal.compiler.SourceElementParser.notifySourceEle
mentRequestor(SourceElementParser.java:967)
        at org.eclipse.jdt.internal.compiler.SourceElementParser.notifySourceEle
mentRequestor(SourceElementParser.java:594)
        at org.eclipse.jdt.internal.compiler.SourceElementParser.parseCompilatio
nUnit(SourceElementParser.java:1036)
        at org.eclipse.jdt.internal.core.search.indexing.SourceIndexer.indexFile
(SourceIndexer.java:67)
        at org.eclipse.jdt.internal.core.search.indexing.AbstractIndexer.index(A
bstractIndexer.java:558)
        at org.eclipse.jdt.internal.core.index.impl.Index.add(Index.java:88)
        at org.eclipse.jdt.internal.core.search.indexing.AddCompilationUnitToInd
ex.execute(AddCompilationUnitToIndex.java:54)
        at org.eclipse.jdt.internal.core.search.processing.JobManager.run(JobMan
ager.java(Compiled Code))
        at java.lang.Thread.run(Thread.java:512)
java.lang.ClassCastException
        at org.eclipse.jdt.internal.core.index.impl.InMemoryIndex.getSortedWordE
ntries(InMemoryIndex.java(Compiled Code))
        at org.eclipse.jdt.internal.core.index.impl.SimpleIndexInput.open(Simple
IndexInput.java:112)
        at org.eclipse.jdt.internal.core.index.impl.MergeFactory.merge(MergeFact
ory.java:72)
        at org.eclipse.jdt.internal.core.index.impl.Index.merge(Index.java:231)
        at org.eclipse.jdt.internal.core.index.impl.Index.save(Index.java:341)
        at org.eclipse.jdt.internal.core.search.indexing.IndexManager.saveIndexe
s(IndexManager.java:396)
        at org.eclipse.jdt.internal.core.search.indexing.IndexManager.notifyIdle
(IndexManager.java(Compiled Code))
        at org.eclipse.jdt.internal.core.search.processing.JobManager.run(JobMan
ager.java(Compiled Code))
        at java.lang.Thread.run(Thread.java:512)




Comment 3 Philipe Mulet CLA 2002-06-11 08:36:34 EDT
Defer. Offending stack frame doesn't contain any cast... might be a VM artifact.
Need steps to reproduce...
Comment 4 Philipe Mulet CLA 2002-07-25 06:59:42 EDT
Reopening
Comment 5 Philipe Mulet CLA 2002-07-25 07:00:59 EDT
Clearing resolution
Comment 6 Philipe Mulet CLA 2002-07-25 08:22:38 EDT
Indexer is being improved for 2.1
Comment 7 Lasse Lindgård CLA 2003-01-06 18:15:18 EST
I can reproduce this by adding jEdit as a project from
cvs.sourceforge.net/cvsroot/jedit login anoymous
Add HEAD/jEdit as a java project called jEdit
delete the stuff under the jars folder/package (not important)
open org.gjt.sp.jedit.gui
select organize imports

It hangs on me after asking to perform a cvs edit to which I say yes (even
though I dont have cvs write access)

To reproduce it I force end eclipse from the task manager, reopen it, refresh
the project and organize imports.

If I select no to performing a cvs edit things seems to work out better. Strange
though that I get the perform cvs edit on seemingly random files. Some I can
change some I can't...

I reproduced it 3 times in a row on my AMD XP 2000, 512 mb ram, win2k, running
Eclipse 2.1 M4

Comment 8 Kent Johnson CLA 2003-01-13 15:29:15 EST
Lasse: Can you please attach the project as an attachment to this PR... I 
cannot get connected to sourceforge.net from my machine (firewall problems).
Comment 9 Kent Johnson CLA 2003-02-07 15:56:18 EST
Lasse: Can you please attach the project as an attachment to this PR.
Comment 10 Philipe Mulet CLA 2003-02-18 08:35:29 EST
Removing milestone, not enough information to address for RC1
Comment 11 Patrick CLA 2003-03-17 03:52:58 EST
I've seen this on win NT 4 ==> please change OS to All.
It was with 2.1 RC2, inexisting version in the list, please change to 2.1.

What I did was that I reorganized the imports from existing code (the operation
made was then mainly to remove excessive imports). I then deleted all the
imports and reorganized again. Eclipse just hung taking all the CPU time. Only
exit was to kill it.
Comment 12 Lasse Lindgård CLA 2003-10-23 18:39:39 EDT
Sorry I never got around to submit the workspace that provoked the error.

For what it is worth I can't reproduce it anymore on 3.0 M2

It is not a consistent test since the jEdit project has changed a lot since it
provoked the error, but it doesn't seem like they have cleaned up their imports.

I think you should assume that it is fixed unless you get another report on it.
Comment 13 Patrick CLA 2003-10-24 08:48:47 EDT
I didn't reproduce the error since 2.1 is out. I suggest you mark it as
WORKSFORME and it will be reopened if needed.
Comment 14 Kent Johnson CLA 2003-10-24 10:41:23 EDT
Reopen if you reproduce it again, in which case please provide a stack dump 
from the console.