Error messages

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
YuShin
Prole
Posts: 11
Joined: Mon Oct 18, 2010 10:05 am

Error messages

Post 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.
User avatar
nevon
Commander of the Circuloids
Posts: 938
Joined: Thu Feb 14, 2008 8:25 pm
Location: Stockholm, Sweden
Contact:

Re: Error messages

Post 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).
User avatar
thelinx
The Strongest
Posts: 857
Joined: Fri Sep 26, 2008 3:56 pm
Location: Sweden

Re: Error messages

Post 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.
YuShin
Prole
Posts: 11
Joined: Mon Oct 18, 2010 10:05 am

Re: Error messages

Post 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
User avatar
thelinx
The Strongest
Posts: 857
Joined: Fri Sep 26, 2008 3:56 pm
Location: Sweden

Re: Error messages

Post 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.
YuShin
Prole
Posts: 11
Joined: Mon Oct 18, 2010 10:05 am

Re: Error messages

Post by YuShin »

Yep this works!

Thank you :)
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 9 guests