🎉 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.8.0 Crashes on Linux

Started by
32 comments, last by WitchLord 17 years, 4 months ago
After some more investigation it looks like the crash is isolated to the DELETEARRAY macro.
Advertisement
Interesting. If the DELETEARRAY macro is failing it could only mean that &ptr[0] is not the same as ptr.

Oh well, when I get access to a Linux environment I'll perform some more experiments to understand what's wrong. In the mean time I've added a define AS_NO_USER_ALLOC that can be used to turn off the user defined memory functions. You can get this new version from the SVN (revision 110).

Thanks for helping me figure this out. It's terrible working in the blind, without being able to test it myself.

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

I've made some more adjustments, would it be possible for you to try revision 111 from the SVN? It should work without defining the macro AS_NO_USER_ALLOC.

If it works I'll update version 2.8.0 with these changes so that others won't run into the same problems that you did.

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

Revision #111 works just fine, I haven't gotten time to really test it as I have to leave right now. But I did run through some of my scripts and none of them crashed.

Thanks for all your hard work,
Jeremy
Thanks for confirming that it works. I'll upload a version 2.8.0a with these changes as soon as possible.

Let me know if you find any more errors.

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

No problem, I think the best thing to do at this point is port your tests to Linux. Tonight when I get some time I'll look into doing this as it would be the best method to see if everything works. If I do it I will send you updated source/makefiles if you'd like.
That would be great. It is possible that some need some tweaking. Most of them should be working already though, because I used to test on SF's compile farm before they shut it down.

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

I got some time to work on it, I started with the feature test. I had to make some changes that I can send to you, but I'm getting a failure on two parts of the conversion test:

Line 566:
engine->ExecuteString(0, "ui8 = -12.3f;"); if( ui8 != asBYTE(-12.3f)  ) fail = true;


Line 595:
engine->ExecuteString(0, "ui16 = -12.3f;"); if( ui16 != asWORD(-12.3f)  ) fail = true;


Everything else passes after I defined __int64, and the I64 Constant isn't supported, so I changed it to LL when compiling with GCC.
I also made makefiles and the necessary changes to all of the samples to get them to compile under Linux. I'm not sure if you'd want to include these changes as it does complicate them a bit by adding ifdef's for linux.

You can get them at http://ww2.jeremyh.net/samples.zip, and see if you'd like to use them. I could put all the Linux functions into a separate source file if you'd like. That'd remove one if the ifdefs.

Jeremy
That's really cool. I've wanted to have those samples converted to Linux for quite some time, but I never got around to work on it. I'll definitely include these changes in the sdk.

I think I want to move the platform differences to a separate file in the add_on directory, e.g. utils. That way the samples can concentrate on showing how to use AngelScript instead of this extra code.

It would be great if you could also send me the changes that you had to make to get the test_feature to work.

I'm curious about the failures in the conversion test though. What value are you getting from ui8 and from asBYTE(-12.3f)? This used to work in 2.7.1b, so it has to be related to the changes I made when adding support for the 64bit types.

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