Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 07 Aug 2012
Offline Last Active Oct 24 2012 02:25 AM

Posts I've Made

In Topic: Bad access in virtual methods (iOS ARM)

20 October 2012 - 01:01 PM

Yes, everything works now. Huge thanks! :)

In Topic: Bad access in virtual methods (iOS ARM)

04 October 2012 - 08:08 AM

I'll review the code to see if I can spot the error. I may need some help from you to run some tests for me in order to have this fixed.

I sent PM to you.

In Topic: Bad access in virtual methods (iOS ARM)

30 September 2012 - 01:17 PM

It not helps. asMETHODPR is wrapper around asSMethodPtr.
I'm still getting crashes when use virtual and pure-virtual methods.

I guess it is memory corruption in arm implementation of angel script. After call of any virtual method which returns my type crash occurs. It occurs either in method itself or further in code.

In Topic: Bad access in virtual methods (iOS ARM)

30 September 2012 - 04:51 AM

Of course.

[source lang="cpp"]int r = engine->RegisterObjectMethod("Derived", "my_type method()",asSMethodPtr<sizeof(void (Derived::*)())>::Convert(&Derived::method),asCALL_THISCALL);assert(r >= 0);[/source]

[source lang="cpp"]int r = engine->RegisterObjectType("my_type", sizeof(my_type), asOBJ_VALUE | asOBJ_APP_CLASS_CDAK);assert(r >= 0);r = engine->RegisterObjectBehaviour("my_type", asBEHAVE_CONSTRUCT, "void f()", asFUNCTION(__construct<my_type>), asCALL_CDECL_OBJLAST);assert(r >= 0);r = engine->RegisterObjectBehaviour("my_type", asBEHAVE_CONSTRUCT, "void f(const my_type &in)", asFUNCTION(__construct_copy<my_type>),asCALL_CDECL_OBJLAST); assert(r >= 0);r = engine->RegisterObjectBehaviour("my_type", asBEHAVE_DESTRUCT, "void f()", asFUNCTION(__destruct<my_type>), asCALL_CDECL_OBJLAST);assert(r >= 0);r = engine->RegisterObjectMethod("my_type", "my_type& opAssign(my_type &in)", asSMethodPtr<sizeof(my_type& (my_type::*)(const my_type&))>::Convert((my_type& (my_type::*)(const my_type&))(&my_type::operator=)), asCALL_THISCALL); assert(r >= 0);[/source]

In Topic: Using const char*

29 August 2012 - 09:48 AM

Big thanks for beautiful support, Andreas!
It works.