Double free or corruption error after exit

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
chanko08
Prole
Posts: 6
Joined: Sat Jan 04, 2014 9:33 pm

Double free or corruption error after exit

Post by chanko08 »

Hello, I'm working on the camera for my game, and I ran into an odd issue with a bit of the graphics api. If I use love.graphics.push() and love.graphics.pop(), when I quit the game I get an big backtrace and the error. I know it's related to these functions because I don't get the error if I comment them out.

Code: Select all

*** Error in `love': double free or corruption (out): 0x09a3e668 ***
Has anybody run into this error before?

In case it matters I am using version 0.9.0. Thank you for your help.

edit: Sorry, I didn't realize first posters couldnt attach files, here's a url https://www.dropbox.com/s/h95ug7nkkd6h2gu/mario.love
edit 2: The memory error happens after my love.quit is called as well.
edit 3: Apparently this happens in both of my computers, 32 and 64 bit. I originally thought that maybe it was an opengl issue, but I guess it must be something different.
User avatar
slime
Solid Snayke
Posts: 3159
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Double free or corruption error after exit

Post by slime »

I don't get the error running OS X, but someone else does running Windows 8. What OS are you testing on?

Does it still happen if you use a nightly build of LÖVE? http://love2d.org/builds
chanko08
Prole
Posts: 6
Joined: Sat Jan 04, 2014 9:33 pm

Re: Double free or corruption error after exit

Post by chanko08 »

This happens for Ubuntu 13.10 32-bit and Ubuntu 13.04 64-bit. I'll give the nightly build a shot to see if that takes care of the issue.

edit: I gave the latest stable build a try on my 64-bit machine, and the issue exists there too.
User avatar
slime
Solid Snayke
Posts: 3159
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Double free or corruption error after exit

Post by slime »

Does it still happen if you comment out the 'love.graphics.reset()' line in physics.lua?
chanko08
Prole
Posts: 6
Joined: Sat Jan 04, 2014 9:33 pm

Re: Double free or corruption error after exit

Post by chanko08 »

After commenting out love.graphics.reset() (and leaving the pop() and push() uncommented) the corruption error stops, but for some reason my tiles were being colored the red color I was using in that same code block. Am I using the drawing api incorrectly there?

edit: I can't say I know what was going on with that corruption error, but if I reset the color back by just storing it instead of calling the reset() method I can avoid the error while still being able to use push() and pop(). Perhaps there's some initialization stuff I need to do to use the graphics reset?
User avatar
slime
Solid Snayke
Posts: 3159
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Double free or corruption error after exit

Post by slime »

The crash because of love.graphics.reset was a bug in LÖVE you helped find, it's been fixed now for the next release (probably 0.9.1). :)
Post Reply

Who is online

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