Hi,
angelscript.dll!asCString::Compare(const char * str) Line 291 + 0x23 bytes C++
angelscript.dll!operator==(const asCString & a, const char * b) Line 340 + 0xf bytes C++
> angelscript.dll!asCCompiler::CompileOverloadedDualOperator2(asCScriptNode * node, const char * methodName, asSExprContext * lctx, asSExprContext * rctx, asSExprContext * ctx, bool specificReturn, const asCDataType & returnType) Line 10781 + 0x1c bytes C++
angelscript.dll!asCCompiler::CompileOverloadedDualOperator(asCScriptNode * node, asSExprContext * lctx, asSExprContext * rctx, asSExprContext * ctx) Line 10736 + 0x7b bytes C++
angelscript.dll!asCCompiler::CompileInitialization(asCScriptNode * node, asCByteCode * bc, asCDataType & type, asCScriptNode * errNode, int offset, unsigned __int64 * constantValue, int isVarGlobOrMem) Line 2373 + 0x32 bytes C++
angelscript.dll!asCCompiler::CompileDeclaration(asCScriptNode * decl, asCByteCode * bc) Line 2110 + 0x46 bytes C++
angelscript.dll!asCCompiler::CompileStatementBlock(asCScriptNode * block, bool ownVariableScope, bool * hasReturn, asCByteCode * bc) Line 1027 C++
angelscript.dll!asCCompiler::CompileFunction(asCBuilder * builder, asCScriptCode * script, asCArray<asCString> & parameterNames, asCScriptNode * func, asCScriptFunction * outFunc, sClassDeclaration * classDecl) Line 552 C++
angelscript.dll!asCBuilder::CompileFunctions() Line 724 C++
angelscript.dll!asCBuilder::Build() Line 241 C++
angelscript.dll!asCModule::Build() Line 230 + 0xe bytes C++
(engine->scriptFunctions).array,8 0x0000000003a40100 asCScriptFunction * *
[0] 0x0000000000000000 {refCount={...} gcFlag=??? engine=??? ...} asCScriptFunction *
[1] 0x0000000003c0bec0 {refCount={...} gcFlag=false engine=0x0000000003c32040 ...} asCScriptFunction *
[2] 0x0000000003c0bd80 {refCount={...} gcFlag=false engine=0x0000000003c32040 ...} asCScriptFunction *
[3] 0x0000000003c0bc40 {refCount={...} gcFlag=false engine=0x0000000003c32040 ...} asCScriptFunction *
[4] 0x0000000003c0bb00 {refCount={...} gcFlag=false engine=0x0000000003c32040 ...} asCScriptFunction *
[5] 0x0000000003c0b9c0 {refCount={...} gcFlag=false engine=0x0000000003c32040 ...} asCScriptFunction *
[6] 0x0000000003c0b880 {refCount={...} gcFlag=false engine=0x0000000003c32040 ...} asCScriptFunction *
[7] 0x0000000003c0b740 {refCount={...} gcFlag=false engine=0x0000000003c32040 ...} asCScriptFunction *
(ot->methods).array,8 0x0000000003c35300 int *
[0] 0 int
[1] 103 int
[2] 104 int
[3] 105 int
[4] 106 int
[5] 107 int
[6] 108 int
[7] 109 int
The object that causes it is a vector3 pod with some typical math methods. What's interesting though is that removing the swizzler
template<uint a, uint b, uint c>
PxVec3 Float3Swizzle3F(const PxVec3 *p){
return PxVec3((*p)[a],(*p)[b],(*p)[c]);
}
template<uint i>
class Float3Swizzle3{
public:
static inline void Do(asIScriptEngine *psg){
char sw[32];
sprintf(sw,"const float3 get_%c%c%c() const",i/9+0x78,(i/3)%3+0x78,i%3+0x78);
psg->RegisterObjectMethod("float3",sw,asFUNCTION((Float3Swizzle3F<i/9,(i/3)%3,i%3>)),asCALL_CDECL_OBJFIRST);
Float3Swizzle3<i-1>::Do(psg);
}
};
template<>
class Float3Swizzle3<0>{
public:
static inline void Do(asIScriptEngine *psg){
psg->RegisterObjectMethod("float3","const float3 get_xxx() const",asFUNCTION((Float3Swizzle3F<0,0,0>)),asCALL_CDECL_OBJFIRST);
}
};
Float3Swizzle3<27-1>::Do(psg);
makes the problem vanish. It's strange because enabling a similar swizzler for vector4 type has no effect (despite the fact that it spams multiple times more methods than the code above). Currently I'm hacking around by putting some null-checks in some places.
I'll be happy to provide more info if needed...