• Announcements

    • JoeW

      UPDATED - Studio Note & Rhymes with Play Streams Temporarily Canceled.   03/06/2020

      UPDATE (3/19/20): Just a quick note regarding the team at Klei Entertainment. As noted previously, everybody at Klei Entertainment is working from home due to the Covid-19 outbreak. Many of us have been working especially hard to help maintain operations as we all move out of the office and into our homes and with everything being done online, extra time must be spent in organizing conversations and trying to maintain communication. As some of you may know, we have a very open office and we are almost always in contact with each other as we go about our days. Some of us work across multiple teams and that work has become a bit more challenging for everybody.   That being said, at this time the transition has not caused any major disruption in our operations, but it would be overly optimistic to expect that we won't have any delays at all. We're going to have to be especially mindful about this in the coming weeks and make sure we don't take on too much work so we can keep things running smoothly.  We will let you know as we see how these changes affect our timelines.  Thanks UPDATE (3/10/20):
      The test yesterday went well. We got the whole office (mostly) to work from home without significant issue. As a result, Klei Staff that can work from home have been asked to do so until further notice.  This means that we will have to cancel the Rhymes with Play stream until we are all back in the office. This shouldn't affect anything else at least in the short term, but if things change I will update you all here.  Original Post: Hey everybody,  This Tuesday March 10th, 2020 the entire staff at Klei will be working remotely for 1 day in an effort to prepare the studio to work remotely for a little while if the need arises.  Klei is already set up pretty well to allow for working remotely, however we are going to have a one day "dry run" with the whole studio so that we can identify and avoid any issues or downtime that may arise should choose to implement a work from home policy due to COVID-19 outbreak concerns. Unfortunately this does mean that we will be canceling the “Rhymes with Play” Art stream this coming Tuesday, however unless the situation changes we expect everything at the studio to be back to normal Wednesday and we’ll continue our regular stream schedule Thursday March 12th. If the situation changes at all, we'll let you know. Thanks for your understanding.

Better Crashes (RoG compatible) 1.0

2 Screenshots

About This File

Improves the information shown in game crashes by displaying information about the entity that triggered it.

Disclaimer: This mod is primarily meant for other modders. While its use is simple (since it simply needs to be enabled) and the information it presents might help tracking down the cause of bugs even in vanilla Don't Starve, the discussion below, explaining what the presented information means, assumes some level of familiarity with the inner workings of Don't Starve.

Whenever a crash occurs, this mod will attempt to find the entity "responsible" for it and show a set of information about it, in order to help to track down the root cause of the issue. Scenarios where the entity is found include crashes triggered within prefab files, components, stategraphs and brains*.

The following information about the entity is shown:

  • Its number (its GUID) and its prefab name;
  • Its variable name, within the function that triggered the crash (this may be an "indirect" variable name, such as self.inst);
  • Whether the entity is valid;
  • Whether the entity is in limbo (i.e., whether it was removed from the scene);
  • Whether it's asleep (in the sense that it is not active);
  • How long it's been alive (i.e., how long it has been since it was spawned, noting that reloading a save respawns all entities);
  • Its position (as world coordinates);
  • Its distance to the player.

In the error screen, the entity information is presented on the right of the stack trace (hence dividing the usual text region into two columns). See the attached screenshot for an example (obtained by replicating this bug with the mod enabled). In the same example, the following is printed in log.txt:

scripts/components/propagator.lua:109: attempt to index field 'instcomponents' (a nil value)Entity information:	entity: [108621 - willowfire]	variable name: self.inst	valid: true	in limbo: false	asleep: false	time alive (seconds): 1.10	position: (-164.92, -0.00, -207.38)	distance to player: : 7.55LUA ERROR stack traceback:        scripts/components/propagator.lua(109,1) in function 'OnUpdate'        scripts/components/propagator.lua(39,1) in function 'fn'        scripts/scheduler.lua(170,1) in function 'OnTick'        scripts/scheduler.lua(381,1) in function 'RunScheduler'        scripts/update.lua(87,1)        =(tail call) ?        =[C] in function 'xpcall'        ../mods/BetterCrashes/modmain.lua(160,1)LUA ERROR stack traceback:        =[C] in function 'error'        ../mods/BetterCrashes/modmain.lua(149,1)        =(tail call) ?scripts/frontend.lua(712,1) SCRIPT ERROR! Showing error screen	

Note that, unfortunately, usage of this mod causes two "LUA ERROR stack traceback" blocks to be printed per error (the second being a "continuation" of the first). This happens because for the mod to work it needs to catch an error and then rethrow it.

* The general condition is the following: the mod takes a look at the first parameter passed to the function that caused the crash (the "self" parameter, if any, counts as the first); if this parameter is an entity, this entity's information is displayed; otherwise, if this parameter is a table with an entity stored in its "inst" field, this entity's information is displayed. This convention is adopted because most (all?) function in the Don't Starve code that operate on an entity either receive that entity as its first argument, or receive a "self" first parameter which stores the entity in self.inst.

User Feedback

Recommended Comments

Thanks, i needed this. Because i have so many mods, when it crashes, and doesent present which mod caused it, i have to spend all of my Saturday enabling and disabling mods to see which one is causing the problem. You have just saved me from a lot of late night headaches.

  • Like 1

Share this comment

Link to comment
Share on other sites

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