Hello. Nice mod. I tried using it and it mostly works for me. However, I tried it on my server that runs 24/7 with lots of animal mobs that attack each other and cause blood splatter, and it will eventually just crash and the client says there was an Internal Server Error when it disconnects.
I checked the debug logs and I get the following:
2024-05-08 02:37:05: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'blood_splatter' in callback luaentity_Step(): "Runtime error from mod 'blood_splatter' in callback luaentity_Punch(): ...t/1914/usr/bin/../share/minetest/builtin/game/misc_s.lua:76: Incorrect length of 'd
2024-05-08 02:37:05: ERROR[Main]: ata', width and height imply 1024 bytes but 1088 were provided
2024-05-08 02:37:05: ERROR[Main]: stack traceback:
2024-05-08 02:37:05: ERROR[Main]: [C]: in function 'error'
2024-05-08 02:37:05: ERROR[Main]: ...t/1914/usr/bin/../share/minetest/builtin/game/misc_s.lua:76: in function 'encode_png'
2024-05-08 02:37:05: ERROR[Main]: ...p/minetest/1914/.minetest/mods/blood_splatter/canvas.lua:105: in function 'update_immediately'
2024-05-08 02:37:05: ERROR[Main]: ...p/minetest/1914/.minetest/mods/blood_splatter/canvas.lua:186: in function 'update_canvases'
2024-05-08 02:37:05: ERROR[Main]: ...inetest/1914/.minetest/mods/blood_splatter/spraycast.lua:307: in function 'after_spraycasts'
2024-05-08 02:37:05: ERROR[Main]: ...nap/minetest/1914/.minetest/mods/blood_splatter/init.lua:54: in function 'bleed_any'
2024-05-08 02:37:05: ERROR[Main]: ...nap/minetest/1914/.minetest/mods/blood_splatter/init.lua:92: in function 'bleed_animal'
2024-05-08 02:37:05: ERROR[Main]: ...nap/minetest/1914/.minetest/mods/blood_splatter/init.lua:118: in function 'old_punch'
I don't have the expertise to troubleshoot this much further. Do you think this can be something that is corrected in the mod, or maybe a config change that I can make myself?
Are you using the latest 2.0.1 release of the mod? Which MT version? Which animal mods are you using? Looking at how the trace goes down to canvas.lua, this may be a bug I copy pasted from ggraffiti. Either way, I need to know how to replicate it in order to fix it.
Isn't this mod laggy on a server with loads going on? The effects being on the server side probably doesn't scale well.
You can check canvas.lua. ggraffiti hasn't changed this file since I made this mod, so I can't just steal a fix from there. I think self.bitmap has more elements than it's supposed to have for some reason in some condition. Maybe you can find it.
I am using the latest 2.0.1 release, and 5.8.0 for Minetest.
I'm using these animal mobs:
Wilhelmines Animal World (this one has the most animals attacking each other)
Mob Horse
Mobs Animal
Mobs Wolf
Wildlife
I'm not sure exactly how to reproduce, other than waiting for it to occur, and it usually runs fine for a few hours before it finally crashes. My logs show a mob attacking another one only happening once every few minutes. And I've observed the blood splatter going away after five minutes is working.
I'm testing the mod in my staging enviornment first, which is a private server and only has two players joining via a wired connection. I haven't yet noticed any change in resource utilization or lag on the client.
I don't know what self.bitmap is or how to check it, so I may have to defer to others on that one. :P
I do like this mod, so I'd be happy to help troubleshoot.
I added some checks. Could you delete your blood_splatter folder and try this?
https://gitgud.io/blut/blood_splatter/-/archive/master/blood_splatter-master.zip
The error message might help identify where it happens. Pls try to get it to error a couple times. It might always happen on activate or update_canvas or in both. as "reported from update_canvases" and "reported from activate" will indicate.
As you noted, not seeing it crash anymore. I got this popping up in the logs just once, so far:
2024-05-08 19:58:31: WARNING[Server]: from update_immediately() above encode_png: Removed blood_splatter:canvas entity at (-155, -4.499, -10035) in on_activate because of invalid staticdata
2024-05-08 19:58:31: WARNING[Server]: reported from update_canvases
The upstream solution from the ggraffiti repo (https://github.com/grorp/ggraffiti/issues/12) is to add a bounds check to draw_pixel because they couldn't figure it out either. Can you test whether that works for some hours without crashes by downloading the blood_splatter from the same link again? If it does, I'll release an update.
Hello. Nice mod. I tried using it and it mostly works for me. However, I tried it on my server that runs 24/7 with lots of animal mobs that attack each other and cause blood splatter, and it will eventually just crash and the client says there was an Internal Server Error when it disconnects.
I checked the debug logs and I get the following:
I don't have the expertise to troubleshoot this much further. Do you think this can be something that is corrected in the mod, or maybe a config change that I can make myself?
Are you using the latest 2.0.1 release of the mod? Which MT version? Which animal mods are you using? Looking at how the trace goes down to canvas.lua, this may be a bug I copy pasted from ggraffiti. Either way, I need to know how to replicate it in order to fix it.
Isn't this mod laggy on a server with loads going on? The effects being on the server side probably doesn't scale well.
You can check canvas.lua. ggraffiti hasn't changed this file since I made this mod, so I can't just steal a fix from there. I think self.bitmap has more elements than it's supposed to have for some reason in some condition. Maybe you can find it.
Thanks for the reply!
I am using the latest 2.0.1 release, and 5.8.0 for Minetest.
I'm using these animal mobs:
I'm not sure exactly how to reproduce, other than waiting for it to occur, and it usually runs fine for a few hours before it finally crashes. My logs show a mob attacking another one only happening once every few minutes. And I've observed the blood splatter going away after five minutes is working.
I'm testing the mod in my staging enviornment first, which is a private server and only has two players joining via a wired connection. I haven't yet noticed any change in resource utilization or lag on the client.
I don't know what self.bitmap is or how to check it, so I may have to defer to others on that one. :P
I do like this mod, so I'd be happy to help troubleshoot.
I added some checks. Could you delete your blood_splatter folder and try this? https://gitgud.io/blut/blood_splatter/-/archive/master/blood_splatter-master.zip The error message might help identify where it happens. Pls try to get it to error a couple times. It might always happen on activate or update_canvas or in both. as "reported from update_canvases" and "reported from activate" will indicate.
It should no longer crash though. The error should show up in the logs/terminal like this:
Thanks! I'm giving it a try.
As you noted, not seeing it crash anymore. I got this popping up in the logs just once, so far:
The upstream solution from the ggraffiti repo (https://github.com/grorp/ggraffiti/issues/12) is to add a bounds check to draw_pixel because they couldn't figure it out either. Can you test whether that works for some hours without crashes by downloading the blood_splatter from the same link again? If it does, I'll release an update.
I downloaded it again, and ran it on my server.
Running it for 6 hours so far and no issues.
Seeing lots of animal attacks in the logs, and lots of blood splatter on the screen.
So far so good.
Thank you for your feedback. It's really appreciated.
Thank you, as well!