Forums » Bugs

potential memory leak

Apr 09, 2010 willgott link
Mismatched free() / delete / delete []
at 0x4C23AEA: operator delete(void*) (vg_replace_malloc.c:346)

Address 0x207b90c0 is 0 bytes inside a block of size 262,207 alloc'd
at 0x4C24654: operator new[](unsigned long) (vg_replace_malloc.c:264)

Should give you guys a good hint.
Apr 09, 2010 Spedy link
Are you using any plugins? Targetless has a small memory leak when the stored asteroid list becomes large.
Apr 09, 2010 willgott link
Yes I do use targetless, but that was a basic run with valgrind. I stopped execution after I got to the login screen. Oh I forgot, it's the x86_64 Linux version.

There are more issues. I can provide a full valgrind log, if you like.
Apr 09, 2010 raybondo link
Not really useful information. Lua 'memory leaks' won't show up in valgrind because lua is a garbage-collecting language. Other instances of memory leaks could actually be in your OS drivers, such as your OpenGL driver or sound driver.
Apr 10, 2010 look... no hands link
I have noticed in the fairly recent past, (year or so) that if i leave vendetta open for a couple days it will end up using as much as 650mb of ram (from a baseline of ~250ish for me). I dunno where the leak is, id blame my hardware(one memeory stick going wonkey), but it is there.

Any suggestions as to how i can fix the issue if replacement ram dosent fix it?
Apr 10, 2010 look... no hands link
I have noticed in the fairly recent past, (year or so) that if i leave vendetta open for a couple days it will end up using as much as 650mb of ram (from a baseline of ~250ish for me). I dunno where the leak is, id blame my hardware(one memeory stick going wonkey), but it is there.

Any suggestions as to how i can fix the issue if replacement ram dosent fix it?
Apr 10, 2010 incarnate link
A certain part of that isn't even "leaking", but rather the nature of how the game uses content assets.

When the client is started, we load a list of "critical" art assets so the sector-load time isn't totally annoying for the player, and so they can see the UI. Stuff like the basic ships, the effects, certain station textures. This is really a minimal number of overall textures, as is evidence by the greatly increased load time if you turn on the option "pre-load all textures on startup".

Assuming you don't have all textures being pre-loaded, you'll begin with a relatively small footprint. If you then sit in some sector where traffic occurs (Odia M14, or whatever, some station sector), people will be flying in and out of there, occasionally causing you to load art assets you didn't previously have loaded. This will gradually increase your memory footprint.

Now, 250MB to 650MB probably has more going on than just the art asset memory usage.. there's probably also a leak in there. For starters, make sure you remove all plugins, scripts and personal lua code.

Or, you could turn on "pre-load all textures", get an idea of how big it is to begin with, and leave it running for a couple of days (again, without plugins, scripts or personal lua code).