There is a serious, but intermittent, crash in Matlab when closing out a TI Debug Server session. The crash follows a call to the debug session terminate() function by a few seconds. The crash will not occur if a target.connect() has not been called in between the openSession and terminate. The frequency of the crash seems to vary by PC (though all appear to have identical CCS and Debug Server versions) from about 5% to 20%. Most PCs are Matlab R2010a, though one was R2008. The nature of the crash is that the Matlab app, and the entire Matlab workspace immediately dissappear. There is no Matlab crash report, nor any indication of a previous crash upon re-starting Matlab. If Matlab and the app are re-started following a crash, the test will then execute at its normal rate of failure without any reset of hardware or USB connections, i.e it will then succeed or crash with no lingering effects from the previous crash.
The OS on PCs is WinXP, SP3 and one with Win XP, SP2.
The CCS and Java versions on the PCs are:
C:/Program
Files/Texas
Instruments/ccsv4/DebugServer/packages/ti/dss/java/dss.jar
C:/Program
Files/Texas
Instruments/ccsv4/DebugServer/packages/ti/dss/java/com.ti.debug.engine_1.0.0.jar
C:/Program
Files/Texas
Instruments/ccsv4/DebugServer/packages/ti/dss/java/com.ti.ccstudio.scripting.environment_3.1.0.jar
C:/Program
Files/Texas
Instruments/ccsv4/DebugServerpackages/ti/dss/java/com.ti.ccstudio.scripting.rtdx_1.0.0.jar
C:/Program
Files/Texas Instruments/ccsv4/eclipse/startup.jar
**********
This is from TI DS API documentation (Class DebugServer) showing how to use open / close a debug session:
// Create Environment and open a debug session
ScriptingEnvironment
env = new ScriptingEnvironment();
DebugServer myServer = (DebugServer)
env.getServer("DebugServer.1");
DebugSession mySession =
myServer.openSession("*", "*");
...
// Terminate our session and
stop the server
mySession.terminate()
myServer.stop()
**********
Here is the Matlab function that exposes the (intermittent) crash:
function runFailTest()
import
com.ti.debug.engine.scripting.*;
import java.lang.System;
import
java.lang.Object;
script.setScriptTimeout(60000);
script.traceSetConsoleLevel(TraceLevel.ALL);
%% see all messages at Matlab console
uDebugServer.setConfig( 'C:\Documents and
Settings\mlogan\user\CCSTargetConfigurations\EVM6472_XDS560v2USB.ccxml' );
pause(2);
debugSessionCore1.target.disconnect();
debugSessionCore1.terminate();
%% crash occurs here (but only if target.connect/disconnect
called prior)
uDebugServer.stop();