Consider:
ResourceType* someResource = new ResourceType(resourceData);
string decl("ImageResource@ APPREGISTERED_"+resourceName);
pScriptEngine->RegisterGlobalProperty(decl.c_str(),someResource);
// Then in script.
Frame@ frame1 = APPREGISTERED_SomeResource.GetFrame("some_valid_frame_in_the_resource0001"); // C-C-C-C-CRASH!
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// This won't crash, however.
string decl("ImageResource APPREGISTERED_"+resourceName);
pScriptEngine->RegisterGlobalProperty(decl.c_str(),someResource);
// Then in script.
Frame@ frame1 = APPREGISTERED_SomeResource.GetFrame("some_valid_frame_in_the_resource0001"); // This does not crash.
Could this possibly be a bug within AngelScript? Perhaps a script warning is in order?