Jack_Frost Posted August 14 Report Posted August 14 (edited) I am running a large server and ran into a problem of the server's save file being corrupted, so I figured I would document my diagnosis and fix. Symptoms New generated chunks being nothing but void /wgen regen generating empty chunks Able to place blocks in empty chunks Can move freely inside empty chunks No error logs in world gen or server main log Diagnosis steps: First step I did was check to see if it was chunk corruption or a failure to generate new chunks. I did so by seeing if blocks could be placed inside the chunks that were showing signs of errors I tested /wgen regen in several already generated older chunks to see if the problem was isolated to the world generation or just the regen command I started a fresh save file with the same exact mods, configs, and seed to see if the issue was the server backend or a save file issue After narrowing the issue down to the save file I read this wiki doc to see how the save file is contructed. https://wiki.vintagestory.at/Modding:VCDBS_format After seeing the different tables and what purpose they serve, I concluded that the MapRegion table was corrupted. The Fix Generate back up of server save using: Quote /genbackup Stop the server Rename Default.vcdbs to: oldsave.vcdbs Generate a new save file with the same mods, configs, and serverconfig. This can be done by starting the server again after changing the name of the save; afterwards stop the server. *It is important that if you are changing minor terrain gen that you change it before this step. Rename the new Default.vcdbs to newsave.vcdbs Download SQLite3 via terminal command: (I am on a Ubuntu server) Quote apt install sqlite3 Drag the old save file and the new save file into the same folder Run this SQL command: sqlite3 oldsave.vcdbs <<'SQL' ATTACH DATABASE 'newsave.vcdbs' AS newdb; DELETE FROM mapregion; INSERT INTO mapregion (position, data) SELECT position, data FROM newdb.mapregion; DETACH DATABASE newdb; SQL You can check if it worked by running: sqlite3 oldsave.vcdbs "SELECT COUNT(*) FROM mapregion;" It should have a really small number. mine was 16 Delete the new save file as it is no longer needed. It is named "newsave.vcdbs" Rename the old save file back to: "Default.vcdbs" Start the server Run over to the old empty chunks and stand inside them. Regenerate these chunks using the /wgen regen command The empty chunks should regenerate as they did before. Edited August 15 by Jack_Frost forgot a detail and updated info 1
Professor Dragon Posted August 14 Report Posted August 14 Great documentation. You could always add it to the Guides thread: https://www.vintagestory.at/forums/forum/32-guides/ P.D. 1
Jack_Frost Posted August 15 Author Report Posted August 15 5 hours ago, Professor Dragon said: Great documentation. You could always add it to the Guides thread: https://www.vintagestory.at/forums/forum/32-guides/ P.D. I thought I did but I can make another post if that's allowed? I don't want to spam
Professor Dragon Posted August 15 Report Posted August 15 (edited) 7 hours ago, Jack_Frost said: I thought I did but I can make another post if that's allowed? I don't want to spam I say that it's fine. We don't really have strict admins. who police that type of thing. (But then again, I'm just some person on a forum.) P.D. Edited August 15 by Professor Dragon
Recommended Posts