I have not debugged this entirely, but I thought I would post here in the hopes that someone might have seen this before and save me some trouble. :) Let me explain the behavior I am seeing... I have wrapped my engine contexts in objects that do the management of the contexts and cleanup as well as handle exception reporting. In the object constructor I set the exception callback to a method of that object. When a script exception occurs I see that my assigned method is called and completed, but my application terminates when control returns to asCScriptEngine::CallObjectMethod. Here is the strange part. If I wrap ( asScriptEngine.cpp line 2207 )
(((asCSimpleDummy*)obj)->*f)(param);
in a try/catch, like this:
try
{
(((asCSimpleDummy*)obj)->*f)(param);
}
catch(...)
{
}
Erything works perfectly. In fact, the catch never gets executed, but without it the app faults and dies. At first I suspected that my object containing the assigned exception callback was being cleaned up before the call had completed but I am sure it is around well after this call. Does this situation look familiar to anyone? My gut says I have some kind of object lifetime problem going on, since I do not see this problem if I set my callback to a global function. Thanks, ~Scott
[size=1]'Behold! It is not over unknown seas but back over well-known years that your quest must go; back to the bright strange things of infancy and the quick sun-drenched glimpses of magic that old scenes brought to wide young eyes.'