Bug 449780 - [jdt] NPE in ExternalPackageFragmentRoot.hashCode
Summary: [jdt] NPE in ExternalPackageFragmentRoot.hashCode
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.5   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.5 M5   Edit
Assignee: Ed Merks CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 396854 449781 451686 452174 452175 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-11-03 09:24 EST by EPP Error Reports CLA
Modified: 2015-01-28 04:58 EST (History)
5 users (show)

See Also:
jarthana: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description EPP Error Reports CLA 2014-11-03 09:24:41 EST
Hello committers,

we received a new error report for Eclipse 4.5.0.I20140918-0330.


General Information:
    anonymous-id:         3a3d0762-ad74-4186-b91f-c6f76b0015b4
    eclipse-build-id:     4.5.0.I20140918-0330
    eclipse-product:      org.eclipse.epp.package.committers.product
    operating system:     Windows7 6.1.0 (x86_64) - win32
    java-runtime-version: 1.7.0_67-b01

The following plug-ins were present on the execution stack (*):
    1. org.eclipse.core.jobs_3.6.100.v20140821-1523
    2. org.eclipse.core.resources_3.9.100.v20140825-0955
    3. org.eclipse.core.runtime_3.10.0.v20140724-1132
    4. org.eclipse.egit.core_3.5.1.201410131835-r
    5. org.eclipse.egit_3.5.1.201410131835-r
    6. org.eclipse.jdt.core_3.11.0.v20140917-1904
    7. org.eclipse.jdt_3.11.0.v20140918-0330


Error Status:

    code:                   2
    plugin:                 org.eclipse.core.resources_3.9.100.v20140825-0955
    message:                Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
    fingerprint:            03cde73a
    exception class:        java.lang.NullPointerException
    exception message:      -
    number of children:     0
    
    java.lang.NullPointerException: null
    at org.eclipse.jdt.internal.core.ExternalPackageFragmentRoot.hashCode(ExternalPackageFragmentRoot.java:99)
    at java.util.Hashtable.hash(Hashtable.java:239)
    at java.util.Hashtable.get(Hashtable.java:434)
    at org.eclipse.jdt.internal.core.util.LRUCache.peek(LRUCache.java:482)
    at org.eclipse.jdt.internal.core.JavaModelCache.peekAtInfo(JavaModelCache.java:189)
    at org.eclipse.jdt.internal.core.JavaModelManager.removeInfoAndChildren(JavaModelManager.java:3890)
    at org.eclipse.jdt.internal.core.JavaElement.close(JavaElement.java:124)
    at org.eclipse.jdt.internal.core.ClasspathChange.addClasspathDeltas(ClasspathChange.java:64)
    at org.eclipse.jdt.internal.core.ClasspathChange.generateDelta(ClasspathChange.java:355)
    at org.eclipse.jdt.internal.core.DeltaProcessor.resourceChanged(DeltaProcessor.java:2065)
    at org.eclipse.jdt.internal.core.DeltaProcessingState.resourceChanged(DeltaProcessingState.java:477)
    at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:294)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:286)
    at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:150)
    at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:376)
    at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:1496)
    at org.eclipse.core.internal.resources.Resource.refreshLocal(Resource.java:1718)
    at org.eclipse.egit.core.op.ConnectProviderOperation.execute(ConnectProviderOperation.java:156)
    at org.eclipse.egit.core.internal.job.JobUtil$1.run(JobUtil.java:53)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
   

    

Messages, stacktraces, and nested status objects may be shortened. Please visit 
http://dev.eclipse.org/recommenders/committers/confess/0.5/reports/-
for the complete error log.


Some general information and guidelines about how to use this bug report:

1. Feel free to move this bug to your own product and components. Please note
   that this bug is only accessible to Eclipse committers. If you move this bug
   please make sure that it's still in the "Security Advisor" group.

2. The bug contents of the fields status, resolution, keywords, and whitelist
   are presented to reporters. If you needs more information, please set the
   keyword "needinfo". This will trigger a specialized dialog asking the user
   to provide further details.

3. Use the following resolutions for the following situations:
   * CLOSED / FIXED: This bug has been fixed. Please provide additional
     information in the whiteboard field.
   * CLOSED / WORKSFORME: Use this resolution if you can't reproduce this issue
     and request further information. Please use the whiteboard text to specify
     more details what a user should provide and how.
   * CLOSED / INVALID: Use this resolution if the reported problem is a
     'user-configuration' problem. Please consider giving hints how to fix
     these issues in the whiteboard field.
   * CLOSED / NOT ECLIPSE: Use this if the problem is caused by another plugin
     not developed at Eclipse.org
   * CLOSED / MOVED: If this bug has been moved else where. Please provide more 
     information (e.g. a link) in the whiteboard field.

4. Please remember that only committers can view and comment on this bug. You
   may, however, manually add the reporting user to the bug's cc list. But keep
   in mind that the report may contains sensitive information.

5. If you are missing a feature, please file a enhancement request here:
   https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Recommenders.Incubator&component=Stacktraces
    
 

Thank you for your assistance.
Your friendly error-reports-inbox.


--
* Note: The list of present bundles and their respective versions was
  calculated by package naming heuristics. This may or may not reflect reality.
Comment 1 EPP Error Reports CLA 2014-11-03 09:24:42 EST
I've looked up the (to date) top-3 most similar bug groups and listed the 
closest bug of each group below. This report may or may not be duplicate of
those (low or similar scores for all entries may indicate that this hasn't
been reported yet):

>     1. Bug 449248: [any] Problems occurred when invoking code from plug-in: "org.eclipse.core.resources". – 0,9    
>     2. Bug 449737: [any] Exception while initializing all containers – 0,8    
>     3. Bug 447834: [any] Problems occurred when invoking code from plug-in: "org.eclipse.jdt.core". – 0,7    


If this report actually is a duplicate of those, please mark it as such. This
information helps me to improve the recommendations further for the next issue.

Thank you for your assistance.
Your friendly error-reports-inbox.
Comment 2 EPP Error Reports CLA 2014-11-03 09:24:54 EST
*** Bug 449781 has been marked as a duplicate of this bug. ***
Comment 3 EPP Error Reports CLA 2014-11-15 11:59:39 EST
*** Bug 451686 has been marked as a duplicate of this bug. ***
Comment 4 Ed Willink CLA 2014-11-15 12:06:56 EST
(In reply to Error Reports from comment #3)
> *** Bug 451686 has been marked as a duplicate of this bug. ***

This was actually the second report from a JUnit plugin test, but only one got filed.

The first report had only the standin trace for the observation that .org.eclipse.jdt.core.external.folders already exists.

Using a debugger I got the trace below which suggests that the repoen requested by Bug 289215#c6 may be due

		Thread [Worker-6] (Suspended (breakpoint at line 319 in Resource))	
			Project(Resource).checkDoesNotExist(int, boolean) line: 319	
			Project(Resource).checkDoesNotExist() line: 307	
			Project.assertCreateRequirements(IProjectDescription) line: 52	
			Project.create(IProjectDescription, int, IProgressMonitor) line: 290	
			ExternalFoldersManager.createExternalFoldersProject(IProject, IProgressMonitor) line: 318	
			ExternalFoldersManager.createExternalFoldersProject(IProgressMonitor) line: 260	
			ExternalFoldersManager.createLinkFolder(IPath, boolean, IProgressMonitor) line: 166	
			ExternalFolderChange.updateExternalFoldersIfNecessary(boolean, IProgressMonitor) line: 49	
			SetContainerOperation(ChangeClasspathOperation).classpathChanged(ClasspathChange, boolean) line: 62	
			SetContainerOperation.executeOperation() line: 110	
			SetContainerOperation(JavaModelOperation).run(IProgressMonitor) line: 729	
			Workspace.run(IWorkspaceRunnable, ISchedulingRule, int, IProgressMonitor) line: 2313	
			SetContainerOperation(JavaModelOperation).runOperation(IProgressMonitor) line: 794	
			JavaCore.setClasspathContainer(IPath, IJavaProject[], IClasspathContainer[], IProgressMonitor) line: 5435	
			JREContainerInitializer.initialize(IPath, IJavaProject[]) line: 108	
			LaunchingPlugin$VMChanges.rebind(IProgressMonitor, IJavaProject[]) line: 360	
			LaunchingPlugin$VMChanges.access$0(LaunchingPlugin$VMChanges, IProgressMonitor, IJavaProject[]) line: 294	
			LaunchingPlugin$VMChanges$1.run(IProgressMonitor) line: 280	
			BatchOperation.executeOperation() line: 39	
			BatchOperation(JavaModelOperation).run(IProgressMonitor) line: 729	
			Workspace.run(IWorkspaceRunnable, ISchedulingRule, int, IProgressMonitor) line: 2313	
			JavaCore.run(IWorkspaceRunnable, ISchedulingRule, IProgressMonitor) line: 5365	
			LaunchingPlugin$VMChanges.doit(IProgressMonitor) line: 284	
			LaunchingPlugin$JREUpdateJob.run(IProgressMonitor) line: 381	
			Worker.run() line: 55
Comment 5 Ed Willink CLA 2014-11-15 12:10:52 EST
Examination of the duplicates will show that JDT is the common factor, and it's JDT that NPE's.
Comment 6 Marcel Bruch CLA 2014-11-15 13:50:35 EST
Moving to JDT team for review.
Comment 7 Jay Arthanareeswaran CLA 2014-11-16 23:40:45 EST
(In reply to Ed Willink from comment #4)
> The first report had only the standin trace for the observation that
> .org.eclipse.jdt.core.external.folders already exists.
> 
> Using a debugger I got the trace below which suggests that the repoen
> requested by Bug 289215#c6 may be due


Thanks for that info. This may or may not be relevant to the issue reported here. Any additional information you can provide, like steps to reproduce esp. would be very handy. Thanks!
Comment 8 Ed Willink CLA 2014-11-17 05:07:09 EST
(In reply to Jayaprakash Arthanareeswaran from comment #7)
> Thanks for that info. This may or may not be relevant to the issue reported
> here. Any additional information you can provide, like steps to reproduce
> esp. would be very handy. Thanks!

The Eclipse OCL JUnit Xtext plugin tests provide a solid repro.

Probably easiest to just install all features from

http://www.eclipse.org/modeling/download.php?file=/modeling/mdt/ocl/downloads/drops/5.1.0/S201411101552/mdt-ocl-Update-5.1.0M3.zip

allowing other bits to be resolved from http://download.eclipse.org/releases/mars.

Import the org.eclipse.ocl.examples.xtext.tests plugin as source then run

org.eclipse.ocl.examples.test.xtext.CompletionProposalTests

as a JUnit plugin test. The test doesn't run properly but

!MESSAGE Resource '/.org.eclipse.jdt.core.external.folders' already exists.

appears on the console.

To get the message reported by Code Recommenders as part of a green test you need to check org.eclipse.ocl.examples.xtext.tests out from GIT and run all, or just the org.eclipse.ocl.examples.test.xtext.CompletionProposalTests sub-test, of the org.eclipse.ocl.examples.xtext.tests (plugin) launch.
Comment 9 EPP Error Reports CLA 2014-11-18 14:59:27 EST
*** Bug 452174 has been marked as a duplicate of this bug. ***
Comment 10 EPP Error Reports CLA 2014-11-18 14:59:27 EST
*** Bug 452175 has been marked as a duplicate of this bug. ***
Comment 11 Ed Merks CLA 2014-11-22 08:25:24 EST
I believe this to be a duplicate of 

https://bugs.eclipse.org/bugs/show_bug.cgi?id=396854

I've committed a fix for that bug for Gerrit review:

https://git.eclipse.org/r/36879
Comment 12 Jay Arthanareeswaran CLA 2014-11-26 03:03:08 EST
Thanks for the patch, Ed. I will take a look at this for M4.
Comment 13 Jay Arthanareeswaran CLA 2014-12-08 23:07:40 EST
I have reviewed the patch posted on bug 396854. Sorry missed out for M4, will release the change early M5.
Comment 14 Ed Willink CLA 2014-12-26 12:34:35 EST
(In reply to Jay On Vacation till Jan 5 2015 from comment #13)
> I have reviewed the patch posted on bug 396854. Sorry missed out for M4,
> will release the change early M5.

Any plans? still giving trouble in
 	
org.eclipse.jdt.core_3.11.0.v20141223-0919.jar
Comment 15 Jay Arthanareeswaran CLA 2015-01-06 09:35:38 EST
Released in master:

http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=8d4c1d1ffccad45ec9a12888c6b55b8b6baaa0c5

Thanks for the patch, Ed!
Comment 16 Jay Arthanareeswaran CLA 2015-01-06 09:36:12 EST
*** Bug 396854 has been marked as a duplicate of this bug. ***
Comment 17 Sasikanth Bharadwaj CLA 2015-01-28 04:58:01 EST
Verified for 4.5 M5 using I20150127-0900 build (by running the junit test according to steps mentioned comment8)