BWAPI 3837 Bug Fixes - Memory leaks

https://github.com/bwapi/bwapi
TheBlueGnu
Posts: 27
Joined: Fri May 20, 2011 12:34 pm

BWAPI 3837 Bug Fixes - Memory leaks

Postby TheBlueGnu » Tue Aug 09, 2011 11:25 am

I saw in the latest changelog

"Bug Fixes:

Fixed several memory leaks in BWAPI.
"

Would that perchance mean there has been memory leaks in BOTH 3769 (BWAPI 3.6.1) and 3745 (BWAPI 3.6)?

I'd really like to know since it means upgrading might make my mysterious game hanging (hangs for no reason that I can see) disappear.
Heinermann
Posts: 362
Joined: Thu Apr 26, 2007 12:42 am

Postby Heinermann » Tue Aug 09, 2011 5:17 pm

Yes there are leaks in 3.6 and 3.6.1. This does not fix any game hanging bugs. It merely reduces memory usage to the norm so that usage is not accumulated over time. If you run out of memory an error occurs, not a game hang.
TheBlueGnu
Posts: 27
Joined: Fri May 20, 2011 12:34 pm

Postby TheBlueGnu » Thu Aug 11, 2011 6:01 am

[quote name='Heinermann' date='10 August 2011 - 01:17 AM' timestamp='1312910265' post='10333']
Yes there are leaks in 3.6 and 3.6.1. This does not fix any game hanging bugs. It merely reduces memory usage to the norm so that usage is not accumulated over time. If you run out of memory an error occurs, not a game hang.
[/quote]

There's some memory problem there I think though. Reason being, my program ran fine for at least 782 runs of the update method (once every 30 frames) and at some point between starting and hanging (about half way can't remember exactly) I got a norton message saying "high cpu usage".

I then tried it only alowing my bots to make scvs and harvest minerals. This got to 1100+ iterations with at some point past 800 saying "high cpu usage" even though it only made 5 workers and was harvest resources. I decided to see what would happen by asking 1 SCV at the base which had run out of minerals to go to the next. The moment (or shortly after) it saw the next mineral base and the other scvs moved to join, it crashed.

This all seems odd to me as I remember it being able to go to new mineral deposits a long time before without crashing. I'll check my code again, but I can't imagine there being a problem with the get idle scv to harvest method.

Edit:

Well wasn't the make idle harvest method. Although it does only crash when a worker is ordered to harvest from a mineral field, it only seems to crash when asked to harvest from specific mineral fields on the map. Very odd that.

Return to “BWAPI (wrappers in other languages / questions and announcements related to BWAPI itself)”

Who is online

Users browsing this forum: No registered users and 1 guest