Bug 106740 - [Content Assist] Null pointer exception
Summary: [Content Assist] Null pointer exception
Status: RESOLVED DUPLICATE of bug 103994
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-11 09:18 EDT by Jerome JADOULLE CLA
Modified: 2005-08-12 04:24 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jerome JADOULLE CLA 2005-08-11 09:18:59 EDT
When using eclipse 3.1 on a project where I use the java 1.5 syntax, i
encountered a very annoying problem with the content assist: it crashes each
time I call it and produces an exception (nullPointerException).

If i close the project and try the content assist on another project, it works
fine.  It seems that the content assist crashes while "reading" my code in order
to be able to produce its assist window.

Note that there are no compilation error in the project.

the logFile outputs the following text:

!ENTRY org.eclipse.ui 4 4 2005-08-11 11:50:28.660
!MESSAGE Unhandled event loop exception

!ENTRY org.eclipse.ui 4 0 2005-08-11 11:50:28.660
!MESSAGE java.lang.NullPointerException
!STACK 0
java.lang.NullPointerException
	at
org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.implementsInterface(ReferenceBinding.java:681)
	at
org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.isCompatibleWith(ReferenceBinding.java:766)
	at
org.eclipse.jdt.internal.compiler.lookup.TypeVariableBinding.boundCheck(TypeVariableBinding.java:135)
	at
org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.boundCheck(ParameterizedTypeBinding.java:58)
	at
org.eclipse.jdt.internal.compiler.ast.ParameterizedSingleTypeReference.checkBounds(ParameterizedSingleTypeReference.java:40)
	at
org.eclipse.jdt.internal.compiler.lookup.ClassScope.checkParameterizedTypeBounds(ClassScope.java:707)
	at
org.eclipse.jdt.internal.compiler.lookup.ClassScope.connectTypeHierarchy(ClassScope.java:935)
	at
org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.connectTypeHierarchy(CompilationUnitScope.java:254)
	at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.completeTypeBindings(LookupEnvironment.java:249)
	at org.eclipse.jdt.internal.codeassist.impl.Engine.accept(Engine.java:92)
	at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:131)
	at
org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:178)
	at org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage(Scope.java:2392)
	at org.eclipse.jdt.internal.compiler.lookup.Scope.getType(Scope.java:2137)
	at
org.eclipse.jdt.internal.compiler.ast.SingleTypeReference.getTypeBinding(SingleTypeReference.java:39)
	at
org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:141)
	at
org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveTypeArgument(TypeReference.java:158)
	at
org.eclipse.jdt.internal.compiler.ast.ParameterizedSingleTypeReference.internalResolveType(ParameterizedSingleTypeReference.java:132)
	at
org.eclipse.jdt.internal.compiler.ast.ParameterizedSingleTypeReference.resolveType(ParameterizedSingleTypeReference.java:217)
	at
org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveSuperType(TypeReference.java:104)
	at
org.eclipse.jdt.internal.compiler.lookup.ClassScope.findSupertype(ClassScope.java:1088)
	at
org.eclipse.jdt.internal.compiler.lookup.ClassScope.connectSuperInterfaces(ClassScope.java:837)
	at
org.eclipse.jdt.internal.compiler.lookup.ClassScope.connectTypeHierarchy(ClassScope.java:928)
	at
org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.connectTypeHierarchy(CompilationUnitScope.java:254)
	at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.completeTypeBindings(LookupEnvironment.java:249)
	at
org.eclipse.jdt.internal.codeassist.SelectionEngine.select(SelectionEngine.java:660)
	at org.eclipse.jdt.internal.core.Openable.codeSelect(Openable.java:165)
	at
org.eclipse.jdt.internal.core.CompilationUnit.codeSelect(CompilationUnit.java:314)
	at
org.eclipse.jdt.internal.core.CompilationUnit.codeSelect(CompilationUnit.java:308)
	at
org.eclipse.jdt.internal.ui.javaeditor.JavaElementHyperlinkDetector.detectHyperlinks(JavaElementHyperlinkDetector.java:73)
	at
org.eclipse.jface.text.hyperlink.HyperlinkManager.findHyperlinks(HyperlinkManager.java:232)
	at
org.eclipse.jface.text.hyperlink.HyperlinkManager.mouseMove(HyperlinkManager.java:419)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:145)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
	at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
	at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
	at org.eclipse.core.launcher.Main.run(Main.java:973)
	at org.eclipse.core.launcher.Main.main(Main.java:948)

also note that, even after cleaning the project, rebuilding, shutting the
computer down,... the problem stays the same BUT IS LIMITED TO a specific
project, where I use Java 1.5 syntax (generics,...).

Finally, note that I am also using Java 1.5 syntax for other projects but no
problem is found...
Comment 1 Dirk Baeumer CLA 2005-08-11 10:40:48 EDT
Moving to JDT/Core since the NPE happens in the compiler.

Jerome, can you provide any test case to reproduce the problem. May be the
project you see the problem in if it isn't to big.
Comment 2 Olivier Thomann CLA 2005-08-11 12:10:39 EDT
Look like a dup of bug 103994.
Please try a 3.1 maintenance build to see if your problem is fixed.
Comment 3 Olivier Thomann CLA 2005-08-11 18:13:36 EDT
Closing as duplicate of bug 103994.
Please reopen if you get it again with an 3.1 maintenance build.

*** This bug has been marked as a duplicate of 103994 ***
Comment 4 Jerome JADOULLE CLA 2005-08-12 04:24:10 EDT
tried maintenance build from 2005/08/11 and system works fine.
Thanks