Odd bug

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
LSD
Prole
Posts: 3
Joined: Wed May 07, 2008 11:35 pm

Odd bug

Post 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.
LSD
Prole
Posts: 3
Joined: Wed May 07, 2008 11:35 pm

Re: Odd bug

Post 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.
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Odd bug

Post 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.
User avatar
Merkoth
Party member
Posts: 186
Joined: Mon Feb 04, 2008 11:43 pm
Location: Buenos Aires, Argentina

Re: Odd bug

Post 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.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 3 guests