Bug 33900 - NPE setting output directory of a source folder
Summary: NPE setting output directory of a source folder
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: Other Linux-GTK
: P3 major (vote)
Target Milestone: 2.1 RC3   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-05 15:10 EST by Jared Burns CLA
Modified: 2003-05-08 16:04 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jared Burns CLA 2003-03-05 15:10:45 EST
Build 20030304

My steps:
1. Check the org.eclipse.ui.externaltools project out of CVS
2. Project->Properties->Java Build Path
3. Check "Allow output folders per source folder"
4. Expand the "Ant Runner Support" folder and click Edit on the output dir.
5. Enter "lib/bin" as the new output folder.
6. Click OK.
7. A build runs and the following NPE occurs. Every time I rebuild the
project I get the same NPE.

!SESSION Mar 05, 2003 14:01:42.440 ---------------------------------------------
java.fullversion=J2RE 1.3.1 IBM build cxia32131-20020410 (JIT enabled: jitc)
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Command-line arguments: -os linux -ws gtk -arch x86 -debug -dev bin -data /home/jburns/target -install file:/home/jburns/host/eclipse/
!ENTRY org.eclipse.core.resources 4 2 Mar 05, 2003 14:01:42.440
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
!STACK 0
java.lang.NullPointerException
	at org.eclipse.jdt.internal.core.builder.NameEnvironment.setNames(NameEnvironment.java(Compiled Code))
	at org.eclipse.jdt.internal.core.builder.NameEnvironment.<init>(NameEnvironment.java:38)
	at org.eclipse.jdt.internal.core.builder.JavaBuilder.initializeBuilder(JavaBuilder.java:435)
	at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:113)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:424)
	at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java(Compiled Code))
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java(Compiled Code))
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java(Compiled Code))
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java(Compiled Code))
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java(Compiled Code))
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:151)
	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.core.internal.events.BuildManager.basicBuild(BuildManager.java:165)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:243)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:212)
	at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java(Compiled Code))
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1596)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:79)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:296)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246)
	at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:351)
	at org.eclipse.jdt.internal.ui.preferences.BuildPathsPropertyPage.performOk(BuildPathsPropertyPage.java:153)
	at org.eclipse.jface.preference.PreferenceDialog.okPressed(PreferenceDialog.java:672)
	at org.eclipse.jface.preference.PreferenceDialog.buttonPressed(PreferenceDialog.java:219)
	at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java(Compiled Code))
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java(Compiled Code))
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java(Compiled Code))
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java(Compiled Code))
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java(Compiled Code))
	at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code))
	at org.eclipse.jface.window.Window.open(Window.java:557)
	at org.eclipse.ui.dialogs.PropertyDialogAction.run(PropertyDialogAction.java:158)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:842)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:456)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(ActionContributionItem.java:403)
	at org.eclipse.jface.action.ActionContributionItem.access$0(ActionContributionItem.java:397)
	at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(ActionContributionItem.java:72)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java(Compiled Code))
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java(Compiled Code))
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java(Compiled Code))
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java(Compiled Code))
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java(Compiled Code))
	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)
Comment 1 Kent Johnson CLA 2003-03-05 16:04:06 EST
I tried to reproduce but it worked fine for me.

Jared: Can you try this again with the jit disabled please?
Comment 2 Jared Burns CLA 2003-03-05 16:52:39 EST
Disabling the JIT via -classic got rid of the problem. Wow?
Comment 3 Jared Burns CLA 2003-03-05 18:24:54 EST
Kent, we have a situation where we want to use a different output directory
for certain source folders. We want to do this for 2.1. The fact that you
thought to disable JIT on this one makes me think that you've seen this
problem before?

I've noticed that I don't get this problem if I run Eclipse on JDK 1.4.1. Is
this the result of a VM bug?

If we can't use different output directories, we have to use black
classloader magic. So what I really want to know is whether or not this
problem is fixable. Can you advise?
Comment 4 Jeff McAffer CLA 2003-03-05 20:43:05 EST
As a point of interest, what VM are you using? The timestamp looks like SR1 but 
I don't have all the dates in my head.  Please try on SR2 and report.  That is 
the officially approved IBM VM for Eclipse so it would be interesting to know 
what the behaviour is.
Comment 5 Philipe Mulet CLA 2003-03-06 06:12:07 EST
Multiple output folders are legite in 2.1. The only problem here is a VM 
problem, which has nothing to do with JDT/Core.

We cannot workaround a JIT bug throwing NPE at random points...

Jared - can you see if you reproduce the problem on SR2 ? If so, you should 
ping Hursley with this testcase.
Comment 6 Jared Burns CLA 2003-03-06 10:55:40 EST
I don't get the problem on the IBM 1.3.1 build from 20021102.
Comment 7 Jeff McAffer CLA 2003-03-06 11:13:11 EST
For IBM 1.3.1 VM the VM timestamps are:

linux 
SR2 = 20020622
SR3 = 20021102

Windows
SR2 = 20020710
SR3 = 20021102

SR2 is the one with which we should be testing.  Please try your case on that 
VM and report.
Comment 8 Philipe Mulet CLA 2003-03-07 06:26:43 EST
Closing as a VM bug.