Scenario: on.draw = function() f() end
f = function() f() end
Before this commit, the app would crash without error.
Summary of error handling in Lua and LÖVE:
23BYUXSYSYNIVNZI5YN3UGW2J4RVJY2N3OYT2BY7UQ52ZZDH6ZOQC
local callstack = debug.traceback('', --[[stack frame]]2)
local cleaned_up_error = 'Error: ' .. cleaned_up_frame(tostring(err))..'\n'..cleaned_up_callstack(callstack)
local cleaned_up_error = err
if not err:match('stack overflow') then
local callstack = debug.traceback('', --[[stack frame]]2)
cleaned_up_error = 'Error: ' .. cleaned_up_frame(tostring(err))..'\n'..cleaned_up_callstack(callstack)
else
-- call only primitive functions when we're out of stack space
end
* Don't start the driver app while multiple freewheeling apps are running. If
you have a driver app running with one app, shut it down before you switch
apps. Just always open the app and then the driver. If you close the app,
close the driver.
* Don't give up your other tools just yet. It's easy to make a mistake that
the app doesn't recover from when you fix it. Try restarting the app, and if
it still doesn't work, perhaps you need to fix the initial load. This isn't
yet a tool you can keep open for months on end. (And I'm ambivalent about
making it such a tool since your programs might stop working for others.)
* This approach puts one top-level definition per file, and so obscures the
order in which definitions are loaded. In particular, initializing a global
table to contain other global definitions will fail if you originally
authored the other global definitions after the table.
* I still see driver and the app being driven occasionally crash. When I do I
try to make things more robust. If you do you'll quite possibly crash again
if you try to restart. In such a situation you'll have to bump down to
editing the underlying version files by other means. See [representation.md](representation.md)
for details of the underlying representation on disk.
I never initialize global tables with other definitions. That kind of thing
happens in `on.initialize` (akin to `love.load`; see reference.md) or
`on.code_change`.
* Given the above issues, both this driver and its client freewheeling app
benefit from being launched in terminal windows rather than by being clicked
on in a desktop OS.
* Don't start the driver app while multiple freewheeling apps are running. If
you have a driver app running with one app, shut it down before you switch
apps.