Jump to content

Recommended Posts

1 hour ago, Arkathorn said:

Does anyone know where the game's error handling override is? Is it in the Lua, or the C++? @PeterA

It is set in the C++ side, but defined in the Lua side (in stacktrace.lua, right at the top level of the scripts subdirectory).

I re-overwrite it myself, mostly because the game makes debug.traceback raise an error itself instead of just returning the stack traceback string. That break the stdlib'd semantics. If I'm debugging a function and need to look at the stack trace, I shouldn't have to crash the game.

2 hours ago, PeterA said:

Out of curiosity, what do you mean when you said "instead simply removing themselves" ?

I don't think this is consistent behavior, but sometimes an error will result in the widget vanishing instead of causing more widespread issues.

45 minutes ago, PeterA said:

Should be able to call print( debugstack() ) which prints the callstack to the Log.

It's a bit cluttered, though, especially since Lua 5.1 doesn't eliminate tail calls from the call stack debug info (this is done starting with Lua 5.2), so I apply the trimming myself. It's also nice to be able to choose when I do want to see local variables at each stack level and when I only want the call stack. Nonetheless, I only set the replacement traceback functions locally, not exporting them to the global environment, so my replacement traceback shouldn't conflict with the game or other mods.

 

26 minutes ago, Arkathorn said:

What if you don't know where the error is? Errors inside the UI system don't report themselves.

They do, unless the error is raised early (which is often for widgets). The problem is errors aren't properly displayed until the global error widget is up. They should still be found in log.txt, though; that's one of the reasons why we must always ask mod users for their log.txt files, since some errors only show there.

5 hours ago, Arkathorn said:

Most of the errors I've encountered have not been recorded in the log.

That's strange. Unless we're talking about engine level errors (especially of the 'assertion failed' variety), I've never seen a crash not produce a produce a proper error to the log.

  • Developer
7 hours ago, Arkathorn said:

Most of the errors I've encountered have not been recorded in the log.

Are you looking at log.txt or client_log.txt? We fairly recently moved to write clients logs to client_log.txt and server logs to server_log.txt (inside the cluster folders), so if you still have an old log.txt you probably just want to delete that file.

Can i ask something offtopic, since it's hard to catch devs here? :)

I there any chance to get ability to increase active area around player? currently it's like 2 screens in each direction.

Like special switch for .exe or specail function, anything. Without any warranty of proper working, stability and such.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...