Jump to content

  • Log In with Google      Sign In   
  • Create Account

_Engine_

Member Since 24 Nov 2003
Offline Last Active Nov 27 2014 08:01 AM

Topics I've Started

Binding cast functions

25 August 2014 - 03:28 AM

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.


Loading binding data

25 August 2014 - 02:45 AM

Hi!

 

Currently when we load scene in our engine we make lots of bindings. And this become huge bottleneck even on pc with iCore 5. So it is possible to save code bindigs and load this info like precompiled bytecode?


in and out keywords in parameters

28 January 2013 - 08:40 AM

Hi!

When we want to change income parametr in C++ function we just declare this - void SomeFunc(type& parametr). This are never was a trouble - never. But in managed languges we must add in or out keyword and that leads to unessesery work and sometimes to stupid mistakes. It is to sad that Angel Script force us to this annoing thing. It is possible to disable this behaveor - we don't want managed style we want c++ style :)

perfomances issues with classes in array

21 January 2013 - 02:22 AM

Hi!

 

In script we store data in angel script classes. Also we have array of classes.

 

Sample look like:

 

class StoreData

{

   int data1, data2;

   float data1, data2;

}

 

array<StoreData> data;

 

But big problem lie in fact that in memory 100 elements of array is just pointers. Actual data lies randomly in memory, so if we try to access to field data1 of 100 elements in loop we catch many many cache misses. Also we cannot binary save this array we must access to every field of every element in array.

 

So classes in array is big bottleneck.

 

Is it possible to avoid this issue?


crash on asCContext::CleanStackFrame()

10 December 2012 - 02:51 PM

Hi!

We encountered with crash in

as_context.cpp, line: 4159

// Only destroy the object if it is truly alive
if( liveObjects[n] > 0 )
{
asSTypeBehaviour *beh = &amp;amp;m_currentFunction->objVariableTypes[n]->beh;
if( beh->destruct )
m_engine->CallObjectMethod((void*)(asPWORD*)&amp;amp;m_regs.stackFramePointer[-pos], beh->destruct); // crash here
}

looks like problem occurs when using script function like

string FormatInt(int val)
{
if (val < 10) return "0" + val;

return "" + val;
}

void SomeFunc()
{
...
Log(FormatInt(a) + ":" + FormatInt(b) + ":" + FormatInt(d));
...
}

so problem definitely in returning string in function as result. That's lead to illegal stack and crash.

And worse of all of this - crash occures on IOS and on Android and not on PC. SO we can't provide sample to you.

PARTNERS