Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-dev] Problems running JUnit tests for nightly build N20030304


Here's my take on this.

Line 35 of WorkbenchProject is the following (this hasn't changed in eons):
String[] natureIds = project.getDescription().getNatureIds();

The project var cannot be null or it wouldn't have gotten this far, since there's an project.isOpen() check earlier.
Project.getDescription() never returns null, but even if it could, the stack indicates that the NPE occurred in the next stack frame anyway (although I gather the JIT can confuse the picture here).
ProjectDescription.getNatureIds() never returns null, but even if it could, that would not cause an NPE on this line.
So the NPE must be in Project.getDescription().  Here's its source:

public IProjectDescription getDescription() throws CoreException {
        ResourceInfo info = getResourceInfo(false, false);
        checkAccessible(getFlags(info));
        return (IProjectDescription) ((ProjectInfo) info).getDescription().clone();
}

The NPE could not have occurred in getResourceInfo() since this worked earlier for the isOpen check.
getResourceInfo can return null if the resource is missing (which it's not since isOpen() returned true).
getFlags handles this, but checkAccessible throws a ResourceException if the flags indicate that the info was null.
So it must be ProjectInfo.getDescription() that's returning null.  That is its initial state in ProjecInfo, but that's not the normal state for an open project.

A quick search through the code didn't show any obvious cases where this could happen.
I'll need some Core team help to investigate this further.  Since this came in on an asyncExec, it's possible that there's some concurrent modification going on.

Nick



Darin Wright/Ottawa/IBM@IBMCA
Sent by: eclipse-dev-admin@xxxxxxxxxxx

03/04/03 09:48 AM
Please respond to eclipse-dev

       
        To:        eclipse-dev@xxxxxxxxxxx
        cc:        
        Subject:        Re: [eclipse-dev] Problems running JUnit tests for nightly build N20030304




I believe the last entry in the log is causing the dialog to appear - but
the NPE is coming from the workbench code. The other exceptions in the log
appear as handled exceptions.

!ENTRY org.eclipse.jface 4 2 Mar 04, 2003 01:42:07.641
!MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.jface".
!STACK 0
java.lang.NullPointerException

at
at

org.eclipse.ui.internal.model.WorkbenchProject.getBaseImage(WorkbenchProject.java:35)
at

org.eclipse.ui.internal.model.WorkbenchResource.getImageDescriptor(WorkbenchResource.java:29)
at

org.eclipse.ui.model.WorkbenchLabelProvider.getImage(WorkbenchLabelProvider.java:116)
at

org.eclipse.jface.viewers.DecoratingLabelProvider.getImage(DecoratingLabelProvider.java(Compiled

Code))
at

org.eclipse.jface.viewers.TreeViewer.doUpdateItem(TreeViewer.java(Compiled
Code))

at
org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java(Compiled

Code))
at

org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java(Compiled

Code))
at

org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java(Compiled

Code))
at

org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java(Compiled

Code))
at

org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:119)
at org.eclipse.core.runtime.Platform.run(Platform.java(Compiled

Code))
at org.eclipse.core.runtime.Platform.run(Platform.java(Compiled

Code))
at

org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:1271)
at

org.eclipse.jface.viewers.StructuredViewer.update(StructuredViewer.java:1253)
at

org.eclipse.jface.viewers.StructuredViewer.update(StructuredViewer.java:1187)
at

org.eclipse.jface.viewers.StructuredViewer.handleLabelProviderChanged(StructuredViewer.java:638)
at

org.eclipse.jface.viewers.ContentViewer$1.labelProviderChanged(ContentViewer.java:68)
at

org.eclipse.ui.internal.decorators.DecorationScheduler$1.run(DecorationScheduler.java(Compiled

Code))
at

org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java(Compiled

Code))
at

org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java(Compiled

Code))
at

org.eclipse.swt.widgets.Display.readAndDispatch(Display.java(Compiled
Code))

at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java(Compiled
Code))

at
org.eclipse.jdt.debug.tests.AutomatedSuite.run(AutomatedSuite.java(Compiled
Code))

at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:307)
at

org.eclipse.test.EclipseTestRunner.main(EclipseTestRunner.java:186)
at

org.eclipse.test.UITestApplication.runTests(UITestApplication.java:39)
at

org.eclipse.test.UITestApplication.runEventLoop(UITestApplication.java:33)
at org.eclipse.ui.internal.Workbench.run(Workbench.java:1251)
at

org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:845)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
at java.lang.reflect.Method.invoke(Native Method)
at org.eclipse.core.launcher.Main.basicRun(Main.java:247)
at org.eclipse.core.launcher.Main.run(Main.java:703)
at org.eclipse.core.launcher.Main.main(Main.java:539)


Darin



|---------+----------------------------->
|         |           Sonia             |
|         |           Dimitrov/Ottawa/IB|
|         |           M@IBMCA           |
|         |           Sent by:          |
|         |           eclipse-dev-admin@|
|         |           eclipse.org       |
|         |                             |
|         |                             |
|         |           03/04/2003 08:29  |
|         |           AM                |
|         |           Please respond to |
|         |           eclipse-dev       |
|         |                             |
|---------+----------------------------->

>---------------------------------------------------------------------------------------------------------------------------------------------|
|                                                                                                                                             |
|       To:       eclipse-dev@xxxxxxxxxxx                                                                                                     |
|       cc:                                                                                                                                   |
|       Subject:  [eclipse-dev] Problems running JUnit tests for nightly build N20030304                                                      |
|                                                                                                                                             |
>---------------------------------------------------------------------------------------------------------------------------------------------|






A dialog was opened on our Windows test machine during the jdt debug tests
for the nightly build N20030304:

(Embedded image moved to file: pic10251.gif)

.log  attached.




Test results should be available in the next hour.

Sonia
(See attached file: .log)





#### pic10251.gif has been removed from this note on March 04, 2003 by Nick Edgar
#### .log has been removed from this note on March 04, 2003 by Nick Edgar


Back to the top