Mojira Archive
MC-39583

Server list randomly resets / servers.dat may be getting corrupted

Reminder: Provide log files

There are currently only a few log files or log snippets which hint at possible reasons why this bug occurs. Therefore please attach your log files to this report if your log contains any conspicuous errors or warning possibly containing either "Couldn't load server list" or "Couldn't save server list" . These logs are crucial to finding out what causes this bug.

The bug

The multiplayer server list (servers.dat) may reset itself or get corrupted.

How to reproduce

Some users wrote that this requires pressing the refresh button at a rapid rate but others said that this is not required.

Exact reproduction steps are unknown.

Known reasons

The following are log snippets showing why the server list could not be loaded in some cases. However, it does not explain how the server list became malformed in the first place.

  • [11:16:52 INFO]: Client> [11:16:52] [Client thread/ERROR]: Couldn't load server list
    [11:16:52 INFO]: Client> java.io.UTFDataFormatException: malformed input around byte 3
    
  • [16:37:42] [Client thread/ERROR]: Couldn't load server list
    java.io.FileNotFoundException: C:\Users\sclark2\AppData\Roaming\.minecraft\servers.dat (Access is denied)
    
  • [04:25:45] [Client thread/ERROR]: Couldn't load server list
    java.io.EOFException
    at java.io.DataInputStream.readByte(Unknown Source) ~[?:1.8.0_25]
    
  • Concurrent file access by other programs, for example Dropbox, see this comment.

Workaround

  1. Don't exit the game (else servers.dat_tmp will be deleted)
  2. Navigate to .minecraft/
  3. Rename the file servers.dat_tmp to servers.dat
  4. Refresh the list in the Game

Windows: You might as well be able to restore a previous version of the file by right clicking the current servers.dat file and selecting "Restore previous versions".

Try disabling programs which might access the file while Minecraft is currently trying to access it, for example Dropbox.