bugfix: show error message on infinite recursion

akkartik
Mar 1, 2025, 8:24 PM
23BYUXSYSYNIVNZI5YN3UGW2J4RVJY2N3OYT2BY7UQ52ZZDH6ZOQC

Dependencies

Change contents

  • replacement in main.lua at line 465
    [3.1239][2.0:171]()
    local callstack = debug.traceback('', --[[stack frame]]2)
    local cleaned_up_error = 'Error: ' .. cleaned_up_frame(tostring(err))..'\n'..cleaned_up_callstack(callstack)
    [3.1239]
    [2.171]
    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
  • replacement in main.lua at line 504
    [2.1050][2.1050:1100]()
    return cleaned_up_filename(filename)..':'..rest
    [2.1050]
    [2.1100]
    if filename then
    return cleaned_up_filename(filename)..':'..rest
    else
    return line
    end
  • replacement in README.md at line 33
    [3.8][3.8:259](),[3.259][3.4664492:4664493](),[3.4664492][3.4664492:4664493](),[3.738][3.738:1123]()
    * 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.)
    [3.8]
    [3.1123]
    * 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.
  • replacement in README.md at line 38
    [3.1124][3.1124:1507]()
    * 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.
    [3.1124]
    [3.4664758]
    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`.
  • replacement in README.md at line 42
    [3.4664759][3.1508:1684]()
    * 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.
    [3.4664759]
    [3.1684]
    * 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.