S
Said Elkhazendar
Guest
ParseScriptText fails quietly without exception on Windows 10 when JScript contains COM calls on fast pc box with log utilization
Issue is only appear on Windows 10. Tested on build 1703 and 1709 If I run application in Windows 8, or Windows 8 Compatibility issue does not appear.
This issue only occurs on a startup, only if PC is fast eg. i7 box or equivalant and has low utilization (no heavy cpu/disk i/o background apps running)
Found a workaround hack, by adding a Sleep of 5 ms. the issue does not occur, and ParseScriptText executes properly.
On Startup, executing JScript using IActiveScript and IActiveScript(64) . The script calls custom COM library that launches another application with an IE html dialog to display some custom message.
...
if(m_pScript->SetScriptState(SCRIPTSTATE_CONNECTED)!=S_OK)
{
//logs error to text file, never executed always returns S_OK
}
else
{
//Sleep(5)// this sleep hack fixes the issue and ParseScriptText does not fail. Adds unwanted latency.
if( pScriptParse->ParseScriptText(pstrCode, 0, 0, 0, 0, 0,
SCRIPTTEXT_ISPERSISTENT|SCRIPTTEXT_ISVISIBLE, 0, &exception)!=S_OK)
{
//logs error to text file, never executed always returns S_OK
}
}
Would like to know if there is a fix for this issue and if anyone is experiencing a similar issue?
Thanks
Continue reading...
Issue is only appear on Windows 10. Tested on build 1703 and 1709 If I run application in Windows 8, or Windows 8 Compatibility issue does not appear.
This issue only occurs on a startup, only if PC is fast eg. i7 box or equivalant and has low utilization (no heavy cpu/disk i/o background apps running)
Found a workaround hack, by adding a Sleep of 5 ms. the issue does not occur, and ParseScriptText executes properly.
On Startup, executing JScript using IActiveScript and IActiveScript(64) . The script calls custom COM library that launches another application with an IE html dialog to display some custom message.
...
if(m_pScript->SetScriptState(SCRIPTSTATE_CONNECTED)!=S_OK)
{
//logs error to text file, never executed always returns S_OK
}
else
{
//Sleep(5)// this sleep hack fixes the issue and ParseScriptText does not fail. Adds unwanted latency.
if( pScriptParse->ParseScriptText(pstrCode, 0, 0, 0, 0, 0,
SCRIPTTEXT_ISPERSISTENT|SCRIPTTEXT_ISVISIBLE, 0, &exception)!=S_OK)
{
//logs error to text file, never executed always returns S_OK
}
}
Would like to know if there is a fix for this issue and if anyone is experiencing a similar issue?
Thanks
Continue reading...