Community
Participate
Working Groups
After using the team view and closing and reopening eclipse I get a NPE when it tries to load the Team View. Steps to Reproduce: 1. Expand some profiles and filter pools in the Team View. 2. Close Eclipse. 3. Reopen Eclipse. Log file: java.lang.NullPointerException at java.util.Hashtable.get(Unknown Source) at org.eclipse.rse.internal.ui.view.team.SystemTeamViewProfileAdapter.getCategoryChildren(SystemTeamViewProfileAdapter.java:232) at org.eclipse.rse.internal.ui.view.team.SystemTeamViewProfileAdapter.restoreCategory(SystemTeamViewProfileAdapter.java:275) at org.eclipse.rse.internal.ui.view.team.SystemTeamViewPart.getObjectFromMemento(SystemTeamViewPart.java:1408) at org.eclipse.rse.internal.ui.view.team.SystemTeamViewPart$RestoreStateRunnable.run(SystemTeamViewPart.java:1307) at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:152) at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:118) at org.eclipse.swt.widgets.Display.syncExec(Display.java:4097) at org.eclipse.rse.internal.ui.view.team.SystemTeamViewPart.restoreState(SystemTeamViewPart.java:1280) at org.eclipse.rse.internal.ui.view.team.SystemTeamViewPart.createPartControl(SystemTeamViewPart.java:306) at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:370) at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:227) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:592) at org.eclipse.ui.internal.WorkbenchPage$ActivationList.setActive(WorkbenchPage.java:4062) at org.eclipse.ui.internal.WorkbenchPage$17.runWithException(WorkbenchPage.java:3127) at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3659) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3296) at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:797) at org.eclipse.ui.internal.Workbench$25.runWithException(Workbench.java:1342) at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3659) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3296) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2309) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443) at org.eclipse.equinox.launcher.Main.run(Main.java:1169) -----------Enter bugs above this line----------- TM 2.0RC4 Testing installation : eclipse-SDK-3.3RC4 RSE install : RSE 2.0 RC4 java.runtime : Sun 1.5.0_11-b03 os.name: : Windows XP, Service Pack 2 ------------------------------------------------
Created attachment 73329 [details] Check to see if the ISystemProfile is null before attempting to obtain SystemTeamViewCategoryNode This will resolve the issue of the NPE that is thrown on the restart. Although when investigating the issue, it seems that the state of the expanded tree in the Team View is not kept after the application is restarted. This could be another defect that might want to be opened? I, Rupen Mardirossian, declare that I developed attached code from scratch, without referencing any 3rd party materials except material licensed under the EPL. I am authorized by my employer, IBM Canada Ltd. to make this contribution under the EPL.
Rupen -- This is a result of changing root for the SystemTeamView. There used to be a RemoteSystemsProject there that the profiles were descended from. The problem is that the memento that is being stored is derived from the current structure of the view (as it should be) but the code reading that memento on restore is assuming the old structure. Thus, it is looking for a "RemoteSystemsProject" when there isn't any and misinterpreting the tokens present in the string. The code should tolerate the memento being delivered now but we should ensure that they are being decoded in the proper format. Anyway, please investigate to see if we are constructing mementos properly for this view when the workbench closes and that we are restoring from them properly when the view opens. We should probably also make sure that the mementos that currently exist don't cause problems but result in the view being "folded up" correctly.
Not too sure if my patch was commited. Although, the NPE does not seem present anymore. There is still the persistence issue in which the team view does not have the profiles expanded as they were before the shutting of the app. When the app is restarted, all the profiles are collapsed. Should this be opened as a seperate bug?
Apparently it was not committed. SystemTeamViewPart does not contain the patch and on the bug there is also no evidence that it was committed.
This was fixed at the same time bug 187741 was fixed. Closing this as a result. Bug 201778 was opened to track the problem of restoring the state of the team view.
Verified fixed with 2.0.1 RC1.
Removing "contributed" kwd since this patch was not accepted and the issue was fixed differently.