Severe memory leak upon rendering player
Posted: Sat Feb 29, 2020 5:53 am
OH NO! Its the EVIL Mario sprite OF DOOM!, long story short, rendering mario sprite on my raspberry pi causes mysterious freezing, then find out on windows that its a memory leak, a memory leak so severe that it jumped from around 70MB of ram usage to 4GB of ram, nearly choking all the free memory i have, reigning it's unholy wrath down on my poor innocent computer with the fury of a thousand gods. I dont know how to fix this and i have looked at similar cases with no luck . The .love is attached below (it is bundled with the memory leak so be careful and dont let it dissintegrate your ram)
Navigation around the project:
main.lua simply loads in the game, because its also possible to launch a crappy chunk editor by running it on the command line via "-editor"
game.lua the actual game file
Assets_Scripts/TilesetLoader.lua not the problem, but it is responsible for slicing tilesets (including mario sprite) into tiles
Assets_Scripts/AnimatedDrawables.lua still not the problem but also slices images up tileset-style, but for animation
Assets_Images/Mario.png the mario sprite being sliced
Mario.png gets sliced at game.lua:58
Mario gets rendered at game.lua:381
Navigation around the project:
main.lua simply loads in the game, because its also possible to launch a crappy chunk editor by running it on the command line via "-editor"
game.lua the actual game file
Assets_Scripts/TilesetLoader.lua not the problem, but it is responsible for slicing tilesets (including mario sprite) into tiles
Assets_Scripts/AnimatedDrawables.lua still not the problem but also slices images up tileset-style, but for animation
Assets_Images/Mario.png the mario sprite being sliced
Mario.png gets sliced at game.lua:58
Mario gets rendered at game.lua:381