Project: appceleratorstudio
Issue TISTUD-4554: Error opening the Tiapp.xml after manually adding and removing SDKs
I stumble into this issue after removing some previously installed Titanium SDKs, and then adding a new SDK version. After that, I tried to open a tiapp.xml for a project that used an SDK that is no longer available. The TiApp editor failed to load with this exception: {code} java.lang.NullPointerException com.appcelerator.titanium.core.internal.mobile.MobilePlatformsRegistry$LazyMobilePlatform.isSDKSupporting(MobilePlatformsRegistry.java:113) com.appcelerator.titanium.ui.ide.tiappEditor.TiAppDeployTargetsSection.updateControlsEnablement(TiAppDeployTargetsSection.java:533) com.appcelerator.titanium.ui.ide.tiappEditor.AbstractTiAppSection.initialize(AbstractTiAppSection.java:72) com.appcelerator.titanium.ui.ide.tiappEditor.TiAppDeployTargetsSection.initialize(TiAppDeployTargetsSection.java:166) com.appcelerator.titanium.ui.ide.tiappEditor.AbstractTiAppSection.(AbstractTiAppSection.java:55) com.appcelerator.titanium.ui.ide.tiappEditor.TiAppDeployTargetsSection.(TiAppDeployTargetsSection.java:129) com.appcelerator.titanium.ui.ide.tiappEditor.TiAppFormPage.createFormContent(TiAppFormPage.java:100) org.eclipse.ui.forms.editor.FormPage$1.run(FormPage.java:152) org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) org.eclipse.ui.forms.editor.FormPage.createPartControl(FormPage.java:150) org.eclipse.ui.forms.editor.FormEditor.pageChange(FormEditor.java:471) org.eclipse.ui.part.MultiPageEditorPart.setActivePage(MultiPageEditorPart.java:1067) org.eclipse.ui.forms.editor.FormEditor.setActivePage(FormEditor.java:603) org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:352) org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670) org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465) org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595) org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313) org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180) org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270) org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65) org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473) org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1245) org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1198) org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1597) org.eclipse.ui.internal.PartStack.add(PartStack.java:493) org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103) org.eclipse.ui.internal.PartStack.add(PartStack.java:479) org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112) org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:63) org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:225) org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:213) org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:808) org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:707) org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:666) org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2942) org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2850) org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2842) org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2793) org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2789) org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2773) org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2756) org.eclipse.ui.ide.IDE.openEditor(IDE.java:683) org.python.pydev.navigator.actions.PyOpenResourceAction.openFiles(PyOpenResourceAction.java:101) org.python.pydev.navigator.actions.PyOpenPythonFileAction.run(PyOpenPythonFileAction.java:86) org.eclipse.ui.actions.RetargetAction.run(RetargetAction.java:221) org.eclipse.ui.navigator.CommonNavigatorManager$3.open(CommonNavigatorManager.java:185) org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48) org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:866) org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49) org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:864) org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1152) org.eclipse.ui.navigator.CommonViewer.handleOpen(CommonViewer.java:462) org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1256) org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275) org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:269) org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:309) org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) org.eclipse.swt.widgets.Display.sendEvent(Display.java:4128) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465) org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270) org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3974) org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3613) org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701) org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665) org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499) org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679) org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668) org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) com.appcelerator.titanium.rcp.IDEApplication.start(IDEApplication.java:125) org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344) org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622) org.eclipse.equinox.launcher.Main.basicRun(Main.java:577) org.eclipse.equinox.launcher.Main.run(Main.java:1410) org.eclipse.equinox.launcher.Main.main(Main.java:1386) {code}
Story points: 3