Page 1 of 1

Odd bug

Posted: Wed May 07, 2008 11:38 pm
by LSD
Okay, so I was wondering if there were any console commands for LOVE, so I got into a command prompt and did: love.exe -h

I thought nothing happend at first, but if you ctrl - alt - del. love.exe is running and constantly using lots of CPU!

Just thought I'd let you guys know.

Re: Odd bug

Posted: Wed May 07, 2008 11:41 pm
by LSD
Another thing, if you monitor the ram usage for love.exe its constantly climbing slowly,

I ran love.exe without any game and it was sitting at the "no game" screen but the memory usage kept climbing.

Re: Odd bug

Posted: Thu May 08, 2008 2:42 pm
by rude
Memory:
Lua will constantly allocate memory for local variables and stuff, if you watch the memory usage a while, you'll see that memory is freed now and then too (hopefully). This happens when Lua runs the garbage collector (the garbage collector is only run when Lua "feels like it"). This will also happen with "No Game", because it is actually written in Lua.

That said, there could of course be actual memory leaks introduced by us in addition to this.

CPU:
There are no console commands, sorry. I have no idea what love.exe -h does, but love generally uses all the CPU it can get (by default). If you want to be nice to the CPU, use love.timer.sleep.

Re: Odd bug

Posted: Sat May 10, 2008 4:44 am
by Merkoth
Isn't love -h supposed to look for -h game and die gracefully when it doesn't find it?

And yes, last time I checked out, love was in fact leaking some memory (valgrind ftw!), nothing critical, but maybe you should try to track down those leaks (I'm almost sure most of them will come from external libs, though). I also noticed that lua is kind of lazy when it comes to collect garbage, maybe decreasing the garbage collection "step" (can't remember if lua called it like that) can help solve those issues.