I've built AngelScript into my game engine I'm writing and it works with Debug build, but not in the Release build: calling a function in the script (as in, using GetFunctionIdByDecl + prepare + execute to 'callback' a function in the script) doesn't execute for some reason and errors out at context->Execute(). I can't figure out why yet.
I'm still willing to dig deeper to find out why I'm getting this, so this is an early "shot in the dark" here to see if anybody else has bright ideas at this stage.
In the release build, I have noticed that in the debug window, after GetFunctionIdByDecl returns, the function name I pass to it returns corrupted, but I'm thinking that's just the issue with release debugging tracking the symbols? Everything else seems fine. The function ID returned is consistent with the debug run and each time, so that seems ok. Creating context and prepare return as usual. It's just the Execute() that returns with an error and fails to invoke the script function.
Another possibility I have in mind, but have so far got nowhere with, is that perhaps in the release build, the CScriptBuilder (which I'm using to load a script to module) is somehow only reading the #include file, and not the actual bulk of the script (within which #include exists). I know for a fact that the global definitions I have in the #include file is loaded & compiled. But surely the main bulk is loaded too, if GetFunctionIdByDecl returns with the correct function ID... so this one seems to be the wrong place to look.
This one is going right over my head at the moment. Anybody have an inkling?
Debug build works, but not Release
Can you perhaps show a piece of the code where you think the problem might be?
It looks like you may be encountering a memory invasion somewhere. In debug mode this can sometimes pass unnoticed since the compiler usually adds extra padding to buffers. Another possiblity is that some memory may be released too early.
It looks like you may be encountering a memory invasion somewhere. In debug mode this can sometimes pass unnoticed since the compiler usually adds extra padding to buffers. Another possiblity is that some memory may be released too early.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement