Moth in a bottle #4431
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/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/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
ugh/petz
ugh/QA main
ugh/QA NOK
ugh/QA OK
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: your-land/bugtracker#4431
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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?
After a long day outside I wanted to log in for some time and remebered, having read something about putting moths in a bottle and the possibility of "refreshing" them by that.
I managed to catch one and then tried to free it, hwich ended in first placing the bottle with the moth and a server crash while trying to break the bottle.
When the server startet again i tried again, but without success so I tried to replace tha bottle with a node replacer, probably causing another crash which lasts now for about half an hour.
Seems Server is back now, but I won't triy again til it's clear, that this moth isn't the reason for the shutdown
I could reproduce the crash on Testserver:
Enter a room with moths in my caves.
Catch a Moth with a bottle
Trying to destroy Bottle with Moth in it with Pickaxe -> Crash!
This is the error message:
I can't reproduce the issue with upstream master. Doesn't necessarily mean it's integration, but could be.
Could also be that the moth Murmel tests on are somewhat special. Maybe ... dead.
hmmm, Zombie moths? They fly around in my cave but don't lay eggs anymore. As i think I have read somewhere, moths could be refreshed by putting them in a bottle and free them again, I tried that.
I just repoduced it again on testserver.
Just was not smart enough to keep the coords.
I'll write them down here, as soon as I'm logged in again.
Maybe you can investigate yourself.
I can "reproduce" it if I force
self.object:remove()
call, for example here:326a9ab5b1/kitz/engine.lua (L826)
For some reason
on_activate()
desides that this moth should die soon after it's created...Since remove() can be called in several places from activate, easiest thing is to just check for this nil, I guess. But that will lead to disappearing moths and more ugh/petz :D
That's how it happens:
2023-05-08 18:16:27: ACTION[Server]: Murmel digs petz:bottle_moth at (2619,-18,4151)
2023-05-08 18:16:27: ACTION[Server]: [yl_commons] too many petz:moth at (2619,-18,4151), unloading
2023-05-08 18:16:27: ERROR[Server]: [petz] #4431 pos="(2619,-18,4151)", owner = "Murmel", meta= userdata metatable: {
upstream PR https://github.com/runsy/petz/pull/181
QA
Using a new moth or a newly captured moth, the moth comes out of the bottle again.
Using a moth found in Murmel's cave, putting it into a bottle and breaking the bottle again, the moth vanishes. Most likely that happens to ALL currently active moth.
Recommend adding an admin shop where people can trade in moth bottles for moth bottles.
not sure how i missed this:
the problem is that we set minimum heights at which animals can exist, because of cave camels. see #1359 and #1996.
probably we need to remove the boundaries for petz that the player can place, but which don't have an owner, e.g. moths, silkworms, and butterflies. possibly also mobs that can spawn from an egg (chicken/ducky/penguin/gecko)
also this isn't the right PR. i don't think i've fixed this one yet actually.
Those boundaries also prevent people from breeding ponies in the caves, only chickens and duckies work?
If this mechanic also prevents breeding ponies in caves, then maybe we should add that only to the "automatic spawn" mechanic, if that's possible? All other "spawns", like placement or breeding are intentional.
i've removed the code for removing petz that are somewhere they shouldn't naturally spawn. it causes more problems than it solves.
8f7bbcbb05
i think ponies are born w/ an owner, so that should work already? and i just tested it, and it worked.
i think chickens/duckies don't work, see #3970. chick just spawned and immediately died.
Stange, I have exactly the opposite experience? I hatched chickens and duckies at y= -9000 and it worked. While placing or breeding ponies didn't and they died immediately?
i did my tests at -20000
I'd rather have cave camels than server crashes. Strange: The moth is not released when I break a bottle in Murmel's cave. There is one if I break it in Haven.
There were no more crashes and the spawn mechanics will probably soon be replaced by a new mod.
note that the spawn mechanic wasn't the only issue - part of the previous "fix" involved trying to remove mobs which had already spawned if they were outside of where they should be. however, i think the number of such "legacy" mobs is minimal these days and the code can be removed (or is it already removed?), as it causes more unrelated problems.