Jessecar96 / SteamBot

Automated bot software for interacting with Steam Trade
http://scrap.tf
MIT License
1.33k stars 911 forks source link

Mobile Memory Leak #12

Closed rannmann closed 11 years ago

rannmann commented 12 years ago

Keep an eye on this issue for more information: https://bitbucket.org/VoiDeD/steamre/issue/28/memory-leak-in-steamfriends

Summary

If someone on the bot's friend's list is connected from a mobile device, an infinite number of SteamFriends+PersonaStateCallback objects are created, leading to massive memory leaks (I clocked it around 25MB/minute).

rannmann commented 12 years ago

It seems to not be a leak within SteamKit2, but rather SteamBot. From what I can tell, it is this function which is negatively affected by some mobile clients:

        public void Update()
        {
            while (true)
            {
                CallbackMsg msg = steamClient.GetCallback(true);

                if (msg == null)
                    break;

                HandleSteamMessage(msg);

            }

I'm still working on gathering the client information from users who cause this issue. I have included links to both user profiles which have caused memory leaks if any of you wanted to test the issue yourselves. http://steamcommunity.com/profiles/76561198044264888/ http://steamcommunity.com/profiles/76561197970501137/

I cannot replicate this on a Galaxy Tab running Steam 1.0.6, but a user of one of the above profiles was using a Galaxy S3 with 1.0.6.

rannmann commented 12 years ago

It seems the other user was using an iPhone with the latest version of Steam installed on it.

Philipp15b commented 11 years ago

Is this still an issue? Maybe this was fixed with #21?

rannmann commented 11 years ago

I'm not sure. I currently don't have the means to test right now.

rannmann commented 11 years ago

Didn't mean to hit close. Derp.