CDV ❯ NPE in TcPlugin.saveConfiguration
-
Bug
-
Status: Closed
-
2 Major
-
Resolution: Fixed
-
Eclipse Plugin
-
-
hhuynh
-
Reporter: wharley
-
November 10, 2008
-
0
-
Watchers: 0
-
December 16, 2008
-
November 19, 2008
Description
Encountered the following while deleting a newly created type in a TIM project. Interestingly, the TIM project does not have a Terracotta nature, so I’m not sure why it was trying to save a config file.
The NPE appears to be happening because inside the catch block, configFile is referenced; it is presumably null, and probably caused an NPE in the try block as well.
java.lang.NullPointerException at org.terracotta.dso.TcPlugin.saveConfiguration(TcPlugin.java:1214) at org.terracotta.dso.MultiChangeSignaller.signal(MultiChangeSignaller.java:32) at org.terracotta.dso.refactoring.DeleteTypeChange.perform(DeleteTypeChange.java:89) at org.eclipse.ltk.core.refactoring.CompositeChange.perform(CompositeChange.java:278) at org.eclipse.ltk.core.refactoring.PerformChangeOperation$1.run(PerformChangeOperation.java:260) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800) at org.eclipse.ltk.core.refactoring.PerformChangeOperation.executeChange(PerformChangeOperation.java:308) at org.eclipse.ltk.internal.ui.refactoring.UIPerformChangeOperation.access$1(UIPerformChangeOperation.java:1) at org.eclipse.ltk.internal.ui.refactoring.UIPerformChangeOperation$1.run(UIPerformChangeOperation.java:66) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.ltk.internal.ui.refactoring.UIPerformChangeOperation$2.run(UIPerformChangeOperation.java:84) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3342) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3071) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:173) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:382) at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2.run(RefactoringWizardDialog2.java:317) at org.eclipse.ltk.ui.refactoring.RefactoringWizard.internalPerformFinish(RefactoringWizard.java:558) at org.eclipse.ltk.internal.ui.refactoring.PreviewWizardPage.performFinish(PreviewWizardPage.java:387) at org.eclipse.ltk.ui.refactoring.RefactoringWizard.performFinish(RefactoringWizard.java:622) at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2.okPressed(RefactoringWizardDialog2.java:446) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:472) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1360) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3482) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3068) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation$1.run(RefactoringWizardOpenOperation.java:144) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:156) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate(RefactoringStarter.java:37) at org.eclipse.jdt.internal.ui.refactoring.UserInterfaceStarter.activate(UserInterfaceStarter.java:60) at org.eclipse.jdt.internal.corext.refactoring.RefactoringExecutionStarter.startDeleteRefactoring(RefactoringExecutionStarter.java:282) at org.eclipse.jdt.internal.ui.refactoring.reorg.DeleteAction.run(DeleteAction.java:75) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:250) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:119) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508) at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:472) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:824) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:882) at org.eclipse.ui.internal.keys.OutOfOrderListener.handleEvent(OutOfOrderListener.java:76) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1622) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1617) at org.eclipse.swt.widgets.Control.kEventUnicodeKeyPressed(Control.java:2292) at org.eclipse.swt.widgets.Composite.kEventUnicodeKeyPressed(Composite.java:586) at org.eclipse.swt.widgets.Tree.kEventUnicodeKeyPressed(Tree.java:2551) at org.eclipse.swt.widgets.Control.kEventTextInputUnicodeForKeyEvent(Control.java:2254) at org.eclipse.swt.widgets.Widget.textInputProc(Widget.java:1995) at org.eclipse.swt.widgets.Display.textInputProc(Display.java:3970) at org.eclipse.swt.internal.carbon.OS.SendEventToEventTarget(Native Method) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3051) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193) 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:386) 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:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
Comments
Gary Keim 2008-11-18
Walter Harley 2008-11-18
Bah, now it’s not doing it anymore. Yes, that was basically the scenario, although I was probably also building and doing SVN commands at the command line, which probably means that Eclipse was to some extent confused about files needing to be refreshed. Sorry!
I can make it not NPE but I’d like to understand how this could happen. Could you describe the scenario a bit more? I have tim-annotations open and add a new type there, then delete it. Is that what you were doing?