Bug 1031 - NullPointerException during creation of "HelloWorld ANSI C Autotools Project"
Summary: NullPointerException during creation of "HelloWorld ANSI C Autotools Project"
Status: RESOLVED FIXED
Alias: None
Product: Eclipse Plugin
Classification: Yocto Project Subprojects
Component: eclipse-plugin (show other bugs)
Version: 1.0
Hardware: mpc8315e-rdb ppc
: Medium normal
Target Milestone: 1.1
Assignee: Jessica
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2011-05-11 02:23 UTC by Leon Woestenberg
Modified: 2011-05-11 11:14 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leon Woestenberg 2011-05-11 02:23:02 UTC
Yocto Plugin for Eclipse    1.0.0.201103260737

Poky Tree Mode is correctly configured, toolchain is detected.

When I then create a "HelloWorld ANSI C Autotools Project" with all the default settings, and a unique project name (I tried various), I hit this null pointer exception:


get env key PATH value /home/leon/sandbox/sidebranch/yocto/build/tmp/sysroots/i686-linux/usr/bin/ppce500v2-poky-linux-gnuspe:/home/leon/sandbox/sidebranch/yocto/build/tmp/sysroots/p2020rdb/usr/bin/crossscripts:/home/leon/sandbox/sidebranch/yocto/build/tmp/sysroots/i686-linux/usr/sbin:/home/leon/sandbox/sidebranch/yocto/build/tmp/sysroots/i686-linux/usr/bin:/home/leon/sandbox/sidebranch/yocto/build/tmp/sysroots/i686-linux/sbin:/home/leon/sandbox/sidebranch/yocto/build/tmp/sysroots/i686-linux//bin:/home/leon/sandbox/sidebranch/yocto/openembedded-core/scripts:/home/leon/sandbox/sidebranch/yocto/openembedded-core/bitbake/bin/:/home/leon/sandbox/sidebranch/yocto/openembedded-core/scripts:/home/leon/sandbox/sidebranch/yocto/openembedded-core/bitbake/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/qnx650/host/linux/x86/usr/bin:/etc/qnx/bin:/opt/altera9.1/quartus/bin:/opt/sidebranch/bin:/home/leon/sandbox/sidebranch/yocto/oe-core-likewise/scripts
get env key PKG_CONFIG_SYSROOT_DIR value /home/leon/sandbox/sidebranch/yocto/build/tmp/sysroots/p2020rdb
get env key PKG_CONFIG_PATH value /home/leon/sandbox/sidebranch/yocto/build/tmp/sysroots/p2020rdb//usr/lib/pkgconfig:/home/leon/sandbox/sidebranch/yocto/build/tmp/sysroots/p2020rdb/usr/share/pkgconfig
get env key CONFIG_SITE value /home/leon/sandbox/sidebranch/yocto/oe-core-likewise/meta/site/endian-big /home/leon/sandbox/sidebranch/yocto/oe-core-likewise/meta/site/common-glibc /home/leon/sandbox/sidebranch/yocto/oe-core-likewise/meta/site/powerpc-common /home/leon/sandbox/sidebranch/yocto/oe-core-likewise/meta/site/common /home/leon/sandbox/sidebranch/yocto/build/tmp/sysroots/p2020rdb/usr/share/powerpc-poky-linux-gnuspe_config_site.d/zlib_config /home/leon/sandbox/sidebranch/yocto/build/tmp/sysroots/p2020rdb/usr/share/powerpc-poky-linux-gnuspe_config_site.d/eglibc_config 
get env key CC value powerpc-poky-linux-gnuspe-gcc
get env key CXX value powerpc-poky-linux-gnuspe-g++
get env key GDB value powerpc-poky-linux-gnuspe-gdb
get env key TARGET_PREFIX value powerpc-poky-linux-gnuspe-
get env key CONFIGURE_FLAGS value --target=powerpc-poky-linux-gnuspe --host=powerpc-poky-linux-gnuspe --build=i686-linux
get env key CFLAGS value -mcpu=8548 -mspe=yes -mabi=spe -mhard-float -mfloat-gprs=double
get env key CXXFLAGS value -mcpu=8548 -mspe=yes -mabi=spe -mhard-float -mfloat-gprs=double
get env key OECORE_NATIVE_SYSROOT value /home/leon/sandbox/sidebranch/yocto/build/tmp/sysroots/i686-linux
get env key POKY_TARGET_SYSROOT value /home/leon/sandbox/sidebranch/yocto/build/tmp/sysroots/p2020rdb

!ENTRY org.eclipse.cdt.ui 4 4 2011-05-11 11:16:33.976
!MESSAGE Project cannot be created
!STACK 0
java.lang.NullPointerException
	at org.yocto.sdk.ide.YoctoSDKUtils.setEnvVars(Unknown Source)
	at org.yocto.sdk.ide.YoctoSDKProjectNature.setEnvironmentVariables(Unknown Source)
	at org.yocto.sdk.ide.YoctoSDKProjectNature.configureAutotools(Unknown Source)
	at org.yocto.sdk.ide.wizard.NewYoctoCProjectTemplate.process(Unknown Source)
	at org.eclipse.cdt.core.templateengine.process.Process.process(Process.java:162)
	at org.eclipse.cdt.core.templateengine.process.ConditionalProcessGroup.process(ConditionalProcessGroup.java:219)
	at org.eclipse.cdt.core.templateengine.process.TemplateProcessHandler.processAll(TemplateProcessHandler.java:65)
	at org.eclipse.cdt.ui.templateengine.Template$1.execute(Template.java:191)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
	at org.eclipse.cdt.ui.templateengine.Template.executeTemplateProcesses(Template.java:201)
	at org.eclipse.cdt.managedbuilder.ui.wizards.MBSWizardHandler.doTemplatesPostProcess(MBSWizardHandler.java:617)
	at org.eclipse.cdt.managedbuilder.ui.wizards.MBSWizardHandler.createProject(MBSWizardHandler.java:538)
	at org.eclipse.cdt.ui.wizards.CDTCommonProjectWizard$1$1$1.run(CDTCommonProjectWizard.java:257)
	at org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation.execute(WorkspaceModifyDelegatingOperation.java:69)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
	at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1008)
	at org.eclipse.cdt.ui.wizards.CDTCommonProjectWizard$1$1.run(CDTCommonProjectWizard.java:266)
	at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:164)
	at org.eclipse.ui.internal.UISynchronizer$3.run(UISynchronizer.java:158)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3515)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3164)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:173)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:388)
	at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1008)
	at org.eclipse.cdt.ui.wizards.CDTCommonProjectWizard.invokeRunnable(CDTCommonProjectWizard.java:179)
	at org.eclipse.cdt.ui.wizards.CDTCommonProjectWizard.getProject(CDTCommonProjectWizard.java:157)
	at org.eclipse.cdt.ui.wizards.CDTCommonProjectWizard.performFinish(CDTCommonProjectWizard.java:195)
	at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:811)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:430)
	at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
	at org.eclipse.jface.window.Window.open(Window.java:801)
	at org.eclipse.ui.actions.NewProjectAction.run(NewProjectAction.java:117)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
Comment 1 Jessica 2011-05-11 11:14:20 UTC
Fixed for 1.1 with the following commit 	099fe7b2c81519cdd1be5877324af511f6190472

Leon,

To solve your 1.0 eclipse problem, please under ../build/tmp, there should be an environment-setup-XXX for ppc, please change the OECORE_NATIVE_SYSROOT to "POKY_NATIVE_SYSROOT", seems you're using the latest Yocto with the 1.0 plug-in where the current Yocto is undergoing OE-CORE restructuring, that cause certain old environment variable name changed.