-
Notifications
You must be signed in to change notification settings - Fork 56
Description
[BUG] v2.2 stable: Incorrect region file header
causes chunk reset/corruption when rejoining
Description
After updating to the newly public v2.2 (Docker image delivering VERSION=public
), the server begins throwing Incorrect region file header
errors that reset the chunk where my base is when I rejoin.
Initially, the server would not start on v2.2. I was able to start it by restarting the container, switching START_MODE
from 3 to 1, and restoring the /save_game/Region
folder from backup. The server then comes up and is playable.
However, when I rejoin, I remain in the same chunk, but many structures appear half-built. It looks like my base straddles a chunk border, and part of it is reset when the error occurs.
Logs
2025-08-08T15:28:24 37662.015 ERR ERROR: System.Exception: Incorrect region file header! /home/sdtdserver/.local/share/7DaysToDie/Saves/GalhofaWorld/save_game/Region/r.-2.-8.7rg
at RegionFileSectorBased.Get (System.String dir, System.Int32 rX, System.Int32 rZ, System.String ext) [0x00061] in <b84f98912e6941559bfc9ef2eadfd3ba>:0
at RegionFileAccessSectorBased.OpenRegionFile (System.String _dir, System.Int32 _regionX, System.Int32 _regionZ, System.String _ext) [0x00000] in <b84f98912e6941559bfc9ef2eadfd3ba>:0
at RegionFileAccessMultipleChunks.GetRFC (System.Int32 _regionX, System.Int32 _regionZ, System.String _dir, System.String _ext) [0x00067] in <b84f98912e6941559bfc9ef2eadfd3ba>:0
at RegionFileAccessMultipleChunks.Write (System.String _dir, System.Int32 _chunkX, System.Int32 _chunkZ, System.String _ext, System.Byte[] _buf, System.Int32 _bufLength) [0x0000c] in <b84f98912e6941559bfc9ef2eadfd3ba>:0
at ChunkMemoryStreamWriter.Close () [0x0002a] in <b84f98912e6941559bfc9ef2eadfd3ba>:0
at RegionFileChunkWriter.WriteStreamCompressed (System.String dir, System.Int32 chunkX, System.Int32 chunkZ, System.String ext, System.IO.MemoryStream memoryStream) [0x00077] in <b84f98912e6941559bfc9ef2eadfd3ba>:0
at RegionFileChunkSnapshot.Write (RegionFileChunkWriter writer, System.String dir, System.Int32 chunkX, System.Int32 chunkZ) [0x00008] in <b84f98912e6941559bfc9ef2eadfd3ba>:0
at ChunkSnapshotUtil.WriteSnapshot (IRegionFileChunkSnapshot snapshot, System.String dir, System.Int32 chunkX, System.Int32 chunkZ) [0x00000] in <b84f98912e6941559bfc9ef2eadfd3ba>:0
at RegionFileManager.DoSaveChunks () [0x00244] in <b84f98912e6941559bfc9ef2eadfd3ba>:0
2025-08-08T15:28:26 37664.015 ERR ERROR: System.Exception: Incorrect region file header! /home/sdtdserver/.local/share/7DaysToDie/Saves/GalhofaWorld/save_game/Region/r.-2.-8.7rg
at RegionFileSectorBased.Get (System.String dir, System.Int32 rX, System.Int32 rZ, System.String ext) [0x00061] in <b84f98912e6941559bfc9ef2eadfd3ba>:0
at RegionFileAccessSectorBased.OpenRegionFile (System.String _dir, System.Int32 _regionX, System.Int32 _regionZ, System.String _ext) [0x00000] in <b84f98912e6941559bfc9ef2eadfd3ba>:0
at RegionFileAccessMultipleChunks.GetRFC (System.Int32 _regionX, System.Int32 _regionZ, System.String _dir, System.String _ext) [0x00067] in <b84f98912e6941559bfc9ef2eadfd3ba>:0
at RegionFileAccessMultipleChunks.Write (System.String _dir, System.Int32 _chunkX, System.Int32 _chunkZ, System.String _ext, System.Byte[] _buf, System.Int32 _bufLength) [0x0000c] in <b84f98912e6941559bfc9ef2eadfd3ba>:0
at ChunkMemoryStreamWriter.Close () [0x0002a] in <b84f98912e6941559bfc9ef2eadfd3ba>:0
at RegionFileChunkWriter.WriteStreamCompressed (System.String dir, System.Int32 chunkX, System.Int32 chunkZ, System.String ext, System.IO.MemoryStream memoryStream) [0x00077] in <b84f98912e6941559bfc9ef2eadfd3ba>:0
at RegionFileChunkSnapshot.Write (RegionFileChunkWriter writer, System.String dir, System.Int32 chunkX, System.Int32 chunkZ) [0x00008] in <b84f98912e6941559bfc9ef2eadfd3ba>:0
at ChunkSnapshotUtil.WriteSnapshot (IRegionFileChunkSnapshot snapshot, System.String dir, System.Int32 chunkX, System.Int32 chunkZ) [0x00000] in <b84f98912e6941559bfc9ef2eadfd3ba>:0
at RegionFileManager.DoSaveChunks () [0x00244] in <b84f98912e6941559bfc9ef2eadfd3ba>:0
Steps to Reproduce
- Pull and run the Docker image that serves v2.2 (e.g.,
image: vinanrra/7dtd-server
withVERSION=public
). - Start the server with an existing world/save.
- In an area where the base likely spans a chunk boundary, log out and then rejoin (or wait for an autosave, then rejoin).
- Observe the log error and that parts of the base are reset, as if one side of the boundary rolled back.
Expected behavior
No region header errors; chunks remain intact and persistent after rejoin.
Actual behavior
On rejoin (from a different chunk), the server logs Incorrect region file header
and resets the affected chunk.
Workarounds Tried
- Restarting the container and changing
START_MODE
from 3 to 1. - Restoring
/save_game/Region
from a backup created by the service.
These steps allow the server to boot, but the issue reappears later and leads to chunk reset upon rejoin.
Environment
- Image:
vinanrra/7dtd-server
(public → v2.2) - Orchestration: Docker / docker-compose
- Networking: external Docker network
games
; an nginx at the edge performs TCP stream reverse proxy to this container because multiple game servers run on the same host. - Save path example:
/home/sdtdserver/.local/share/7DaysToDie/Saves/GalhofaWorld/save_game/Region/
- Mods: none enabled (unless image defaults apply)
docker-compose (for reference)
services:
7DaysToDie:
image: vinanrra/7dtd-server
hostname: 7dtd
container_name: 7dtd
restart: unless-stopped # INFO - NEVER USE WITH START_MODE=4 or START_MODE=0
environment:
- START_MODE=1 # Change between START MODES
- VERSION=public # Change between 7 days to die versions
- PUID=1000 # Remember to use same as your user
- PGID=1000 # Remember to use same as your user
- TimeZone=America/Sao_Paulo # Optional - Change Timezone
- TEST_ALERT=NO # Optional - Send a test alert
- UPDATE_MODS=NO # Optional - This will allow mods to be update on start, each mod also need to have XXXX_UPDATE=YES to update on start
- MODS_URLS="" # Optional - Mods urls to install, must be ZIP or RAR.
- ALLOC_FIXES=NO # Optional - Install ALLOC FIXES
- ALLOC_FIXES_UPDATE=NO # Optional - Update Allocs Fixes before server start
- UNDEAD_LEGACY=NO # Optional - Install Undead Legacy mod, if DARKNESS_FALLS it's enable will not install anything
- UNDEAD_LEGACY_VERSION=stable # Optional - Undead Legacy version
- UNDEAD_LEGACY_UPDATE=NO # Optional - Update Undead Legacy mod before server start
- DARKNESS_FALLS=NO # Optional - Install Darkness Falls mod, if UNDEAD_LEGACY it's enable will not install anything
- DARKNESS_FALLS_UPDATE=NO # Optional - Update Darkness Falls mod before server start
- DARKNESS_FALLS_URL=False # Optional - Install the provided Darkness Falls url
- CPM=NO # Optional - CSMM Patron's Mod (CPM)
- CPM_UPDATE=NO # Optional - Update CPM before server start
- BEPINEX=NO # Optional - BepInEx
- BEPINEX_UPDATE=NO # Optional - Update BepInEx before server start
- BACKUP=YES # Optional - Backup server
- BACKUP_HOUR=5 # Optional - Backup hour 0-23
- BACKUP_MAX=5 # Optional - Max backups to keep
- MONITOR=NO # Optional - Keeps server up if crash
volumes:
- ./Saves:/home/sdtdserver/.local/share/7DaysToDie/ # 7 Days To Die world saves
- ./LGSM-Config:/home/sdtdserver/lgsm/config-lgsm/sdtdserver # LGSM config folder
- ./ServerFiles:/home/sdtdserver/serverfiles/ # Optional - serverfiles folder
- ./log:/home/sdtdserver/log/ # Optional - Logs folder
- ./backups:/home/sdtdserver/lgsm/backup/ # Optional - If BACKUP=NO, backups folder
ports:
- 26900:26900/tcp # Default game ports
- 26900:26900/udp # Default game ports
- 26901:26901/udp # Default game ports
- 26902:26902/udp # Default game ports
networks:
- games
networks:
games:
external: true
Additional context
- I am not moved to another chunk when rejoining; I stay in the same chunk, but the base appears split across a boundary and loads partially reset.
- This started after v2.2 became public. I did not see this issue before.
- Happy to share a redacted save/region file for reproduction if helpful.
Questions
- Is there any migration or validation step required for region files in v2.2?
- Any known incompatibility/change in the region/chunk format between versions that could explain this?
- Would you like me to test a specific image tag or branch?