- edited description
memory problem
Hello.
Thank you for your code and tutorial.
I did following tutorial. but when I typing "/analyze" in the game, the memory error occurred.
Could you tell me how can I solve this problem?
I downloaded BWTAlib_2.2 version, and I worked in "Window7 32bit", "Visual Studio 2013" and "BWAPI_412".
My computer memory is 4GB. Is this code need more memory?
Comments (7)
-
reporter -
reporter - edited description
-
reporter - edited description
-
repo owner The problem you are having is not about your computer memory. It's because is trying to access to an invalid point in the memory. Probably a thread problem (BWTA2.2 is not thread safe). Try to execute BWTA without using threads, i.e. comment this line:
CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)AnalyzeThread, NULL, 0, NULL);
and right after, add this line:
BWTA::analyze();
This will make StarCraft to "freeze" the first time you are analyzing a map.
-
reporter Thank you for your answer.
Although I changed my program as your advice, however same problem occurred...
-
repo owner I need more information to help you.
- Does it happen in all the maps you try or only in a specific one?
- Can you try to use the debug version of BWTA to see the in the Call Stack where exactly the problem occurs?
- Can you share your project (Visual Studio project settings and C++ files)?
-
reporter - It happens in all maps.
-
Sorry. I can't do it well... problem occur in BWTA::analyze() function. * I knew that I can use BWTA::analyze() in the ExampleAIModule::onstart() (Issue#8. Bart van Dooren.) * However if the BWTA::analyze() (without CreateThread) is called in onSendText(), memory error occurred .
-
I use "ExampleAIModule.cpp" of BWAPI 4.1.2.
Thank you for your answer!
- Log in to comment