Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 325188

Summary: RSETerminalConnectionThread run does not handle SystemMessageException well
Product: [Tools] Target Management Reporter: Liping Ke <liping.ke>
Component: RSEAssignee: dsdp.tm.rse-inbox <tm.rse-inbox>
Status: NEW --- QA Contact: Martin Oberhuber <mober.at+eclipse>
Severity: normal    
Priority: P3 CC: mober.at+eclipse
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Liping Ke CLA 2010-09-13 23:44:20 EDT
Build Identifier: DSDP TM 3.2

We found this error when we did not start TCF agent, terminal service, yet start terminal service calling (RSETerminalConnectionThread ->run), our lower code will raise a expected "Terminal service not supported" SystemMessageException. But after RSETerminalConnectionThread catch this exception, it did not stop the operation immediately, but go on with eadDataForever(fConn.getInputStream()); Then another ugly NULLPointerException will be raised. I paste the whole printStack below for your reference:


org.eclipse.rse.services.clientserver.messages.SystemMessageException: Remote
peer does not support org.eclipse.tm.internal.tcf.terminals.ITerminalsService
service
    at org.eclipse.tm.internal.tcf.rse.TCFRSETask.getS(TCFRSETask.java:48)
    at
org.eclipse.tm.internal.tcf.rse.shells.TCFTerminalShell.<init>(TCFTerminalShell.java:215)
    at
org.eclipse.tm.internal.tcf.rse.terminals.TCFTerminalService.launchTerminal(TCFTerminalService.java:35)
    at
org.eclipse.rse.internal.terminals.ui.views.RSETerminalConnectionThread.run(RSETerminalConnectionThread.java:55)
TCF shell Service: Connect failed
Exception in thread "Thread-13" java.lang.NullPointerException
    at
org.eclipse.rse.internal.terminals.ui.views.RSETerminalConnectionThread.readDataForever(RSETerminalConnectionThread.java:99)
    at
org.eclipse.rse.internal.terminals.ui.views.RSETerminalConnectionThread.run(RSETerminalConnectionThread.java:70)

Reproducible: Always

Steps to Reproduce:
Since we have not submit our TCF/RSE terminal/shell service integration code to upstream yet, I can't paste the reproduce step correctly. But this could be done
by reading the code of org.eclipse.tm.rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/RSETerminalConnectionThread.java.

Thanks!