Page 2 of 5

Re: Love2d stops running after awhile

Posted: Sun Dec 20, 2020 1:36 am
by zorg
Nixola wrote: Sat Dec 19, 2020 10:43 pm Note that the love.lowmemory callback exists and is designed for this kind of issue, if memory is to blame.
Callback function triggered when the system is running out of memory on mobile devices.
Unless the wiki's wrong, it won't work on desktop.

Re: Love2d stops running after awhile

Posted: Sun Dec 20, 2020 7:42 am
by Gunroar:Cannon()
Wow, thnx for all the useful replies. I checked back it didn't seem to affect the multiplayer aspect anymore. Must have been a different problem.
zorg wrote: Sun Dec 20, 2020 1:36 am
Nixola wrote: Sat Dec 19, 2020 10:43 pm Note that the love.lowmemory callback exists and is designed for this kind of issue, if memory is to blame.
Callback function triggered when the system is running out of memory on mobile devices.
Unless the wiki's wrong, it won't work on desktop.
Oh that's fine as it's a mobile game I'm designing.

But sometimes if I collectgarbage("collect") multiple times(and it does have an effect, lowering 200 or so mb to 123) the game still closes(and at an fps of 4 :P). So a few more questions if you may...
1)can it overwhelm the system and crash??
2)If it manages to still collect a large amount of data does it still have a memory leak???
3)Is there any other reason a love2d game may just close on android besides due to memory(since love.lowmemory doesn't seemed to be called)????
At this point I feel like quitting but I've worked on it for so long and got past many hurdles but this. Also when I call collectgarbage on love.lowmemory it still crashes ... anymore thoughts? I'm stuck.
PS: If ran long enough it closes on the tablet too.

Re: Love2d stops running after awhile

Posted: Wed Dec 23, 2020 5:30 pm
by Gunroar:Cannon()
Helloooooooooooooooooo...? I'm still stuck and I have a feeling the problem isn't from memory...

Re: Love2d stops running after awhile

Posted: Wed Dec 23, 2020 6:56 pm
by MrFariator
You haven't posted code or any additional information that might help solving the issue, so there isn't much to say. If you don't want to share your project or relevant snippets, you can disable most of the game's logic code (by commenting them out in love.update or wherever else), and then step-by-step enable behavior and see when the issues crop up again. That should help you along with narrowing down the issue.

However, on collectcarbage("collect"), yes, it will affect your performance, because you're not really encouraged to run it too often. Calling it won't magically fix a memory leak, because that memory might still be referenced somewhere, and thus prevent gc from collecting it.

Re: Love2d stops running after awhile

Posted: Wed Dec 23, 2020 11:38 pm
by Gunroar:Cannon()
Thnxks for the reply, though how about my other non-game specific questions (No.2 and , especially, 3). I can't post my code, not because I don't want to but the browser I'm using is oldish. It took me forever to sign up. (Can't change it due to lack of data, the browser gives me data for free). And I can't type it cause it's too...looooong.
So ...
2)If it manages to still collect a large amount of data does it still have a memory leak???
Even when I don't call it manually the count goes to 200 then 130 then 250 then back to 130mb. Does it still have a memory leak since the numbers are do far apart?

3)Is there any other reason a love2d game may just close( on android) besides due to memory(since love.lowmemory doesn't seemed to be called at all before it closes)????

Re: Love2d stops running after awhile

Posted: Thu Dec 24, 2020 1:41 am
by pgimeno
(2) If the lowest count does not get bigger and bigger, you don't have a leak.

(3) The only other reason for closing that I can think of, is that you're triggering a bug that causes a segfault or some other kind of crash. I doubt it, though.

Re: Love2d stops running after awhile

Posted: Thu Dec 24, 2020 6:50 am
by Gunroar:Cannon()
Edited:
hmmm...thnks, I guess. I guess I have no choice to post my wonderful (i.e Messy) source code. But before that I'll try a few things which I will post if it they work. So be watching for when I post an answer or the .love file. Though it's android based.

Re: Love2d stops running after awhile

Posted: Thu Dec 24, 2020 10:40 am
by pgimeno
Gunroar:Cannon() wrote: Wed Dec 23, 2020 11:38 pm Thnxks for the reply, though how about my other non-game specific questions (No.2 and , especially, 3). I can't post my code, not because I don't want to but the browser I'm using is oldish.
That shouldn't be an impediment, unless "oldish" means a Netscape version that precedes the time of the invention of file fields in forms, but I doubt it. phpBB surely pre-dates that browser.

Try with JavaScript disabled, it works for me. This is the view I get with JS disabled:
PostForm-attach.png
PostForm-attach.png (24.67 KiB) Viewed 7007 times
Click "Browse" to select the file, then "Add the file" to attach it, then "Submit" to post the message with the file attached. I've highlighted these buttons above.

Some people have reported that they need to use a .zip extension or it won't work for them, so you can try that too if you still have trouble.

Re: Love2d stops running after awhile

Posted: Thu Dec 24, 2020 6:43 pm
by Gunroar:Cannon()
Haha, thnx. I bet it will work when/if I try, though I might not need to post the code :P.

Re: Love2d stops running after awhile

Posted: Sat Dec 26, 2020 2:58 pm
by Gunroar:Cannon()
Hey!Hey!Hey!...I was thinking, before I try anything rash, can a low fps(like 1 or ... 0) cause the app to crash/exit?
Because when I test it it freezes for awhile before exiting.
Thnx in advance.