Bug 55867 [misc] Hang when clicking quickfix rollover
I 2004-03-24+plugin export 1) Import junit 3.8.1 into project JUnit with a source folder "src" 2) create the following two classes in the "src" folder: /* * Created on Mar 24, 2004 * * @todo To change the template for this generated file go to * Window - Preferences - Java - Code Generation - Code and Comments */ /** * @author TMA * * @todo To change the template for this generated type comment go to * Window - Preferences - Java - Code Generation - Code and Comments */ public class Bla { protected String foo; public void foo() { int foo= 13; } } /* * Created on Mar 24, 2004 * * @todo To change the template for this generated file go to * Window - Preferences - Java - Code Generation - Code and Comments */ /** * @author TMA * * @todo To change the template for this generated type comment go to * Window - Preferences - Java - Code Generation - Code and Comments */ public class Bar extends Bla { protected int foo; public void gogo() { foo= 32; } } 3) I have set up the compiler options such that I get an error against Bar.foo because it hides the Bla.foo 4) I use the rollover on the quickfix for the problem 5) Eclipse hangs in this state: Stack Traces of Threads: ThreadName=main(00035B5C) Status=Waiting Monitor=019E8170 (Object monitor for java/lang/Object @ 00E33630) Count=0 Owner=(00000000) In java/lang/Object.wait(JI)V In java/lang/Object.wait()V In org/eclipse/jdt/internal/ui/javaeditor/ASTProvider.getAST(Lorg/eclips e/jdt/core/IJavaElement;ZLorg/eclipse/core/runtime/IProgressMonitor;)Lorg/eclips e/jdt/core/dom/CompilationUnit; In org/eclipse/jdt/internal/ui/text/correction/AssistContext.getASTRoot( )Lorg/eclipse/jdt/core/dom/CompilationUnit; In org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProces sor.addHidingVariablesProposals(Lorg/eclipse/jdt/ui/text/java/IInvocationContext ;Lorg/eclipse/jdt/ui/text/java/IProblemLocation;Ljava/util/Collection;)V In org/eclipse/jdt/internal/ui/text/correction/QuickFixProcessor.process (Lorg/eclipse/jdt/ui/text/java/IInvocationContext;Lorg/eclipse/jdt/ui/text/java/ IProblemLocation;Ljava/util/Collection;)V In org/eclipse/jdt/internal/ui/text/correction/QuickFixProcessor.getCorr ections(Lorg/eclipse/jdt/ui/text/java/IInvocationContext;[Lorg/eclipse/jdt/ui/te xt/java/IProblemLocation;)[Lorg/eclipse/jdt/ui/text/java/IJavaCompletionProposal ; In org/eclipse/jdt/internal/ui/text/correction/JavaCorrectionProcessor.c ollectCorrections(Lorg/eclipse/jdt/ui/text/java/IInvocationContext;[Lorg/eclipse /jdt/ui/text/java/IProblemLocation;Ljava/util/ArrayList;)V In org/eclipse/jdt/internal/ui/text/correction/JavaCorrectionProcessor.p rocessProblemAnnotations(Lorg/eclipse/jdt/ui/text/java/IInvocationContext;Lorg/e clipse/jface/text/source/IAnnotationModel;Ljava/util/ArrayList;)V In org/eclipse/jdt/internal/ui/text/correction/JavaCorrectionProcessor.c omputeCompletionProposals(Lorg/eclipse/jface/text/ITextViewer;I)[Lorg/eclipse/jf ace/text/contentassist/ICompletionProposal; In org/eclipse/jface/text/contentassist/ContentAssistant.computeCompleti onProposals(Lorg/eclipse/jface/text/ITextViewer;I)[Lorg/eclipse/jface/text/conte ntassist/ICompletionProposal; In org/eclipse/jface/text/contentassist/CompletionProposalPopup.computeP roposals(I)[Lorg/eclipse/jface/text/contentassist/ICompletionProposal; In org/eclipse/jface/text/contentassist/CompletionProposalPopup.access$7 (Lorg/eclipse/jface/text/contentassist/CompletionProposalPopup;I)[Lorg/eclipse/j face/text/contentassist/ICompletionProposal; In org/eclipse/jface/text/contentassist/CompletionProposalPopup$1.run()V In org/eclipse/swt/custom/BusyIndicator.showWhile(Lorg/eclipse/swt/widge ts/Display;Ljava/lang/Runnable;)V In org/eclipse/jface/text/contentassist/CompletionProposalPopup.showProp osals(Z)Ljava/lang/String; In org/eclipse/jface/text/contentassist/ContentAssistant.showPossibleCom pletions()Ljava/lang/String; In org/eclipse/jdt/internal/ui/text/correction/JavaCorrectionAssistant.s howPossibleCompletions()Ljava/lang/String; In org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor$AdaptedS ourceViewer.doOperation(I)V In org/eclipse/jdt/internal/ui/javaeditor/JavaSelectMarkerRulerAction2.a nnotationDefaultSelected(Lorg/eclipse/jface/text/source/AnnotationEvent;)V In org/eclipse/jface/text/source/CompositeRuler.annotationDefaultSelecte d(Lorg/eclipse/jface/text/source/AnnotationEvent;)V In org/eclipse/ui/internal/texteditor/AnnotationExpansionControl$Item.de faultSelected()V In org/eclipse/ui/internal/texteditor/AnnotationExpansionControl$MyMouse Listener.mouseUp(Lorg/eclipse/swt/events/MouseEvent;)V In org/eclipse/swt/widgets/TypedListener.handleEvent(Lorg/eclipse/swt/wi dgets/Event;)V In org/eclipse/swt/widgets/EventTable.sendEvent(Lorg/eclipse/swt/widgets /Event;)V In org/eclipse/swt/widgets/Widget.sendEvent(Lorg/eclipse/swt/widgets/Eve nt;)V In org/eclipse/swt/widgets/Display.runDeferredEvents()Z In org/eclipse/swt/widgets/Display.readAndDispatch()Z In org/eclipse/ui/internal/Workbench.runEventLoop(Lorg/eclipse/jface/win dow/Window$IExceptionHandler;Lorg/eclipse/swt/widgets/Display;)V In org/eclipse/ui/internal/Workbench.runUI()I In org/eclipse/ui/internal/Workbench.createAndRunWorkbench(Lorg/eclipse/ swt/widgets/Display;Lorg/eclipse/ui/application/WorkbenchAdvisor;)I In org/eclipse/ui/PlatformUI.createAndRunWorkbench(Lorg/eclipse/swt/widg ets/Display;Lorg/eclipse/ui/application/WorkbenchAdvisor;)I In org/eclipse/ui/internal/ide/IDEApplication.run(Ljava/lang/Object;)Lja va/lang/Object; In org/eclipse/core/internal/runtime/PlatformActivator$1.run(Ljava/lang/ Object;)Ljava/lang/Object; In org/eclipse/core/runtime/adaptor/EclipseStarter.run(Ljava/lang/Object ;)Ljava/lang/Object; In org/eclipse/core/runtime/adaptor/EclipseStarter.run([Ljava/lang/Strin g;Ljava/lang/Runnable;)Ljava/lang/Object; In sun/reflect/NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Metho d;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; In sun/reflect/NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/ lang/Object;)Ljava/lang/Object; In sun/reflect/DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Lj ava/lang/Object;)Ljava/lang/Object; In java/lang/reflect/Method.invoke(Ljava/lang/Object;[Ljava/lang/Object; )Ljava/lang/Object; In org/eclipse/core/launcher/Main.basicRun([Ljava/lang/String;)Ljava/lan g/Object; In org/eclipse/core/launcher/Main.run([Ljava/lang/String;)I In org/eclipse/core/launcher/Main.main([Ljava/lang/String;)V ThreadName=Gc Thread(00035CAC) Status=Waiting Monitor=00035168 (System monitor) Count=0 Owner=(00000000) ThreadName=Finalizer thread(00035D00) Status=Waiting Monitor=000359A8 (System monitor) Count=0 Owner=(00000000) ThreadName=Framework Event Dispatcher(00035D54) Status=Waiting Monitor=00035AF8 (Object monitor for org/eclipse/osgi/framework/eventmgr/EventTh read @ 009C1784) Count=0 Owner=(00000000) In java/lang/Object.wait(JI)V In java/lang/Object.wait()V In org/eclipse/osgi/framework/eventmgr/EventThread.getNextEvent()Lorg/ec lipse/osgi/framework/eventmgr/EventThread$EventThreadItem; In org/eclipse/osgi/framework/eventmgr/EventThread.run()V ThreadName=Start Level Event Dispatcher(00035DA8) Status=Waiting Monitor=019E7B70 (Object monitor for org/eclipse/osgi/framework/eventmgr/EventTh read @ 009C1718) Count=0 Owner=(00000000) In java/lang/Object.wait(JI)V In java/lang/Object.wait()V In org/eclipse/osgi/framework/eventmgr/EventThread.getNextEvent()Lorg/ec lipse/osgi/framework/eventmgr/EventThread$EventThreadItem; In org/eclipse/osgi/framework/eventmgr/EventThread.run()V ThreadName=Java indexing(00035DFC) Status=Waiting Monitor=019E8110 (Object monitor for org/eclipse/jdt/internal/core/search/indexi ng/IndexManager @ 00DC29BC) Count=0 Owner=(00000000) In java/lang/Object.wait(JI)V In java/lang/Object.wait()V In org/eclipse/jdt/internal/core/search/processing/JobManager.run()V In java/lang/Thread.run()V ThreadName=Worker-29(000361EC) Status=Waiting Monitor=019E80B0 (Object monitor for org/eclipse/core/internal/jobs/WorkerPool @ 00BA6310) Count=0 Owner=(00000000) In java/lang/Object.wait(JI)V In java/lang/Object.wait(J)V In org/eclipse/core/internal/jobs/WorkerPool.sleep(J)V In org/eclipse/core/internal/jobs/WorkerPool.startJob(Lorg/eclipse/core/ internal/jobs/Worker;)Lorg/eclipse/core/internal/jobs/InternalJob; In org/eclipse/core/internal/jobs/Worker.run()V ThreadName=org.eclipse.jdt.internal.ui.text.JavaReconciler(00035FF4) Status=Waiting Monitor=01A9B598 (Object monitor for org/eclipse/jface/text/reconciler/DirtyRegi onQueue @ 06589C48) Count=0 Owner=(00000000) In java/lang/Object.wait(JI)V In java/lang/Object.wait(J)V In org/eclipse/jface/text/reconciler/AbstractReconciler$BackgroundThread .run()V ThreadName=org.eclipse.jdt.internal.ui.text.JavaReconciler(00035EA4) Status=Waiting Monitor=01A9B3E8 (Object monitor for org/eclipse/jface/text/reconciler/DirtyRegi onQueue @ 07DAA000) Count=0 Owner=(00000000) In java/lang/Object.wait(JI)V In java/lang/Object.wait(J)V In org/eclipse/jface/text/reconciler/AbstractReconciler$BackgroundThread .run()V ThreadName=Worker-37(00036144) Status=Waiting Monitor=019E80B0 (Object monitor for org/eclipse/core/internal/jobs/WorkerPool @ 00BA6310) Count=0 Owner=(00000000) In java/lang/Object.wait(JI)V In java/lang/Object.wait(J)V In org/eclipse/core/internal/jobs/WorkerPool.sleep(J)V In org/eclipse/core/internal/jobs/WorkerPool.startJob(Lorg/eclipse/core/ internal/jobs/Worker;)Lorg/eclipse/core/internal/jobs/InternalJob; In org/eclipse/core/internal/jobs/Worker.run()V ThreadName=org.eclipse.jdt.internal.ui.text.JavaReconciler(0003633C) Status=Waiting Monitor=01A9B4A8 (Object monitor for org/eclipse/jface/text/reconciler/DirtyRegi onQueue @ 0748E494) Count=0 Owner=(00000000) In java/lang/Object.wait(JI)V In java/lang/Object.wait(J)V In org/eclipse/jface/text/reconciler/AbstractReconciler$BackgroundThread .run()V ThreadName=Worker-38(00036048) Status=Waiting Monitor=019E80B0 (Object monitor for org/eclipse/core/internal/jobs/WorkerPool @ 00BA6310) Count=0 Owner=(00000000) In java/lang/Object.wait(JI)V In java/lang/Object.wait(J)V In org/eclipse/core/internal/jobs/WorkerPool.sleep(J)V In org/eclipse/core/internal/jobs/WorkerPool.startJob(Lorg/eclipse/core/ internal/jobs/Worker;)Lorg/eclipse/core/internal/jobs/InternalJob; In org/eclipse/core/internal/jobs/Worker.run()V ThreadName=Worker-39(00036294) Status=Waiting Monitor=019E8170 (Object monitor for java/lang/Object @ 00E33630) Count=0 Owner=(00000000) In java/lang/Object.wait(JI)V In java/lang/Object.wait()V In org/eclipse/jdt/internal/ui/javaeditor/ASTProvider.getAST(Lorg/eclips e/jdt/core/IJavaElement;ZLorg/eclipse/core/runtime/IProgressMonitor;)Lorg/eclips e/jdt/core/dom/CompilationUnit; In org/eclipse/jdt/internal/ui/viewsupport/SelectionListenerWithASTManag er$PartListenerGroup.calculateASTandInform(Lorg/eclipse/jdt/core/IJavaElement;Lo rg/eclipse/jface/text/ITextSelection;Lorg/eclipse/core/runtime/IProgressMonitor; )Lorg/eclipse/core/runtime/IStatus; In org/eclipse/jdt/internal/ui/viewsupport/SelectionListenerWithASTManag er$1.run(Lorg/eclipse/core/runtime/IProgressMonitor;)Lorg/eclipse/core/runtime/I Status; In org/eclipse/core/internal/jobs/Worker.run()V ThreadName=org.eclipse.jdt.internal.ui.text.JavaReconciler(00036240) Status=Waiting Monitor=019E7A50 (System monitor) Count=0 Owner=(00000000) In java/lang/Object.wait(JI)V In java/lang/Object.wait(J)V In org/eclipse/jface/text/reconciler/AbstractReconciler$BackgroundThread .run()V ThreadName=Worker-40(000360F0) Status=Waiting Monitor=019E80B0 (Object monitor for org/eclipse/core/internal/jobs/WorkerPool @ 00BA6310) Count=0 Owner=(00000000) In java/lang/Object.wait(JI)V In java/lang/Object.wait(J)V In org/eclipse/core/internal/jobs/WorkerPool.sleep(J)V In org/eclipse/core/internal/jobs/WorkerPool.startJob(Lorg/eclipse/core/ internal/jobs/Worker;)Lorg/eclipse/core/internal/jobs/InternalJob; In org/eclipse/core/internal/jobs/Worker.run()V ThreadName=Worker-41(00036390) Status=Waiting Monitor=019E80B0 (Object monitor for org/eclipse/core/internal/jobs/WorkerPool @ 00BA6310) Count=0 Owner=(00000000) In java/lang/Object.wait(JI)V In java/lang/Object.wait(J)V In org/eclipse/core/internal/jobs/WorkerPool.sleep(J)V In org/eclipse/core/internal/jobs/WorkerPool.startJob(Lorg/eclipse/core/ internal/jobs/Worker;)Lorg/eclipse/core/internal/jobs/InternalJob; In org/eclipse/core/internal/jobs/Worker.run()V
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ASTProvider.java
if (fAST == null)
			return;
		
		if (DEBUG)
			System.out.println(DEBUG_PREFIX + "disposing AST: " + toString(fAST)); 
		
		fAST.setProperty(AST_DISPOSED, Boolean.TRUE);
		fAST= null;
		
		cache(null, null);
	}
	/**
	 * Returns a string for the given Java element used for debugging.
	 * 
	 * @param javaElement the compilation unit AST
	 * @return a string used for debugging
	 */
	private String toString(IJavaElement javaElement) {
		if (javaElement == null)
			return "null"; 
		else
			return javaElement.getElementName();
		
	}
	
	/**
	 * Returns a string for the given AST used for debugging.
	 * 
	 * @param ast the compilation unit AST