cuberite / cuberite

A lightweight, fast and extensible game server for Minecraft

Home Page:https://cuberite.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cuberite server crashes

emmomme opened this issue · comments

My self-compiled Cuberite server always crashes once within 24 hours, my server is Debian11, Clang 11.0.1 mips64 architecture, the following is the crash report, how can I solve this problem?

Err  [03:45:35] Verification failed: a_Out.WriteVarUTF8String(Response), file /home/itos/cuberite/cuberite/src/Protocol/ProtocolRecognizer.cpp, line 443
Err  [03:45:35] Failure report: 

  :(   | Cuberite has encountered an error and needs to close
       | SIGABRT: Server self-terminated due to an internal fault
       |
       | Cuberite local build (id: Unknown)
       | from commit approx: de5b89dbea938db5a7ea58f59a9b1a91d0df4208
commented

This looks like a crash that happens when decoding a status request. I think it could happen if the JSON response is greater than 6 kilobytes (this should probably be increased?). On line 145 of src/Protocol/ProtocolRecognizer.cpp, try changing this line:

cByteBuffer OutPacketBuffer(6 KiB);

To something like:

cByteBuffer OutPacketBuffer(32 KiB);

And recompile.

Also, if the server has a large server icon or a lot of data in the status message (e.g. lots of color codes or lots of players), that might explain why this isn't seen in other tests.
Maybe someone more familiar with the code could give a better answer.

Good luck!

Is your server icon EXACTLY 64 pixels in each dimension?

Okay, i modified both points, now it takes time to verify if it will crash, thank you two