Page 1 of 2

"love.exe has stopped working" on Win 7 64 bit

Posted: Sun Jul 14, 2013 3:01 pm
by mydoghasworms
Ola!

I am trying my hand at some love.physics in 0.8.

The attached .love file, when running it, after a while just exits with "love.exe has stopped working". (Use Left and Right keys, Down to stop acceleration).

Now, I see one post on this forum that says that some bug will be fixed in 0.8.1, not sure if it is related, but searching for 0.8.1 shows that this has been merged into 0.9, which is not released yet... :(

Any idea whether the problem with my .love is my coding (I am wondering whether something is wrong with my physics simulation) or is it a problem with Love?
phys.love
(1.38 KiB) Downloaded 186 times

Re: "love.exe has stopped working" on Win 7 64 bit

Posted: Sun Jul 14, 2013 8:19 pm
by kclanc
I reproduced this in love studio, but couldn't reproduce it using normal love. It seems to be a memory corruption problem, but not a leak. Planting "collectgarbage()" on the first line of love.draw triggered the error on the very first call to draw. So it probably has something to do with the initial physics setup in love.load. You wouldn't happen to be using love studio, would you?

Re: "love.exe has stopped working" on Win 7 64 bit

Posted: Mon Jul 15, 2013 6:02 am
by mydoghasworms
Not sure what love studio is, but I use ZeroBrane Studio. (Which is great, though I am eager to know about any alternative out there).

In both cases, I get the problem, running it standalone or in ZeroBrane studio. Yesterday when running it on my home machine, I was under the impression that the simulation ran longer when running it directly (so I thought the same as you; memory corruption).

Now I am trying it on a different Windows 7 64 bit machine, and it gives me the same issue still.

Tonight I will try it hopefully on my Linux desktop to see what it does.

(BTW, should I have posed this in Support and Development?)

Re: "love.exe has stopped working" on Win 7 64 bit

Posted: Mon Jul 15, 2013 1:05 pm
by mydoghasworms
I am slowly narrowing down the issue, I think (though not with any sensible outcome).

When I make the map of the ground completely flat, like so:

Code: Select all

map = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}


the simulation runs indefinitely. With something like the following, it crashes much quicker:

Code: Select all

map = {5,4,3,2,1,0,0,0,1,1,3,3,1,0,0,0,1,1,1,2,2,2,1,1,1,2,2,2,2,1,1,2,2,2,3,3,3,3,1,1,1,1,0,0,0}
(Note that I added some extra higher peaks, 1,1,3,3,1,0,0.

Now I am wondering what difference it would make if I render only the points that should appear in the camera view, instead of rendering all of the ground all of the time.

Is there a way I can filter out the lines in the chain shape that are not in the view?

Re: "love.exe has stopped working" on Win 7 64 bit

Posted: Tue Jul 16, 2013 8:05 am
by jjmafiae
i think you have bad ATI driver (it could be that) my little brother had crashing problems before he got an love version with a workaround

ALL YOUR CRASHES ARE BELONG TO US NOW!

Re: "love.exe has stopped working" on Win 7 64 bit

Posted: Tue Jul 16, 2013 10:17 am
by mydoghasworms
The one machine that this problem occurs on is a laptop with Intel graphics card. Is that also problematic?

Yesterday I tried on my Linux desktop and that was perfect. It has Nvidia graphics.

Are you saying that there are issues with some display devices?

Re: "love.exe has stopped working" on Win 7 64 bit

Posted: Tue Jul 16, 2013 10:36 am
by jjmafiae
mydoghasworms wrote:The one machine that this problem occurs on is a laptop with Intel graphics card. Is that also problematic?

Yesterday I tried on my Linux desktop and that was perfect. It has Nvidia graphics.

Are you saying that there are issues with some display devices?
im not 100% sure but it can be something with the ATI driver :|

the game works over here

Re: "love.exe has stopped working" on Win 7 64 bit

Posted: Tue Jul 16, 2013 11:39 am
by josefnpat
instead of wildly assuming (without evidence I may add) that the graphics driver is the problem, why not actually debug the binary?

Please read the following page, and run the requested commands.

https://www.love2d.org/wiki/debugging

If you can make any sense of the output, it may lead you to a solution to your problem, otherwise consider posting an issue with all your output in the love issue queue

Re: "love.exe has stopped working" on Win 7 64 bit

Posted: Tue Jul 16, 2013 1:06 pm
by Boolsheet
It really seems to be an issue with memory as it crashes when Lua resolves the postcall hook and tries to grow and reallocate the Lua stack. Double free or invalid pointer maybe? I don't know why (yet). :(

Edit: Debugger even says heap corruption...

Edit2: Indeed. ChainShape:getPoints is unstable and should be avoided in 0.8.0. You have to fall back to tables for the ChainShape points.

Re: "love.exe has stopped working" on Win 7 64 bit

Posted: Tue Jul 16, 2013 10:02 pm
by kclanc
Should note: By calling the collectgarbage function at the top of draw, I caused the crash to happen before getPoints even got called.