Inventory lost if server restarts.
maham opened this issue · 12 comments
A few of us playing on a Rustic Waters server have had our inventory wiped on death. I think all the times it has coincided with the server restarting while we were dead/dying. If I can get a log or any other info from the admins I'll add it here.
CorpseComplex: 1.0.6
Minecraft: 1.12.2
Forge: 14.23.5.2847
Are you able to reproduce this consistently with reproduction steps? And if so, are you able to reproduce this consistently with only Corpse Complex installed?
I have a hard time trying to reproduce this as this happens on a server where I'm not admin and I don't think the admins feel like playing debug with me. But I know it has happened to other players too. Also when the server restarts for whatever reason while they were dead.
Does this seem to happen exclusively when the server restarts while dead/dying, or have you noticed other occasions where this happens without the server rebooting?
I'm currently not playing on the server but i remember that we had a discussion about it and it seems to be related to the server rebooting only. I'll ask in the server chat if there have been any more occurrences of this problem lately and if they have any more details.
Unfortunately I can't reproduce this issue. I start up my test server, join it, kill myself with inventory that should get saved, reboot the server, rejoin, and I get my inventory back as expected.
I'm not sure what might be happening on that server in particular. It could even possibly be a different mod interfering somehow. In order for me to continue, I'll need more details about how to reproduce this behavior (ideally in an environment separate from the aforementioned server).
Hmm, it's interesting that these occurrences have the Rustic Waters modpack in common. I wonder if there's some kind of weird interaction with another mod happening in that pack. I'll have to do some more digging down that train of thought.
@Epic428 I can look into implementing some sort of restore command. However, I'm not sure if that would resolve the issue. Corpse Complex does take a snapshot of your inventory already, in a manner of speaking. That's how it returns the items back to you after respawn. However, from your clip, it seems you load back into the world after the crash still dead and then you respawn afterwards. The fact that the act of respawning didn't return any items back to you suggests to me that Corpse Complex doesn't even have any data at all. Which is odd, because if it took anything from your inventory at all then it would have some data. Not entirely sure what's going on there, but I'll try and see what I can find out.
Edit: Oh yeah, if you happen to have any crash or error logs from when that happened, that'd be helpful as well.
I just experienced this issue on my stream if you would like to watch and see the error as it happens. I'm Epic_Oreo on Twitch and it is about 6hrs 40min into my most recent stream. I'm still streaming so i wont be able to create a clip of it until after when i can go back and see the VOD. but what I can add in details is that while I was drowning in water I was trying to eat cooked fish and in the process of eating the fish and dying the server hung until it crashed. Upon reboot and login of server my inventory no longer existed. just as a suggestion I would implement a system like the graves mods have where on player death you take a snapshot of the inventory and then provide an admin command to restore it.
https://www.twitch.tv/videos/520323024 - here is a highlight of the entire process from me dying to server crashing and restarting to me logging in and losing my entire inventory. I am on Rustic Waters v 1.2 using whatever version of CorpseComplex comes with it
I haven't been able to shake out any more info on this but I remember that at one time I logged in and was dead. All items were showing in the hotbar but as soon as I respawned they were gone. Not sure if this helps at all but it might give a clue.
@TheIllusiveC4 I can surely provide error logs from the crash. I will get those late tonight when I get home from work. Tbh though as well designed as the pack is, it does have its quirks and random crashes and errors from other mods have happened. I can’t say with 100% certainty that this mod is particularly at fault and I know the errors I’ve seen in the crash logs were “Netty epoll” errors (whatever that means). It more so could have just been a sequence of events in the crash process that prevented certain code from being executed which would allow the inventory to be restored. Also, it was not the first time I crashed in the same manner during that stream. It just happened to be that particular instance in which the inventory did not restore itself. In addition, of all mod packs i have played this was the first that featured this mod. All others used some sort of graves mod. In the end I would continue to see if others run across the same issue and report it before diving too deep into fixing it. However, I do believe an admin command for inventory restoration would be a good compromise for the time being. Anyway, I’ll post the logs tonight for you to peruse.
here's a pastebin with the crash log at time of inventory loss https://pastebin.com/d29ycQfQ
Hmm, okay, that crash is due to a compatibility issue with EnderIO that I fixed a few days ago. #23
While I investigate whether or not it is related to the general inventory loss issue, I recommend anyone using EnderIO and Corpse Complex together to update to Corpse Complex version 1.0.7+ to avoid that particular crash/server hang issue.