Bug 248331 - NPE during RestoreRemoteObjects on initial connect to SSH
Summary: NPE during RestoreRemoteObjects on initial connect to SSH
Status: NEW
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 3.0.1   Edit
Hardware: PC Windows XP
: P4 minor (vote)
Target Milestone: ---   Edit
Assignee: dsdp.tm.rse-inbox CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords:
Depends on: 233048 218304
Blocks:
  Show dependency tree
 
Reported: 2008-09-23 15:18 EDT by Martin Oberhuber CLA
Modified: 2011-01-12 15:44 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Oberhuber CLA 2008-09-23 15:18:20 EDT
I saw this in the debugger (with Java Exception Breakpoint on NPE) after I launched a Debug session first time after upgrading my development environment from 3.4 to 3.5m2 -- I assume that the same NPE could also occur after changing the local configuration:

  * Create SSH connection, drill down below "My Home"
  * Update Manager > Update Eclipse or RSE, choose Restart
 --> During Restart, RSE will try to restore the connection, but since the 
     config has been changed the Adapters are slower to load (race condition).

Here is the backtrace:
Thread [Worker-7] (Suspended (exception NullPointerException))	
	SystemViewPart$RestoreRemoteObjects.doRestore(IProgressMonitor) line: 1581	
	SystemViewPart$RestoreRemoteObjects.run(IProgressMonitor) line: 1516	
	Worker.run() line: 55	

It looks like either a loadAdapter() call is needed here (as per bug 218304), or we need to wait in the RestoreRemoteObjects worker until RSE is fully initialized, before we proceed (similar to bug 233048).

Problem seems minor since the only user-observed consequence is that the connection is not restored properly.

-----------Enter bugs above this line-----------
TM 3.0.1 / Eclipse 3.5m2 on WinXP
Comment 1 Martin Oberhuber CLA 2008-09-23 15:20:56 EDT
FYI, in my case it tried to restore 7 remote objects in total, including the "My Home" filter and 6 folders down to "/folk/mober/aatmp/newfolder/bar"
Comment 2 Martin Oberhuber CLA 2008-09-23 15:25:21 EDT
The bug does have the negative side-effect that no images are painted for the folders and files below "My Home", and the only workaround is to quit and re-start Eclipse.

Perhaps it's sufficient to do if (adapter!=null)... in order to ensure that the Restore Job doesn't break anything.
Comment 3 Martin Oberhuber CLA 2010-02-26 19:11:19 EST
Bulk update of target milestones to 3.2