Binding cast functions

Started by
1 comment, last by _Engine_ 9 years, 7 months ago

Hi!

We are binding C++ classes and cast functions from base class. We get errors like this - "0:50.375 - (0, 0) : ERR : Type 'SymbolInstSplashScreenSymbol' is still used by function 'SymbolInstSplashScreenSymbol@ NGUIWidget::_beh_10_()'" when in script we use cast functions. When we close scene angelscript are crushes (screenshot of call stack are attached). We use flags asBEHAVE_REF_CAST and asBEHAVE_IMPLICIT_REF_CAST when register cast functions.

If we are use flags asBEHAVE_VALUE_CAST and asBEHAVE_IMPLICIT_ witch looks like more properly because we do not need any reference count when use cast operator than all things became more badly - more errors comes and our scene crushes after binding not after closing as was before.

So looks like using cast functions leads to unnecessary reference count and this leads to internal crush of angelscript.

Advertisement

Can you please provide an example that reproduces the problem? From the little information you provided I cannot determine if it might be a bug in AngelScript or if you've just implemented the cast operators that you register with AngelScript incorrectly.

Regards,

Andreas

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Currently i cannot reproduce same behavior in test project but i will try to succeed.

This topic is closed to new replies.

Advertisement