Advertisement

Bug in Version 2.14.0

Started by October 20, 2008 11:42 AM
12 comments, last by BornToCode 16 years ago
My game use to work with the 2.13.0 fine. Today i updated to 2.14.0 and now every time i exit the game, angelscript crash in the file asthread.cpp. This is the function it is bombing on. void asCThreadCriticalSection::Enter() { #if defined AS_POSIX_THREADS pthread_mutex_lock(&criticalSection); #elif defined AS_WINDOWS_THREADS EnterCriticalSection(&criticalSection); #endif } The error is saying some memory could be corrupted.
What system are you running? What compiler are you using?

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 am running on Windows XP and i am using Visual Studio 2005
Are you by any chance using 64bit WinXP? If you are, could you check if the AS_64BIT_PTR got defined by as_config.h. You can check this by calling the function asGetLibraryOptions(), it should contain the string "AS_64BIT_PTR".

Anyway, you can turn off multithreading support by compiling the library with the preprocessor word AS_NO_THREADS defined. At least until I can figure out what's going on.

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 am using 32 bit winxp
At work I use WinXP 32bit as well, and I haven't noticed any problems. Of course, here we still use MSVC6, so it's possible that it is a problem with compiler compatibility.

Have you tried the latest version of AS from the SVN?

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 will investigate it alot more when i get home. It could be me that is doing something wrong. Because it does not crash while i am running the game. It only crash when i exit the game.
By turning threading off, everything works ok now. But i really do not like the fact i have to turn threading off.
Neither do I. I still need to figure out why the multithreading support doesn't work for you.

Can you give me some more information on the error?

- show me the call stack for when the error occurs so I can see at what moment the problem occurs.

- show the value of the 'this' pointer in this method, and also in the caller. This usually shows if the object itself has been corrupted before the call.

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

Have you tried running the samples that come with the SDK? Do they also crash upon exit?

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