Advertisement

AngelScript 2.20.1 is released

Started by December 10, 2010 06:29 PM
30 comments, last by WitchLord 13 years, 8 months ago
Using r779, there still seems to be problems, sorry to bother you. I have a quite large script code base and I would like to avoid rewriting it as much as possible.

This line gives "Null pointer access" :
Vector2 targetAnchor = _cameraDef[Level.cameraID - 1]._targetCameraWeight <= 0.0f ? Vector2(Level.camera.lookAt) : _cameraDef[Level.cameraID - 1]._targetCameraAncor;
(Also, the cast to Vector2 is there in the first place to avoid "Both sides of the expression must be of the same type".)

However, this equivalent code is fine (when placed at the same line in the same file) :
Vector2 targetAnchor;
if (_cameraDef[Level.cameraID - 1]._targetCameraWeight <= 0.0f)
{
targetAnchor = Vector2(Level.camera.lookAt);
}
else
{
targetAnchor = _cameraDef[Level.cameraID - 1]._targetCameraAncor;
}


Remi Gillig
I'll look into it.

Aparently my test cases aren't covering enough situations to catch these problems. But it's good that you're able to isolate the problems so that I can fix them quickly and make them part of my test cases for future changes.

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

Advertisement
I've fixed this in revision 780.

Please don't hesitate to let me know if you find other problems.

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

It does not seem to crash anymore but all my scripted events are not called anymore which is a little bit annoying. I'll get back when I have more information.

Thanks for all the fixes so far, you've been really helpful :)

EDIT : I forgot to say that my events are called on PC but not on PS3 actually, they were fine with 2.20.0

EDIT : Okay nevermind, mistake from my side here, you can't declare parameters as passed by value on PS3, I forgot that some days ago when I added some script functions, everything seems to work perfectly. Thanks for everything ;)
Thanks for confirming the fixes. And thanks for providing useful bug reports, it really helps in identifying the bugs and fixes.

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 just found a small bug with the std::string addon :
string s = "hello";

for (int i = 0; i < 10; ++i)
{
print(s + i + "\n");
}


This outputs :
hello0
hello01
hello012
hello0123
hello01234
hello012345
hello0123456
hello01234567
hello012345678
hello0123456789
Advertisement
Fixed in revision 781. Thanks.

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

Thanks a lot :)
Hello,

It's me again and I have a new bug. We compile on a new platform which is Xbox 360 and it crashes.

Here is the as_content.cpp (line 2371) part :
case asBC_WRTV1:
// The pointer in the register points to a byte, and *(l_fp - offset) too
**(asBYTE**)&regs.valueRegister = *(asBYTE*)(l_fp - asBC_SWORDARG0(l_bc));
l_bc++;
break;


The script part :
class ArrayOf
{
bool[] _boolList;
int _numOfStockedObject;
ArrayOf(int arraySizeMax)
{
_boolList.resize(arraySizeMax);
_numOfStockedObject = 0;
for(int i = 0; i < arraySizeMax; ++i)
{
_boolList = false;
}
}
}


It's the line inside the "for" that seems to crash (this is the last one in the line callback).

The compiler options : AS_XBOX360 AS_XENON (from asGetLibraryOptions).

EDIT : I use revision 781.

Remi Gillig.
It's probably due to the XBOX 360 being a big-endian CPU.

Would it be possible for you to confirm whether the problem happens when compiling with AS_MAX_PORTABILITY, i.e. without using the native calling conventions? That would help narrow determine whether problem is in the as_callfunc_xenon.cpp or not.

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