I have a debug script that allows me to abstract my debug logging.
Its worked all week on the Toshiba (it originated from example code for it) and on iHDSim (which I use for getting some clue as to where my 00C errors are!).
But suddenly, today the iHDSim is giving me an HDDVD_E_ARGUMENT script error.
function
initialise(){
// Initialise debugger var pTrace = Diagnostics.trace; var listenerCollection = Diagnostics.listeners; var Index = listenerCollection.add("debugger"); var Item = listenerCollection.item(Index);pTrace.autoFlush =
true;pTrace.indentLevel = 1;
pTrace.indentSize = 4;
initialiseDebugger( pTrace, listenerCollection, Index, Item );
}
....
var
_appDebug;/**
* Call this just once from the one-off Initialiser. **/function
initialiseDebugger( diagTrace, diagListeners, Index, dout ){
_appDebug =
new Object();_appDebug.diagTrace = diagTrace;
_appDebug.diagListeners = diagListeners;
_appDebug.Index = Index;
_appDebug.dout = dout;
}
..........
/**
* Basic debug string output **/function
debugOut( msg, part, lvl ){
_appDebug.dout.writeLine( msg, part, lvl );
_appDebug.dout.flush();
}
If I comment out the above 2 highlighted lines, iHDSim is okay again.
Of course the first question is why is iHDSim failing (the Tosh is fine)
This debug file has not changed for days, whereas other scripts have been added and modified which I would have liked to have blamed.
The second question is, how might I write code that can determine what player its running on, and perhaps avoid calling incompatible debug methods...