Jump to content

  • Log In with Google      Sign In   
  • Create Account

#Actualandrew1b

Posted 07 December 2012 - 03:45 PM

I'm having a crash after I upgraded from AngelScript 2.22 to the latest version 2.25.2. It happens on line 3240 of as_scriptengine.cpp:

[source lang="cpp"]asCScriptFunction *asCScriptEngine::GenerateTemplateFactoryStub(asCObjectType *templateType, asCObjectType *ot, int factoryId){ ... ... ... ... // Tell the virtual machine not to clean up the object on exception func->dontCleanUpOnException = true; func->JITCompile(); // it crashes right here according to xcode return func;}[/source]

The error message is EXC_BAD_ACCESS

I'm using Xcode on a Cocoa application.

I'm using the standard scriptbuilder add-on (from the latest version as well) and the crash happens during module building. I'm using the latest array add-on too.

One thing I noticed is that it only happens if I define AS_MAX_PORTABILITY, otherwise the crash won't happen (though most of my code still won't work but there's a great chance this is my bad, probably because all my code was made to run on MAX_PORTABILITY environment).

I'm running a very minimalistic script in order to make it clearer to debug the crash, which is:
[source lang="java"]void main(){ LoadScene("empty"); Foo[] foo;}class Foo{ int a;}[/source]
I have reproduced this crash on other situations and I'm pretty sure it is the array declaration that causes this crash (if I comment it out, no crash happens).

However, when I declare variations of this array type, behavior changes:

Foo@[] foo; // doesn't crash
Foo@[]@ foo; // doesn't crash
Foo[]@ foo; // crashes

I hope I could give enough details. Has anyone experienced anything similar?

#2andrew1b

Posted 07 December 2012 - 03:44 PM

I'm having a crash after I upgraded from AngelScript 2.22 to the latest version 2.25.2. It happens on line 3240 of as_scriptengine.cpp:
[source lang="cpp"]// internalasCScriptFunction *asCScriptEngine::GenerateTemplateFactoryStub(asCObjectType *templateType, asCObjectType *ot, int factoryId){............ // Tell the virtual machine not to clean up the object on exception func->dontCleanUpOnException = true; func->JITCompile(); // it crashes right here according to xcode return func;}[/source]
The error message is EXC_BAD_ACCESS

I'm using Xcode on a Cocoa application.

I'm using the standard scriptbuilder add-on (from the latest version as well) and the crash happens during module building. I'm using the latest array add-on too.

One thing I noticed is that it only happens if I define AS_MAX_PORTABILITY, otherwise the crash won't happen (though most of my code still won't work but there's a great chance this is my bad, probably because all my code was made to run on MAX_PORTABILITY environment).

I'm running a very minimalistic script in order to make it clearer to debug the crash, which is:
[source lang="java"]void main(){ LoadScene("empty"); Foo[] foo;}class Foo{ int a;}[/source]
I have reproduced this crash on other situations and I'm pretty sure it is the array declaration that causes this crash (if I comment it out, no crash happens).

However, when I declare variations of this array type, behavior changes:

Foo@[] foo; // doesn't crash
Foo@[]@ foo; // doesn't crash
Foo[]@ foo; // crashes

I hope I could give enough details. Has anyone experienced anything similar?

#1andrew1b

Posted 07 December 2012 - 03:42 PM

I'm having a crash after upgrading from AngelScript 2.22 to the latest version 2.25.2. It happens on line 3240 of as_scriptengine.cpp:
[source lang="cpp"]// internalasCScriptFunction *asCScriptEngine::GenerateTemplateFactoryStub(asCObjectType *templateType, asCObjectType *ot, int factoryId)... // Tell the virtual machine not to clean up the object on exception func->dontCleanUpOnException = true; func->JITCompile(); return func;}[/source]
The error message is EXC_BAD_ACCESS

I'm using Xcode on a Cocoa application.

I'm using the standard scriptbuilder add-on (from the latest version as well) and the crash happens during module building. I'm using the latest array add-on too.

One thing I noticed is that it only happens if I define AS_MAX_PORTABILITY, otherwise the crash won't happen (though most of my code still won't work but there's a great chance this is my bad, probably because all my code was made to run on MAX_PORTABILITY environment).

I'm running a very minimalistic script in order to make it clearer to debug the crash, which is:
[source lang="java"]void main(){ LoadScene("empty"); Foo[] foo;}class Foo{ int a;}[/source]
I have reproduced this crash on other situations and I'm pretty sure it is the array declaration that causes this crash (if I comment it out, no crash happens).

However, when I declare variations of this array type, behavior changes:

Foo@[] foo; // doesn't crash
Foo@[]@ foo; // doesn't crash
Foo[]@ foo; // crashes

I hope I could give enough details. Has anyone experienced anything similar?

PARTNERS