[Cavepreview] Wall Health components is nil


AireAyquaza
  • Pending

Hi Klein developpers ! Today I found a bug in the Don't Starve Together Cavepreview beta.

I've installed a mod Wall Health Regen witch invoke the DoDelta methode witch is in walls.lua for restore wall periodically with a scheduled task.

The game crash when the task is runned with this message :

Quote

[00:01:45]: [string "../mods/workshop-509723993/modmain.lua"]:12: attempt to index field 'health' (a nil value)
LUA ERROR stack traceback:
    ../mods/workshop-509723993/modmain.lua:12 in (field) fn (Lua) <11-16>
    scripts/scheduler.lua:194 in (method) OnTick (Lua) <168-225>
    scripts/scheduler.lua:406 in (global) RunScheduler (Lua) <404-412>
    scripts/update.lua:166 in () ? (Lua) <150-223>

Then I add the following code in the modmain for testing if this components is really nil : 

if inst.components.health == nil then
	inst:AddComponent("health") 
end

but the game crash with this message : 

Quote

[00:00:59]: replica health already exists!     scripts/entityscript.lua:519 in (method) AddComponent (Lua) <510-532>    
[00:00:59]: Registering duplicate lua network variable 1421215739 in entity wall_pomarble[100036]
[00:00:59]: Break at: ..\source\simlib\Entity.cpp(326) :

Significating the components already exist and isn't nil

 

Here my log files:

- client_log.txt : The nil component

- client_log2.txt : The crash caused by replica component

client_log.txt

client_log2.txt


Steps to Reproduce
- Install the mod, generate a new world and place a wall.


User Feedback


....

Hello @AireAyquaza sorry to say but this is ultimately a mod related issue which falls under the mod creators' responsibility if they wish to continue updating the mod. See Modding Etiquette: General Guidelines. When you have mods installed and active, the Mods Installed! Screen appears on first load which states that Klei is not able to help you should issues arise when using mods.

Based on that what I believe constitutes a bug to be reported in the Bug Tracker is that the bug itself occurs with the base game with no mods active, which is technically what the devs can fix cause that is what they are working on directly. 

I hope that makes sense. So for other future mod related bugs, direct them to the respective mod creators and see if they are willing to update their mod to the cavespreview beta branch. 

Cheers.

Share this comment


Link to comment
Share on other sites
....

There are two issues I can see.

  1. The mod is accessing inst.components.health without checking if it's nil; this should be fixed by mod's author.
  2. client_log says it is loading the mod, but as the mod is server_only it shouldn't have. It seems there is a problem distinguishing what mods to load on the server/client, and might be related to the issue of unable to configure server mods that other bug reports are noting.

 

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