Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Member Since 16 Feb 2014
Offline Last Active Yesterday, 05:08 PM

Posts I've Made

In Topic: opConv and opImplConv with bool

15 November 2014 - 08:37 AM


This makes sense but wouldn't it be useful to have an alternative when you know what you are doing? I mean if you deliberately write a bool operator in your class, I guess it is probably because you want your class to behave differently and it means that the conversion to bool is well defined as well.


I don't know maybe in this case adding an opBool to the language would make more sense?

In Topic: Global variables and const argument by reference.

01 March 2014 - 03:09 AM

Oh my god! You're right!

I'm not sure how I missed that out! Thank you so much!


And thanks for looking into it so quickly!

In Topic: Global variables and const argument by reference.

28 February 2014 - 03:42 AM

I tried the rev 1858 (and the release 2.28.0 & 2.28.1) and unfortunately it doesn't change anything. 


I also tried several combination of asOBJ_APP_CLASS_* without any luck, but I did find that it doesn't reach the assertion failed if the type is declared only as asOBJ_VALUE | asOBJ_POD.


I tried to make a test as short as possible that still make the application crash:

    // Register the class itself
    r = engine->RegisterObjectType( "Vec2f", sizeof(Vec2f_), asOBJ_VALUE | asOBJ_APP_CLASS_CDAK ); assert( r >= 0 );
    // Vec2f()
    r = engine->RegisterObjectBehaviour( "Vec2f", asBEHAVE_CONSTRUCT, "void f()",
                                        asCALL_CDECL_OBJLAST); assert( r >= 0 );
    // Vec2f( const Vec2f& src )
    r = engine->RegisterObjectBehaviour( "Vec2f", asBEHAVE_CONSTRUCT, "void f(const Vec2f &in )",
                                        asCALL_CDECL_OBJLAST); assert( r >= 0 );
    // ~Vec2f()
    r = engine->RegisterObjectBehaviour("Vec2f", asBEHAVE_DESTRUCT, "void f()",
                                        asCALL_CDECL_OBJLAST); assert( r >= 0 );
    // Vec2f& operator=( const Vec2f& rhs )
    r = engine->RegisterObjectMethod("Vec2f", "Vec2f opAssign(const Vec2f &in)",
                                     asCALL_CDECL_OBJLAST); assert( r >= 0 );

I replaced the original Vec2f class by a dummy one just to be sure (the original class contains all the functions registered above):

class Vec2f_ {

And here's the script:

Vec2f t;

void main(){
    test( t );

void test( const Vec2f &in v ){}

The "as::BindingHelper" above is using the exact same code as the class helper that you can find on the wiki.


Here's the full callstack if it's of any help:



In Topic: Crash in CallCDeclFunction*/asm __volatile__ on MacOS 32-bit and not in 64-bit

27 February 2014 - 03:59 PM

Sorry for the late reply Andreas!


I finally ended up switching back to 64-bit.


I was talking about posting this to cinder forum to have people test it, just to make sure I didn't do something wrong. But as it seems to be really low level related it might be more on the compiler/xcode side... 


If you still want to access my machine, I'll be happy to find a way to do that. I can give you my email address so we can figure out how to do it.


Thanks for the help anyway!

In Topic: Crash in CallCDeclFunction*/asm __volatile__ on MacOS 32-bit and not in 64-bit

17 February 2014 - 04:32 AM

Hi Andreas,


I'm afraid asm/misaligned stack/... goes a bit beyond my understanding.

I uploaded a series of screenshots showing a few more steps and some values, but as I'm not sure what I'm looking for I don't know if it's any helpful.


On the other hand what I can do is ask for some feedback on libcinder forum and try to make some people test the xcode project. Just to make sure I'm not crazy and because it might be easier to find people with the same platform/frameworks/libraries over there.


Let me know if there's something I could do.


Thanks again!