[Client Crash] - Client crash standardcomponents.lua line 766 : atttempt to index field '?' (a nil value)


FibreFoX

Recommended Posts

Bug Submission:

Category: Client Crash

Issue Title: Client crash standardcomponents.lua line 766 : atttempt to index field '?' (a nil value)

Issue Description: data/scripts/standardcomponents.lua

the line 766 contains the following code:

>>>>

t = MOD_COMPONENT_ACTIONS[modname][type]

<<<<

in the case that "MOD_COMPONENT_ACTIONS[modname]" is nil, accessing to "[type]" ends in this result:

http://steamcommunity.com/sharedfiles/filedetails/?id=380072320

dont know if the mods are causing this, but its always a good thing to check for nil here !

Steps to Reproduce: dont know why this happened, but see my description.

Link to comment
Share on other sites

@FibreFoX, It's definitely a mod bug. I think this is the crash people were getting when they had bad mod config left over from the Regeneration mod, so you could try deleting your mod config folder ( C:\Users\Rafael\Documents\Klei\DoNotStarveTogether\save\mod_config_data ).

 

 

Checking for nil would prevent this crash, but it would also hide the underlying problem. The current printout is not very helpful, though, so maybe changing it to something like this would help:

assert(MOD_COMPONENT_ACTIONS[modname] ~= nil, "The following mod doesn't have any component actions: " .. modname)
Link to comment
Share on other sites

I agree here, i assumed it was some mod-problem.

 

But the problem remains: the game HAS TO defent itself against other "systems" (a mod is like a new system to the core).

 

Changing the printout won't help anything than just having a "name", but does not prevent LUA from breaking here, which is a mayor design-issue, if nothing is made against "wrong behaviour" of mods.

 

(im myself a software-developer, i know that plugin-in-systems can be very hard, but defensive-development has to be taken seriously)

Link to comment
Share on other sites

@FibreFoX, No, but the thing is that if a mod is causing this to happen, it SHOULD crash, so the mod developer knows to fix it. Changing the printout would make it so that if someone using the mod send the log to the dev, they'd actually have an idea of where to look.

 

However it's possible this is actually due to a problem in the game's mod support (I think perhaps when trying to load mod config for a set of config options that have changed when a mod got updated).

Link to comment
Share on other sites

@FibreFoX, No, but the thing is that if a mod is causing this to happen, it SHOULD crash, so the mod developer knows to fix it. Changing the printout would make it so that if someone using the mod send the log to the dev, they'd actually have an idea of where to look.

 

However it's possible this is actually due to a problem in the game's mod support (I think perhaps when trying to load mod config for a set of config options that have changed when a mod got updated).

 

So you are saying, you want to degrade the user-experience on the game, because the installed mod is haunting the system?

 

Lets be honest, this is what possible solutions are existing:

 

  • the mod crashes, but the game continues to work "normally", the user-experience is partially broken
  • the mod crashes, the game crashes, the user-experience is totally broken

If you really suggest to have the second one as your favorite, it would really like to pull a vote on this.

 

Having mod-support is great, dont get me wrong here, i really like the idea of chaning a lot of aspects by my custom modifications, but always having to fear the next game-update isn't that nice, neither to mod-developers, nor to the using customers.

 

Back to the bug itself: would you agree that my attached version of that function is a valid "solution" for the problem?

Link to comment
Share on other sites

@FibreFoX, Yes, crashing degrades the user experience of the game, but so does mod actions mysteriously not working. Degrading the user experience a little early in a mod's development is necessary to expose the mod action problem so it can be fixed and then cause no degradation of experience.

 

And no, your solution is just hiding the problem, which is occurring elsewhere... this is just the symptom.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.