Gonan Posted January 3, 2015 Share Posted January 3, 2015 http://www.leadwerks.com/werkspace/topic/11458-maxcharacterstest/ Hi Josh, I've been having a problem with my game crashing, after reloading a map, or sequence of maps. After creating a couple of demos, of the problem, the community (Thanks nick.ace) has found a cool work around. See Link above. This involves replacing in App.Lua self.world:Clear() with self.world:Release() self.world=World:Create() and a creating a new world to load the next map into. This work around means I am no longer restricted to 3 or 4 levels when writing my game. Whilst the issue may be in my code, you may find that world:Clear() leaves something behind, or doesn't reset something. I will use the work around until a permanent fix is found. Thanks 1 Link to comment Share on other sites More sharing options...
Josh Posted January 3, 2015 Share Posted January 3, 2015 Thanks for the info! My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
marchingcubes Posted January 4, 2015 Share Posted January 4, 2015 I have noticed sound sources continue to play after World:Clear() without the above workaround. perhaps this is the source of the leak? Link to comment Share on other sites More sharing options...
Josh Posted January 6, 2015 Share Posted January 6, 2015 Sound sources don't have anything to do with the world, so it is possible they may continue playing. My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted January 6, 2015 Share Posted January 6, 2015 This is going to be a very difficult problem to solve, but something is wrong. My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted January 6, 2015 Share Posted January 6, 2015 Well, when any entity's physics mode is set to character controller, there is a mem leak. I believe this is the cause... My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Gonan Posted January 6, 2015 Author Share Posted January 6, 2015 I had got to that point too, by not having any scripts attached, and then turning off the character controller, making it rigid physics, and found the crash no longer happened. But it was eliminating too much of the problem's characteristics to be useful to debug further. It brought back memories of algebra from 40 years ago, when I would work out 0 == 0 Link to comment Share on other sites More sharing options...
Josh Posted January 6, 2015 Share Posted January 6, 2015 Okay, I fixed not one, not two, but THREE memory leaks. Not sure if I should be bragging about this, but I am running a full build now... 3 My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Gonan Posted January 6, 2015 Author Share Posted January 6, 2015 did you get the one for Map:Load where a handle leaks 1 per reload? Link to comment Share on other sites More sharing options...
Josh Posted January 6, 2015 Share Posted January 6, 2015 I don't know but my fixes are now available on the beta branch. I believe this solves your problem. My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts