2016-09-11

Leaky

So I'm dealing with a memory leak with FUBS that's been reported by a few people. The issue happens after the game runs for a while, and it can cause the memory taken up by the executable to balloon into gigabytes. I believe the problem happens on Windows and Mac, but I'm uncertain about Linux.

Honestly I'm struggling to find the root cause of the leak. FUBS is built with Unity and is coded in C#. C# is a memory managed language, meaning that the work of allocating and deleting objects isn't done manually by the coder, but instead it is handled automatically by a garbage collector at run time. Even though there is a hands off approach to memory, I believe problems can still happen with data types, object ownership, and other stuffs.

Up until now I haven't done any specific work with the performance of the game. I felt pretty safe in the fact that it's just a text game, and haven't given much thought to things beyond limits with text UI elements in Unity's UI system. There are some crazy things happening when the source of the game is loaded in, but that should only hiccup when loading happens. I've become too comfortable in my programming, thinking that I'd never have to deal with memory leaks. And sorting this issue out is taking up far more time than I'd like, so I'm a bit frustrated by it.

At this point I'll probably have to set the leak aside to focus on fixing bugs within the game logic, typos, and other things that have been pointed out. Coding feels like an amazing time sink in comparison to the stuff I'd like to be doing, like writing more scenes, tweaking Randos, etc. I suppose it's the cost of writing my own system, so I'll have to pay it.

No comments:

Post a Comment