mobkit/init.lua:46: attempt to index local 'pos' (a nil value) #8335
Labels
No Label
1. kind/balancing
1. kind/breaking
1. kind/bug
1. kind/construction
1. kind/documentation
1. kind/enhancement
1. kind/griefing
1. kind/invalid
1. kind/meme
1. kind/node limit
1. kind/other
1. kind/protocol
2. prio/controversial
2. prio/critical
2. prio/elevated
2. prio/good first issue
2. prio/interesting
2. prio/low
3. source/art
3. source/client
3. source/engine
3. source/ingame
3. source/integration
3. source/lag
3. source/license
3. source/mod upstream
3. source/petz
3. source/testserver
3. source/unknown
3. source/website
4. step/approved
4. step/at work
4. step/blocked
4. step/discussion
4. step/help wanted
4. step/needs confirmation
4. step/partially fixed
4. step/QA main
4. step/QA NOK
4. step/QA OK
4. step/question
4. step/ready to deploy
4. step/ready to QA test
4. step/want approval
5. result/cannot reproduce
5. result/duplicate
5. result/fixed
5. result/maybe
5. result/wontfix
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: your-land/bugtracker#8335
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is due to This is due to water_life
There's a surplus blank at the end of the setting key: water_life_nospawn
This is on main, means we'll get the crash there sooner or later as well.
Since this is actually two separate issues, here are both upstream issues:
https://github.com/berengma/water_life/issues/108
https://github.com/berengma/water_life/issues/107
Main won't crash because:
c58e503cf3/spawn.lua (L84-L88)
Because Alias has set temporary
water_life.apionly = true
:DBoth issues closed upstream with new commits.
This crashed us so many times, we should've hotfixed it in some way.
I'm thinking about just finding the globalstep by the mod origin and replacing it with the fixed one with nil check added.
I still don't understand how exactly this can happen though?
coraltable[random(#coraltable)]
is where it goes wrong:random
is a custom func which looks quite cursed:c58e503cf3/api.lua (L31-L43)
random(1)
can return 0. But lua indices start at 1...(not correcting tour, because he's right, trying to unconfuse mylself)
Maybe this is where this horrible monster comes from? Trying to make sure "min = 1"? XD
lua's
math.random(1)
will return only1
(!)But, after all the shuffling,
water_life.random(1)
is equivalent towater_life.random(0, 1)
and tomath.random(0,1)
which will return 0 or 1 :)This fix is not on main, we got a crash :p (judging by the line numbers too)
did
water_life.apionly = true
again.../eval water_life.version
upstream: 250329
we have: 250122
water_life.apionly = true
is now a snippettemp_fix_water_life_8335
please disable when updated :p