Spring : memory leak?

Spring : memory leak?

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
a1983
Posts: 55
Joined: 02 Dec 2009, 12:01

Spring : memory leak?

Post by a1983 »

I run spring for testing purpose and notice that spring fast eat memory. I build 5 units and even paused game. Also I often reload LuaUI, but it seems that memory leak even if game not started. It eat 3 Gb in 1 hour and crashed. Or may be something wrong in mod?

http://pastebin.com/u49FXXBP
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Spring : memory leak?

Post by Beherith »

Ive never been able to make spring run out of ram, since its limit is 3gb.
Luaui reload can waste a lot of memory with badly written widgets. Especially widgets that load textures and dont unload them in widgethandler:removewidget.

Edit: also, if you have rapidly increasing memory usage while idling a few units, something is wrong with the mod (as BA doesnt have this issue).
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Spring : memory leak?

Post by PicassoCT »

im one of those moddev who has this issue..

Most of the time its something wrong with a gadget..
a1983
Posts: 55
Joined: 02 Dec 2009, 12:01

Re: Spring : memory leak?

Post by a1983 »

I'll try turn off all widgets and run spring again.

If I use gl.Texture, should I unload texture, and what function should be used?

Also, how I can check widget and gadget memory usage?
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Spring : memory leak?

Post by Jools »

There's a widget called "Profiler" that measures widget performance. I think it may have something with memory as well.
a1983
Posts: 55
Joined: 02 Dec 2009, 12:01

Re: Spring : memory leak?

Post by a1983 »

It seems, that widget profiler can work only in unsynced code, and there is absent memory information.

There is gcinfo() func in Lua, but it won't work in synced mode :(
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Spring : memory leak?

Post by Beherith »

/luaui disable turns off luaui
/luarules disable turns off luarules (needs /cheat)

gl.DeleteTexture
a1983
Posts: 55
Joined: 02 Dec 2009, 12:01

Re: Spring : memory leak?

Post by a1983 »

I disable lauui and luarules but it seems that engine itself eat memory, even in paused state. It seems its depend on version ( st or mt ).
Last test was 1 Mb / 10 second on mt version.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Spring : memory leak?

Post by Beherith »

Please submit your report to mantis then. Thanks!
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Spring : memory leak?

Post by PicassoCT »

Its still young and in its growth- it needs the food! When i was that age i ate 3 pizzas a meal and still felt hungry!
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Spring : memory leak?

Post by zerver »

Spring leaks when it is minimized, and MT leaks more than ST in this case. It will be fixed in the next release.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Spring : memory leak?

Post by PicassoCT »

Like all ships we need pumps, to pump spilled memory into other processes memorys. ;)
Post Reply

Return to “Engine”