History lost when minecraft is killed - 201.5.5
Nemo157 opened this issue ยท 2 comments
Description
If minecraft is killed for some reason (e.g. OOM) the history from the latest session is not recorded.
How to reproduce
Join a server, have some chat, kill -9 minecraft
, rejoin server and notice there is no chat.
Expected result
The history should have been saved already and reappear when rejoining.
Specs and Details
- Mod version:
201.5.5
Additional context
I'd highly recommend using sqlite for storing the history, to make it easier to insert lines as they're received and avoid corrupting it if there is a crash while saving.
i think my solution for this will just be to save the ChatLog when the game autosaves (singleplayer) or on some other, probably customizable interval. i'll also make sure to put manual buttons in the config for saving/loading/emptying it.
however, be warned this solution will release for the latest version first, likely 1.20.2. i would try to update to 1.20.2 if possible