Page 1 of 1

Error messages

Posted: Fri Dec 10, 2010 7:33 pm
by YuShin
Hi,

I'm new to Love and Lua, and am worried about error messages : for example when i make a syntax error, or try to load an image that doesn't exist, i just receive an error from windows "love.exe stopped working".

There must be a way to get the "true" error message, but how?

I'm using 7 64bit pro, and simply run my program with the console.

(I bet the answer is simple and that i missed something...)

Thank you.

Re: Error messages

Posted: Fri Dec 10, 2010 7:42 pm
by nevon
You didn't happen to set the debug variable to false, did you? Löve should give you a nice looking error screen as well as print the error message to stderr (or possibly stdout).

Re: Error messages

Posted: Fri Dec 10, 2010 7:45 pm
by thelinx
nevon wrote:You didn't happen to set the debug variable to false, did you? Löve should give you a nice looking error screen as well as print the error message to stderr (or possibly stdout).
That shouldn't matter since 0.7.0.

Are you sure you're not messing with the string metatable? I had some issues where my custom string __index would cause LÖVE to exit without a message.

Re: Error messages

Posted: Fri Dec 10, 2010 7:57 pm
by YuShin
Hum, here is the only code i'm running.
It is very simple, just one of the few thing I did for testing.
So no metatables or debug variable :(

Code: Select all

function love.load()
	image = love.graphics.newImage("CharacterBoy.png")
	love.graphics.setBackgroundColor(0,0,0)
	up = 0
end

function love.update(dt)
	up = dt
end

function love.draw()
    love.graphics.print(up, 400, 300)
end

Re: Error messages

Posted: Fri Dec 10, 2010 8:09 pm
by thelinx
Ah, this might be related to that issue I saw on the issue tracker; LÖVE crashes on Lua errors when stdout/stderr.txt are not writable.

A workaround is to always run LÖVE as administrator.

Re: Error messages

Posted: Fri Dec 10, 2010 8:13 pm
by YuShin
Yep this works!

Thank you :)