Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 346221

Summary: Potential NPE in EClassifierInfos#getSuperTypeInfos()
Product: [Modeling] TMF Reporter: Karsten Thoms <karsten.thoms>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: milesparker, sebastian.zarnekow
Version: 2.0.0Flags: sebastian.zarnekow: indigo+
Target Milestone: RC2   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
Screenshot: Debugger none

Description Karsten Thoms CLA 2011-05-18 07:28:00 EDT
Created attachment 195951 [details]
Screenshot: Debugger

I'm working with the Domainmodel Example, latest nightly build and hitting a NPE in the mentioned method, line 202:

if (isPackageKnown(superType.getEPackage().getNsURI())) {

In this case 'superType' is a proxy:
org.eclipse.emf.ecore.impl.EClassImpl@5f67bcdd (eProxyURI: archive:file:/Users/thoms/Development/Eclipse/eclipse-SDK-3.7M6/plugins/org.eclipse.emf.mwe2.language_2.0.0.v201103251505.jar!/../org.eclipse.xtext.common.types/model/JavaVMTypes.ecore#//JvmIdentifiableElement)


========= STACKTRACE =========
Thread [Worker-4] (Suspended (exception NullPointerException))	
	EClassifierInfos.getSuperTypeInfos(EClassInfo) line: 202	
	TypeHierarchyHelper.collectTypeData() line: 59	
	TypeHierarchyHelper.<init>(Grammar, EClassifierInfos, ErrorAcceptor) line: 46	
	Xtext2EcoreTransformer.normalizeAndValidateGeneratedPackages() line: 584	
	Xtext2EcoreTransformer.transform() line: 145	
	XtextLinker.linkModel(EObject, IDiagnosticConsumer) line: 218	
	LazyLinkingResource(XtextResource).doLinking() line: 249	
	LazyLinkingResource.doLinking() line: 76	
	LazyLinkingResource(XtextResource).updateInternalState(IParseResult) line: 217	
	LazyLinkingResource(XtextResource).doLoad(InputStream, Map<?,?>) line: 152	
	LazyLinkingResource.doLoad(InputStream, Map<?,?>) line: 69	
	LazyLinkingResource(ResourceImpl).load(InputStream, Map<?,?>) line: 1497	
	LazyLinkingResource(ResourceImpl).load(Map<?,?>) line: 1285	
	XtextResourceSet(ResourceSetImpl).demandLoad(Resource) line: 255	
	XtextResourceSet(ResourceSetImpl).demandLoadHelper(Resource) line: 270	
	XtextResourceSet(ResourceSetImpl).getResource(URI, boolean) line: 397	
	ClusteringBuilderState.writeNewResourceDescriptions(BuildData, IResourceDescriptions, CurrentDescriptions, IProgressMonitor) line: 238	
	ClusteringBuilderState.doUpdate(BuildData, ResourceDescriptionsData, IProgressMonitor) line: 93	
	ClusteringBuilderState(AbstractBuilderState).update(BuildData, IProgressMonitor) line: 107	
	XtextBuilder.doBuild(ToBeBuilt, IProgressMonitor, IXtextBuilderParticipant$BuildType) line: 158	
	XtextBuilder.fullBuild(IProgressMonitor, boolean) line: 182	
	XtextBuilder.build(int, Map, IProgressMonitor) line: 85	
	BuildManager$2.run() line: 717	
	SafeRunner.run(ISafeRunnable) line: 42	
	BuildManager.basicBuild(int, IncrementalProjectBuilder, Map<String,String>, MultiStatus, IProgressMonitor) line: 191	
	BuildManager.basicBuild(IBuildConfiguration, int, String, Map<String,String>, IProgressMonitor) line: 310	
	BuildManager.build(IBuildConfiguration, int, String, Map<String,String>, IProgressMonitor) line: 385	
	Project$1.run(IProgressMonitor) line: 618	
	Workspace.run(IWorkspaceRunnable, ISchedulingRule, int, IProgressMonitor) line: 2310	
	Project.internalBuild(IBuildConfiguration, int, String, Map<String,String>, IProgressMonitor) line: 597	
	Project.build(int, String, Map<String,String>, IProgressMonitor) line: 124	
	BuildScheduler$BuildJob.run(IProgressMonitor) line: 101	
	Worker.run() line: 54
Comment 1 Sebastian Zarnekow CLA 2011-05-18 08:17:36 EDT
This could indicate a problem with the configuration of our sample projects.
Comment 2 Sebastian Zarnekow CLA 2011-05-19 05:40:23 EDT
Pushed to master. Will verify after the next nightly if there remain other problems with the samples.
Comment 3 Sebastian Zarnekow CLA 2011-05-26 06:41:42 EDT
*** Bug 347233 has been marked as a duplicate of this bug. ***
Comment 4 Karsten Thoms CLA 2017-09-19 17:57:07 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 5 Karsten Thoms CLA 2017-09-19 18:07:54 EDT
Closing all bugs that were set to RESOLVED before Neon.0