Page 1 of 1

Continously memory occupation grow

Posted: 08 Mar 2011, 17:44
by magomigo
Hi everyone,
after a week full of trouble looking for memory leaks in my application I decided to post here cause the last test I did...

what's the problem? ...well memory continously grows till everything die, slowly but it grows...

I'll explain better... I've worte a Unity3D game based on several levels in witch I use smartfox server 2X to handle multiples users.
What is happening? well the game was crashing after a few level changes.
So I started serching for unreleased objects ...and I found out tha Unity has a "little" problem with memory release in scene load ( this happened to several people, just google for it... ) Patched! ...but the problem still remain, so I checked out all my code ( I use assets bundles for the resources ) and fixed all the possible point causing the problem and also release all unused bundles just to be sure...
...nothing... the problem is still there ...memory still grows up.

So I started removing parts, and levels till I remain with the startup scene.
In this startup scene, I've got an object marked to be persistent in level changes which contain my global managers (static classes or singletons) and nothing else.
What I found? ...that in the network manager class (the one which uses smartfox, connect correctly ...no problem at all with that ) ...In the fixedUpdate i call " smartFox.ProcessEvents(); " nothing strange ...well yes but if I remove that line of code ...my problem with memory grow go away! So that line cause the problem! ...but now I've got another problem... I cannot delete it ..or nothing related to smartfox work!

Another thing, I'm using a particular DLL ( apparently different from the one bundled with SMS 2X framework for unity ) from Thomas Lund which support accented characters in messages.

Could be something related to that particular DLL the problem, sincerely I don't remember if the problem existed also with the standard one.

So if anyone can help me...thanks a lot!
Thomas I thank you in advance :)

Davide

Posted: 09 Mar 2011, 12:01
by ThomasLund
I'll take a look within the next days. Not run into this myself, but not looked too closely either at memory usage to be honest.

It will most likely not make it for the upcoming rc release. Just FYI

/T

Posted: 10 Mar 2011, 13:28
by magomigo
Hi Thomas,
I want to say thanks to you and tell you that I found the solution for my problem.

It wan't anything related to SFS 2X, the memory stopped growing after several minutes ...and doing other test I discovered the problem was related to pathfinding subsystem which didn't release properly the resources.

So many thanks again!
Davide

Posted: 10 Mar 2011, 16:43
by ThomasLund
Super duper!

Thanks for replying back.

/Thomas