FTBTeam / FTB-Modpack-Issues

Any and all FTB Modpack issues are here! Please create a new issue, add to an existing one or maybe even suggest a feature in the discussions
https://feed-the-beast.com/modpack
41 stars 12 forks source link

Crash while automating JustDireThings fuel #5922

Open zperk13 opened 2 days ago

zperk13 commented 2 days ago

Modpack

FTB Presents Direwolf20 1.21

Modpack version

1.2.1

Launcher

Prism

Has the pack been modified

No

Log Files

latest.log debug.log

Describe the bug

I had just finished building my automatic fuel maker with JustDireThhings. I put the items it needs in the system and was just watching it work. It was working for a bit before it crashed. I had broken and picked up a JustDireThings Energy Transmitter like 10 seconds before. I don't really think that's relevant but it's like the only thing that was different. I was in the void dimension. I think the problem is server side and not client side because when it crashed, the game didn't crash, it just acted like I disconnected from a server even though I was in a singleplayer world. I thought maybe it was a one time thing so I tried to load up the world, and it did the same thing again (no world got rendered to my screen before the crash). No crash report was generated (I'm guessing because of whatever is letting is fail more gracefully, isolating it to the server).

Steps to reproduce

I honestly don't know. But if someone wants it, I can provide my world save.

Expected behaviour

For the game to not crash

Screenshots

No response

Additional information

No response

Gaz492 commented 2 days ago

Could you share the world so I can poke around with it?

zperk13 commented 2 days ago

Here is the world file

I decided to try loading the world again and the outcome was different this time. I was in the world for a few seconds, I saw my thing doing its automation, but then I got this: Connection Lost
Internal Exception: io.netty.handler.codec.EncoderException: Failed to encode packet 'clientbount/minecraft:level_particles'
Button that says "Back to Server List

latest.log debug.log

zperk13 commented 2 days ago

Possibly related to #5923

zperk13 commented 2 days ago

@mostlygizzards mentioned in #5923 having a JustDireThings Item Collector and I recently added that to my contraption, so I suspect it's related to that

zperk13 commented 2 days ago

I downloaded the source code for JustDireThings, commented out the line that make the Item Collector render particles (no other particles are effected, only the item collector), compiled it and put it in my mod folder, and I'm not getting the crash. It's random so this isn't exactly scientific, but before it was always crashing within 10 seconds, and now it's been multiple minutes and no crash, so I feel fairly confident this is the issue. I've been trying to investigate what is wrong with the particle function, but haven't figured anything out yet. I'm not super familiar with minecraft mod programming so I don't know how to log things (if someone can tell me, I'd appreciate it).

No idea if this is actually the issue, but my programmer instincts are thinking maybe the the item collector tried to grab the item just as it got "deleted" turning the fuel into a different type of fuel, so therefor the item collector tried to grab an item that didn't exist anymore, which from the item management perspective it was maybe smart enough to handle, but then the particle system tried to generate particles that resemble an item that doesn't exist anymore, so it crashed. The fact that the log file mentions threads makes me lean towards this even more (race condition). I could be completely wrong on this though.

zperk13 commented 2 days ago

Discussion in #5923 lends more credence to my "competing for item" theory

zperk13 commented 2 days ago

I managed to consistently recreate the bug using a fairly simple setup. I made a bug report for it on the mod itself as you can see above this comment.