🎉 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!

Multithreading issue

Started by
0 comments, last by WitchLord 15 years, 7 months 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
Advertisement
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