I confirm that I started getting "silent" errors when I set the debug variable to true.
I reported this error (silent crashes) myself, and bartbes identified and fixed it; I don't remember on what version (anjo's saying that 0.7, but I believe it could have happened before that; I'm not sure anyway)
Maybe you can try posting your code here so everyone can give it a run on their systems.
Also, I suggest changing the thread title to something like "getting silent errors on Mac". Some people just read the title and start typing code, without taking the time to properly understand. Let's make it easier for them.
Concat strings using '+' crashes Love on my Mac
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Concat strings using '+' crashes Love on my Mac
When I write def I mean function.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Concat strings using '+' crashes Love on my Mac
Subtle.kikito wrote:Some people just read the title and start typing code, without taking the time to properly understand.
Help us help you: attach a .love.
Re: Concat strings using '+' crashes Love on my Mac
zac352: I was referring to your explanation of why + was crashing LÖVE with no error screen, which was, as I said, wrong. Yes, your metatable solution works. It's also a horrible hack that there's little to no reason to use.
kikito: the debug bug (well, "bug") was fixed after the 0.6.2 release but before the 0.7.0 beta release, so if the OP is using 0.6.2, that would help explain his issues.
kikito: the debug bug (well, "bug") was fixed after the 0.6.2 release but before the 0.7.0 beta release, so if the OP is using 0.6.2, that would help explain his issues.
-
- Prole
- Posts: 6
- Joined: Thu Oct 28, 2010 5:31 pm
Re: Concat strings using '+' crashes Love on my Mac
anjo was right, assigning a value to the debug variable is what causes Love to crash. Here is a simple example that crashes Love on my machine :
function love.draw()
debug = "";
love.graphics.print("hi "+"world", 400, 300)
end
I'm new here, so I'm not sure how things work. However, this does seem to be a bug to me. Shouldn't Love be using a namespace (or whatever the Lua equivalent is) for internal variables to avoid collisions?
Patrick
function love.draw()
debug = "";
love.graphics.print("hi "+"world", 400, 300)
end
I'm new here, so I'm not sure how things work. However, this does seem to be a bug to me. Shouldn't Love be using a namespace (or whatever the Lua equivalent is) for internal variables to avoid collisions?
Patrick
- nevon
- Commander of the Circuloids
- Posts: 938
- Joined: Thu Feb 14, 2008 8:25 pm
- Location: Stockholm, Sweden
- Contact:
Re: Concat strings using '+' crashes Love on my Mac
No, because you should be able to override the debug variable (I think it should be a boolean value, which would explain why it crashed for you) when you ship a game.patrickjcollins wrote:Shouldn't Love be using a namespace (or whatever the Lua equivalent is) for internal variables to avoid collisions?
Re: Concat strings using '+' crashes Love on my Mac
The debug variable is actually a Lua module: The Debug Library. It's name is ... unfortunate, but so is "table" and "string"
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Concat strings using '+' crashes Love on my Mac
Well it was a bug, 0.7.0 has fixed this.
Re: Concat strings using '+' crashes Love on my Mac
... Debug is a standard library. It's needed for debug.traceback...patrickjcollins wrote:anjo was right, assigning a value to the debug variable is what causes Love to crash. Here is a simple example that crashes Love on my machine :
function love.draw()
debug = "";
love.graphics.print("hi "+"world", 400, 300)
end
I'm new here, so I'm not sure how things work. However, this does seem to be a bug to me. Shouldn't Love be using a namespace (or whatever the Lua equivalent is) for internal variables to avoid collisions?
Patrick
Look at the internal scripts. :U
Code: Select all
local function error_printer(msg, layer)
print((debug.traceback("Error: " .. msg, 1+(layer or 1)):gsub("\n[^\n]+$", "")))
end
Hello, I am not dead.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Concat strings using '+' crashes Love on my Mac
That's why several lines up, you can find local debug = debug, which means that you can override debug without any problems. SELÖVE doesn't even expose debug to the game.
Help us help you: attach a .love.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 5 guests