Community
Participate
Working Groups
During our nightly test runs with RSE 2.0.1, we saw the following NPE. It seems that an IHost object is null at the time the SystemView runs a smartRefresh. I'm wondering how an IHost object can ever be null in an RSE HostPool. It seems that there is either a concurrency / threading issue that should be addressed, or data have not been restored completely. I would suggest reviewing related code, and perhaps adding checks to the methods dealing with IHost Objects, such that a "null" IHost object is detected as early as possible (when it's being added, and not when refreshing). [exec] Caused by: java.lang.NullPointerException [exec] at org.eclipse.rse.ui.internal.model.SystemRegistry.getHostsBySystemType(SystemRegistry.java:1495) [exec] at org.eclipse.rse.ui.internal.model.SystemRegistry.getLocalHost(SystemRegistry.java:1388) [exec] at com.windriver.ide.target.ui.rse.connections.WRConnectionManager.getRegistrySubSystem(WRConnectionManager.java:251) [exec] at com.windriver.ide.target.ui.rse.internal.elements.WRElementWrapperAdapter.getSubSystem(WRElementWrapperAdapter.java:109) [exec] at org.eclipse.rse.internal.ui.view.SystemView.smartRefresh(SystemView.java:3597) [exec] at org.eclipse.rse.internal.ui.view.SystemView$ResourceChangedJob.runInUIThread(SystemView.java:2048) [exec] at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:94) [exec] at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) [exec] at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123) -----------Enter bugs above this line----------- installation : eclipse-SDK-3.3.1 (M20070921-1145), cdt-4.0.1, emf-2.3.1 RSE install : Download RSE-2.0.1: RSE-SDK,tests,terminal java.runtime : Sun 1.5.0_11 os.name: : Linux RHEL4 ------------------------------------------------
Created attachment 83441 [details] Patch making SystemHostPool thread-safe Attached patch makes SystemHostPool thread-safe, and adds some assertions to ensure that "null" IHost objects are detected as early as possible. In order to ensure thread-safety, following changes were necessary: * make getHost(String) final * make getHost(int) final * avoid lazy initialization of "connections" and "pools" fields * Modify Javadoc of IHost#renamingSystemProfile() to allow alien method call
Patch committed: [206742] Make SystemHostPool thread-safe SystemHostPool v1.5 IHost v1.9 SystemRegistry v1.38 DaveD please review.
*** Bug 212404 has been marked as a duplicate of this bug. ***