🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

AngelScript 2.6.0 released

Started by
29 comments, last by mandrav 18 years, 2 months ago
I'm using the Pro edition but as you said, it shouldn't make a difference in terms of compiled code.

I'm using the statically linked version of AS so it should be using the application's heap. I'm also compiling with no optimisations.

I've yet to register the line callback. I'll try that out and see if I can pinpoint the problem with more accuracy.
tIDE Tile Map Editorhttp://tide.codeplex.com
Advertisement
I set up a line callback function but it didn't give me any more information - it simply triggered whenever I invoked a script function. I did try placing breakpoints on the wrapper functions and Point class methods however, and those seem to indicate to a temporary variable getting deleted - the references of the input arguments and the return argument all had their references > 0 at the time the rogue pointer deletion occured so it appears to be a copy of the arguments or the result that AS is trying to delete.
tIDE Tile Map Editorhttp://tide.codeplex.com
Does the express edition offer link time code generation? If not, that would be a large difference in code generation.
Yes, the express edition supports link time code generation.

SharkBait, you may actually want to verify that option. Perhaps turning it on or off affects the results of your application?

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

Link Time Code Generation was not enabled (Default). I tried the other options but I couldn't even compile as I am not using code profiling.

Anyway, AS 2.5.0 worked fine with VS 2005 with the compiler/linker configuration unchanged.

But nevermined, I just figured out a solution! You did in fact hint at it when you asked me if I was running AS in a DLL. Although I was and am still running AS statically within the same executable I actually found out that the alloc and free functions used by AS where somehow different from those used by the main exe.. or at least, the 'delete' operation had an implementation incompatible with that of 'free' used by AS.

So I used the engine method SetCommonObjectMemoryFunctions through my wrapper API and passed on pointers to 'malloc' and 'free' as seen from my exe's scope, and it worked! :)

Coincidentally, I recall asking for this functionality a while back.. although what I had in mind was the possiblity of allowing the user to replace the standard functions with more performant versions or with tracing built in. Ironically, this also turned out as a solution to my problem!

Thanks for your assistance ( and for implementing that function :) )


[Edited by - SharkBait on April 29, 2006 7:54:30 AM]
tIDE Tile Map Editorhttp://tide.codeplex.com
I'm happy that you were able to solve the problem. :D

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

ahh, i did not know that function was there. That is good news as I too have had those problems when using a DLL. Objects new'd w/ .exe version and deleted with .DLL function always crashed me.
Which is exactly why I added that possibility. :)

You can do it on a per-object level as well by registering the asBEHAVE_ALLOC and asBEHAVE_FREE behaviours. This can be useful for those objects that use a different memory manager, for example a memory pool.

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

Hey guys, I'd like to know how the 'port' for OS X is coming along? I don't know till how far AS is usable in OS X but I have to following error. When ever I even try to build a script AS seems to seg.
I compiled with AS_MAX_PORTABILITY on and changed asUINT to long and asDWORD to long due to that I won't beable to compile as size_t is long rather then int on OS X.

The error seems to be on line 1031 in as_context.cpp, I quote:
Quote:
switch( *(asBYTE*)l_bc )
{
//--------------
// memory access functions
case BC_POP:
l_sp += WORDARG0(l_bc);
l_bc++;
break;

I'm not an expert but the way I see it is that it expects more expressions while there aren't any left. I wonder if this is because I changed the types (Yes, I know that it's VERY ugly, but it seems to compile atleast ;-)).

Also I read in one of the previous posts about the asm code for ppc... it's a little bit old and I'd like to know what the progress is this far?
We're using AS in a future game engine and we'd like to use AS. I'm the OS X maintainer and script maintainer, so I'm really curious about any progress whatsoever.

Kind regards,
Jeffrey
Hmm, as far as I know AngelScript is working on Mac OS X with AS_MAX_PORTABILITY on. It could be that the latest changes has broken that (though I hope not).

What is the size of size_t on your platform? And what is the size of long? If the size of long and int is different then that is why you're getting segmentation error.

If you're compiling for a 64 bit platform you also need to define the AS_64BIT_PTR.

I'll create another typedef to use instead of size_t, because it seems that it is not always correct on the various compilers out there.

Unfortunately I haven't heard more from the developer that said he was working on the PPC port, so I can't say anything about when it will be available. I just received a MIPS port (PS2, PSP) though from Manu Evans, and he said that he might give PPC a try as well. I'm hopeful that it will be available soon, but since I'm not the one doing it I cannot give any guarantees.

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

This topic is closed to new replies.

Advertisement