Arkathorn Posted March 7, 2016 Share Posted March 7, 2016 Widgets never tell me their errors, instead simply removing themselves. Is there an easy way to disable this? Link to comment https://forums.kleientertainment.com/forums/topic/65196-widget-error-handling/ Share on other sites More sharing options...
Arkathorn Posted March 7, 2016 Author Share Posted March 7, 2016 I could do this, but it would be a lot easier to just have this not be necessary in the first place: print(xpcall(function() --Dodgy Functionality end, debug.traceback)) Link to comment https://forums.kleientertainment.com/forums/topic/65196-widget-error-handling/#findComment-730856 Share on other sites More sharing options...
Arkathorn Posted April 4, 2016 Author Share Posted April 4, 2016 Does anyone know where the game's error handling override is? Is it in the Lua, or the C++? @PeterA Link to comment https://forums.kleientertainment.com/forums/topic/65196-widget-error-handling/#findComment-744354 Share on other sites More sharing options...
Developer PeterA Posted April 4, 2016 Developer Share Posted April 4, 2016 @Arkathorn I believe it's set on the C++ side. Out of curiosity, what do you mean when you said "instead simply removing themselves" ? Link to comment https://forums.kleientertainment.com/forums/topic/65196-widget-error-handling/#findComment-744384 Share on other sites More sharing options...
simplex Posted April 4, 2016 Share Posted April 4, 2016 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. Link to comment https://forums.kleientertainment.com/forums/topic/65196-widget-error-handling/#findComment-744394 Share on other sites More sharing options...
Arkathorn Posted April 4, 2016 Author Share Posted April 4, 2016 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. Link to comment https://forums.kleientertainment.com/forums/topic/65196-widget-error-handling/#findComment-744457 Share on other sites More sharing options...
Developer PeterA Posted April 4, 2016 Developer Share Posted April 4, 2016 3 hours ago, simplex said: If I'm debugging a function and need to look at the stack trace, I shouldn't have to crash the game. Should be able to call print( debugstack() ) which prints the callstack to the Log. Link to comment https://forums.kleientertainment.com/forums/topic/65196-widget-error-handling/#findComment-744479 Share on other sites More sharing options...
Arkathorn Posted April 4, 2016 Author Share Posted April 4, 2016 What if you don't know where the error is? Errors inside the UI system don't report themselves. Link to comment https://forums.kleientertainment.com/forums/topic/65196-widget-error-handling/#findComment-744497 Share on other sites More sharing options...
simplex Posted April 4, 2016 Share Posted April 4, 2016 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. Link to comment https://forums.kleientertainment.com/forums/topic/65196-widget-error-handling/#findComment-744507 Share on other sites More sharing options...
Arkathorn Posted April 5, 2016 Author Share Posted April 5, 2016 17 hours ago, simplex said: They should still be found in log.txt Most of the errors I've encountered have not been recorded in the log. Link to comment https://forums.kleientertainment.com/forums/topic/65196-widget-error-handling/#findComment-744871 Share on other sites More sharing options...
simplex Posted April 5, 2016 Share Posted April 5, 2016 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. Link to comment https://forums.kleientertainment.com/forums/topic/65196-widget-error-handling/#findComment-745029 Share on other sites More sharing options...
Developer PeterA Posted April 6, 2016 Developer Share Posted April 6, 2016 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. Link to comment https://forums.kleientertainment.com/forums/topic/65196-widget-error-handling/#findComment-745090 Share on other sites More sharing options...
Arkathorn Posted April 6, 2016 Author Share Posted April 6, 2016 10 hours ago, PeterA said: Are you looking at log.txt or client_log.txt? I'm using Don't Starve, not DST. Link to comment https://forums.kleientertainment.com/forums/topic/65196-widget-error-handling/#findComment-745479 Share on other sites More sharing options...
Developer PeterA Posted April 6, 2016 Developer Share Posted April 6, 2016 7 hours ago, Arkathorn said: I'm using Don't Starve, not DST. Sorry, for some reason I thought this was the DST bug tracker. Link to comment https://forums.kleientertainment.com/forums/topic/65196-widget-error-handling/#findComment-745625 Share on other sites More sharing options...
Arkathorn Posted April 6, 2016 Author Share Posted April 6, 2016 Would it help if I posted a copy of my project with one of these errors present? Link to comment https://forums.kleientertainment.com/forums/topic/65196-widget-error-handling/#findComment-745705 Share on other sites More sharing options...
Developer PeterA Posted April 6, 2016 Developer Share Posted April 6, 2016 Yeah if you post your mod, then people can take a look and try to reproduce the issue. Link to comment https://forums.kleientertainment.com/forums/topic/65196-widget-error-handling/#findComment-745764 Share on other sites More sharing options...
Rincevvind Posted April 10, 2016 Share Posted April 10, 2016 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. Link to comment https://forums.kleientertainment.com/forums/topic/65196-widget-error-handling/#findComment-747971 Share on other sites More sharing options...
Developer PeterA Posted April 11, 2016 Developer Share Posted April 11, 2016 Hey @Rincevvind, unfortunately we do not have a way for the lua to specify the sleep radius. Link to comment https://forums.kleientertainment.com/forums/topic/65196-widget-error-handling/#findComment-748739 Share on other sites More sharing options...
Rincevvind Posted April 11, 2016 Share Posted April 11, 2016 Pretty sad, but thx for reply. Link to comment https://forums.kleientertainment.com/forums/topic/65196-widget-error-handling/#findComment-748753 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now