Community
Participate
Working Groups
Build Identifier: M20100909-0800 I'm working on an Android project that contains some JNI. In order to have the C code compiled before running the Java application, I've tried setting up a Make Target for my project, such that "sh build.sh" runs before the Android packager. When I try to build, I receive an "error running builder 'CDT Builder' on project", with stack trace: java.lang.NullPointerException at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.build(CommonBuilder.java:517) at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.build(CommonBuilder.java:498) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:629) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:172) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:282) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:363) at org.eclipse.core.internal.resources.Project$1.run(Project.java:545) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975) at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:524) at org.eclipse.core.internal.resources.Project.build(Project.java:123) at org.eclipse.cdt.make.internal.core.MakeTarget$1.run(MakeTarget.java:323) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975) at org.eclipse.cdt.make.internal.core.MakeTarget.build(MakeTarget.java:336) at org.eclipse.cdt.make.ui.TargetBuild$1$1.run(TargetBuild.java:102) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975) at org.eclipse.cdt.make.ui.TargetBuild$1.run(TargetBuild.java:105) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Incidentally, I receive an error displaying the project's "C++ Builder" property page: java.lang.NullPointerException at org.eclipse.cdt.managedbuilder.ui.properties.BuildBehaviourTab.applyToCfg(BuildBehaviourTab.java:432) at org.eclipse.cdt.managedbuilder.ui.properties.BuildBehaviourTab.apply(BuildBehaviourTab.java:426) at org.eclipse.cdt.managedbuilder.ui.properties.BuilderSettingsTab.performApply(BuilderSettingsTab.java:314) at org.eclipse.cdt.ui.newui.AbstractCPropertyTab.handleTabEvent(AbstractCPropertyTab.java:521) at org.eclipse.cdt.ui.newui.AbstractPage.forEach(AbstractPage.java:1018) at org.eclipse.cdt.ui.newui.AbstractPage$5.run(AbstractPage.java:646) 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.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507) at org.eclipse.ui.internal.progress.ProgressManager$RunnableWithStatus.run(ProgressManager.java:1346) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.progress.ProgressManager$7.run(ProgressManager.java:1184) at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:179) at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150) at org.eclipse.swt.widgets.Display.syncExec(Display.java:4282) at org.eclipse.ui.internal.progress.ProgressManager.runInUI(ProgressManager.java:1182) at org.eclipse.cdt.ui.newui.AbstractPage.performSave(AbstractPage.java:665) at org.eclipse.cdt.ui.newui.AbstractPage.performApply(AbstractPage.java:519) at org.eclipse.jface.preference.PreferencePage$2.widgetSelected(PreferencePage.java:281) 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.dialogs.PropertyDialogAction.run(PropertyDialogAction.java:157) 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) This more or less inhibits me from using CDT. I'm using the latest Helios version: C/C++ Development Tools 7.0.1.201009141542 org.eclipse.cdt.feature.group Reproducible: Always Steps to Reproduce: 1. Create a new Android project 2. Add a Make Target 3. Build (4. Additionally, view project's "C++ Builder" property page)
I feel compelled to mention that I have Sequoyah Android Native Code Support installed, but I don't believe this is causing any of the CDT-related problems.
Can you attach your .project and .cproject (or .cdtbuild?)?
I tried to reproduce this. Here's my installation: Fedora 13 Android DDMS 0.9.9.v201009221407-60953 Android Development Tools 0.9.9.v201009221407-60953 Eclipse IDE for C/C++ Linux Developers 1.3.1.20100916-1202 (Eclipse 3.6.1, CDT 7.0.1) Sequoyah Android Native Code Support 1.1.1.N20100920-0518 I created an Android project, a test project (using the checkbox). I added native support, added the Make target in the Make Target view with the command "sh build.sh". I also tried changing the build command in the build settings to "sh" and the build target to "build.sh". I also tried adding a external tool in the builders. I did not get an exception. Do you have the same problem with a test project? Can you add some details to the steps? Thanks.
The only difference I can find in my configuration, Marc-Andre, is that I've taken Eclipse Classic and installed C++ development tools from the Helios download site. My project setup is also slightly different, as I have a Android library reference. (This causes an interesting side-issue in which the source of that library appears twice in my project, and hence I get countless "the type ... is already defined" errors.) Under Windows, the CDT-related problem doesn't exist. I can specify the build command via the project properties' C/C++ Build settings.
I will attach the .project and .cproject files as soon as possible. (There is no .cdtbuild.)
(In reply to comment #5) > I will attach the .project and .cproject files as soon as possible. (There is > no .cdtbuild.) Paul, do you still have the project files? Can you still reproduce this?
I received this email from Paul: "Sorry to respond directly via e-mail, but Bugzilla is rejecting logins and new accounts. I'm afraid I don't have the project anymore and therefore can't reproduce the problem. Best, Paul" I also tried again today with: ADT 16.0.1 Eclipse 3.7.1 CDT 8.0.1 Sequoyah 1.1.3 and I didn't get the NPE. But I was able to get the exception after deleting the .cproject file. I can reproduce this with a Java project, without Android stuff: 1. Create a Java project 2. Add C/C++ Nature, I choose Makefile project 3. Delete .cproject file, restart Eclipse 4. Right-click on project, Make targets, Build..., Add, Enter some name. 5. This should trigger a build and the NPE. 6. After, go to the project properties, a lot of pages will trigger exceptions