Community
Participate
Working Groups
Build Identifier: 20100917-0705 I'll attach the dump of the debug console with a set of thread dumps I took. The initial ones are some seconds apart. The last is a few minutes after that. This has happened before but we were not able to resolve it. It looks like it only started again after I had to change between projects. I have a different project for each dev version of our app and have just had to close one, open another one and work with it. The clearcase view (where the project source lives) had also only just been updated (maybe a hint at indexing?). We do not use any of the Builders in Eclipse (i.e. Java, Ant) Reproducible: Sometimes Steps to Reproduce: Not possible to say exactly as I don't know 100% what causes it to start. Once it starts it happens all the time:- 1. Select block of Java code in file 1 2. Paste block into Java file 2 3. IDE will hang immediately.
Created attachment 194049 [details] Debug console incl. thread dumps
FYI..Even after shutting down and restarting eclipse the hang occurs on EVERY copy paste. If there is any information I can gather while it is in this state please let me know although I won't be able to put up with it as it is for too long.
Does this also occur in a normal text editor ?
No. I just tried a copy and paste between two XML files and they are fine.
I also just tried Java to txt file and then txt file to Java and this behaved ok. But Java to Java direct hangs.
The problem seems to come from "main" prio=6 tid=0x00907400 nid=0x14b0 waiting on condition [0x0012e000..0x0012fd64] java.lang.Thread.State: TIMED_WAITING (sleeping) at java.lang.Thread.sleep(Native Method) at org.eclipse.jdt.internal.core.search.processing.JobManager.performConcurrentJob(JobManager.java:258) at org.eclipse.jdt.internal.core.search.BasicSearchEngine.searchAllTypeNames(BasicSearchEngine.java:1383) at org.eclipse.jdt.core.search.SearchEngine.searchAllTypeNames(SearchEngine.java:892) at org.eclipse.jdt.internal.core.dom.rewrite.ImportRewriteAnalyzer.evaluateStarImportConflicts(ImportRewriteAnalyzer.java:785) at org.eclipse.jdt.internal.core.dom.rewrite.ImportRewriteAnalyzer.getResultingEdits(ImportRewriteAnalyzer.java:583) at org.eclipse.jdt.core.dom.rewrite.ImportRewrite.rewriteImports(ImportRewrite.java:1065) at org.eclipse.jdt.internal.ui.javaeditor.ClipboardOperationAction.addImports(ClipboardOperationAction.java:526) at org.eclipse.jdt.internal.ui.javaeditor.ClipboardOperationAction.doPasteWithImportsOperation(ClipboardOperationAction.java:492) Not sure why this hangs though, and why is the rewriteImports(..) being invoked at all. Mark, does this still happen if you copy the source, skipping the imports?
It seems to paste OK if I disable 'update imports'
(In reply to comment #7) > It seems to paste OK if I disable 'update imports' Thats good. You atleast have a workaround till we investigate! :)
Yup. I can cope with that as a workaround. Thanks.
It would help if you could provide a testcase/your workspace projects (if possible) so that we can investigate why this happens. Thanks!
I don't think I can do that. It's about 60K java source files and obviously proprietary source. Is there any other way?
(In reply to comment #11) > I don't think I can do that. It's about 60K java source files and obviously > proprietary source. Is there any other way? If its possible to extract a dummy compilable snippet that can mirror this problem, it would be great.
(In reply to comment #12) > (In reply to comment #11) > > I don't think I can do that. It's about 60K java source files and obviously > > proprietary source. Is there any other way? > > If its possible to extract a dummy compilable snippet that can mirror this > problem, it would be great. Sorry. What I mean is that there are approx 60,000 java source files in the project and not that the java source file is 60KB in size.
It looks like the Java indexer is not yet done when the operation is performed.
Mark, does it hang forever or will it complete at some point?
I've left it for as long as I can (a few minutes) so I really can't say unequivocally that it will never come back. I captured the thread dumps hoping they would show if it was doing something or whether it was truly hung. If the problem is that it is rebuilding its indexes and these need to be in place for a paste to include imports then perhaps 'paste' logic should first check to see if the indexes are being rebuilt and, if so, paste the content but reply with a message to say something like "you need to manually do imports"
The reason why the search is done on paste is because we try to resolve on-demand import conflicts. We should allow to cancel the updating of imports in case it takes too long (filed bug 344436 to track that).
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.