Advertisement

Multithreading issue

Started by November 19, 2008 03:37 AM
0 comments, last by WitchLord 16 years ago
Hi, I've encountered a problem in asCMemoryMgr while using AngleScript in different threads. In one thread I run asCScriptEngine::ExecuteString() while an other thread calls asCScriptEngine::GetTypeIDByDecl(). The latter thread sometimes causes a segmentation fault in asCMemoryMgr::FreeScriptNode(), because asCScriptEngine::ExecuteString() calls asCMemoryMgr::FreeUnusedMemory(). This leads to simultanous access to the scriptNodePool member. I added a critical section in every asCMemoryMgr method that accesses scriptNodePool. That seems to fix the problem. If you'd like to have the changes i can mail them to you. Regards, Tim
Yes, please send the changes to me.

Multithreading is always difficult to test, so any help in this area is always welcome.

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