Anuken / Mindustry

The automation tower defense RTS
https://mindustrygame.github.io
GNU General Public License v3.0
22.55k stars 2.95k forks source link

Mindustry map crash #8814

Closed rekokoro closed 1 year ago

rekokoro commented 1 year ago

Platforms

Windows

Build

145.1

Issue

Continuation of #8767
Map continues to crash with error EOFException. After crashing map becomes corrupted so I can't figure out what exactly on map causes the crash. Server isn't an issue here as it running safe and sound.

Steps to reproduce

Open the map and on some point it starting to throw up EOF exception or Tiles array index overflow.

Map uses around 60 world processors so the issue can be caused from one of them.

I've attached original map and crashed map for comparation.

Mods used

No response

Save file

original.zip error.zip error7_16.zip

(Crash) logs

crashfile.txt

Submission

SITUVNgcd commented 1 year ago

Are you sure about crashlog?

crash-report-01_01_2023_18_46_42.txt

Ohno, the game has crashed. Report this at: https://discord.gg/yp9ZW7j

Copy paste the report below when reporting:
```java
Version: release build 140.4
(Foo's Client Version: f67e6ce, Dec. 20, 2022 Unstable)
Source: mindustry-antigrief/mindustry-client-v7-builds
OS: Windows 11 x32 (x86)
Java Version: 1.8.0_341
Runtime Available Memory: 247mb
Cores: 8
Mods: bridging:v1.1.10, sakura-japanese-mod:2.3, extra-logging:1.5.5, scheme-size:2.6.1

arc.util.ArcRuntimeException: arc.util.ArcRuntimeException: Couldn't load dependencies of asset: Vars
....

This crash log is long time ago and for Foo client 140, not vanila 145

rekokoro commented 1 year ago

That's the list of all crash logs from export, Newest are at the bottom.

Kieaer commented 1 year ago

Last week I saw someone on my server compromising map save files with a world processor.

Thought it was just a bug, but with this issue, I presume it's a critical bug that can be reproduced.

buthed010203 commented 1 year ago
  1. Those logs include logs from months ago
  2. The logs leak a bunch of people's uuids lmao
rekokoro commented 1 year ago

Cleared old logs and some admin stuff

rekokoro commented 1 year ago

New crash from 7/16

Error log:


[I] Received world data: 183906 bytes.
[I] Disconnecting.
[E] java.lang.RuntimeException: java.io.IOException: Could not skip bytes. Expected length: 30062; Actual length: 10045
    at mindustry.net.NetworkIO.loadWorld(NetworkIO.java:86)
    at mindustry.core.NetClient.lambda$new$6(NetClient.java:165)
    at mindustry.net.Net.handleClientReceived(Net.java:293)
    at mindustry.net.Net.handleClientReceived(Net.java:285)
    at mindustry.net.ArcNetProvider$1.lambda$received$2(ArcNetProvider.java:83)
    at arc.util.TaskQueue.run(TaskQueue.java:17)
    at arc.backend.sdl.SdlApplication.loop(SdlApplication.java:195)
    at arc.backend.sdl.SdlApplication.<init>(SdlApplication.java:54)
    at mindustry.desktop.DesktopLauncher.main(DesktopLauncher.java:57)
Caused by: java.io.IOException: Could not skip bytes. Expected length: 30062; Actual length: 10045
    at mindustry.io.SaveFileReader.skipChunk(SaveFileReader.java:177)
    at mindustry.io.SaveVersion.readMap(SaveVersion.java:315)
    at mindustry.net.NetworkIO.loadWorld(NetworkIO.java:82)
    ... 8 more```
Anuken commented 1 year ago
rekokoro commented 1 year ago
  • Just like last time, there is very little I can do with this information. Unless you can identify specific actions that corrupt the map, I can't help.

I've found it. Map utilizes legacy-mech-pad for some logic (it's a 1x1 block ingame) and if placed it instantly swapes with air via logic. But there's a specific case when those blocks don't dissappear and placing two of them or more on map results in crash.

I've made a map to demonstrate it. bug4.zip

Load the map, place map, save the map -> pad dissapears Load the map, place 2 mech pad, save the map -> map's corrupted On server even single placed pad are cause array out of bounds error

Anuken commented 1 year ago

I've found it. Map utilizes legacy-mech-pad for some logic

Do not do this. These are internal blocks and are never to be used!

The fix here is to prevent logic from accessing legacy blocks.