Jump to content

Crash on container nil value for Knobbly Tree Nuts (oceantreenut)


thegreatmanagement
  • Pending

As described in title. Appears to be the same bug as someone else reported; the issue is (possibly) caused by tree nuts calling a container variable, but not existing/having the component. Users who were playing on the server (not me, I did not cause/witness the crash) reported an "invisible" tree nut a few days prior after crashing into a Giant Knobbly Tree to drop the tree nut that then shortly after went invisible (but wasn't in the water, it was invisible on their boat) so this may be it. Not sure the causes either way, but it happened on a mod free server, DST United Kingdom Endless. Log excerpt below + link to same crash 

crashlog DST_UK2 09_21_22.txt
 

 


Steps to Reproduce

(hypothetically only) 
1. Crash into Giant Knobbly Tree in ocean 
2. Get Knobbly Tree Nut
3. Have it go invisible? or not, place into ocean maybe 




User Feedback


The code that's crashing is this:

local function CanGrow(inst)
    local container = inst.components.submersible:GetUnderwaterObject()
    local underwater_object = container.inst
    if underwater_object ~= nil then

Changing the third line to

local underwater_object = container and container.inst

would fix the crash.

Edited by Bumber64
  • 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

×
  • Create New...