Advertisement

Bug with access masks

Started by November 07, 2015 06:27 PM
2 comments, last by Solokiller 8 years, 11 months ago

There's a bug with access masks and certain features of the language.

The default access mask is set to 1 on creation. Right after that, some built-in features are registered, such as delegates.

When you create a module with an access mask that does not include 1, attempting to use any delegate will cause an assert to be hit.

Some code will simply fail to compile, but other code, such as a class constructor will cause a crash instead.

This project (VS2013) shows the problem in question. Running the script will cause a null pointer exception.

https://dl.dropboxusercontent.com/u/46048979/AS_AccessMaskBug2.rar

Working around this requires all modules to share 1 as access, which can interfere with the design of application APIs. I was trying to eliminate 1 as a common mask, and using a combined bitmask instead, which would allow me to use the access mask as a zero based index in some cases.

The documentation on access masks does not mention this, so assume it is indeed a bug.

Yes, this appears to be a bug. I'll investigate it and have it fixed.

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 2256. The access mask now defaults to 0xFFFFFFFF to make sure all built-in functions and types are available to all modules.

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

We've upgraded to the latest SVN version and everything's working great. Good job :)

This topic is closed to new replies.

Advertisement