Crash server on linux
nekds opened this issue ยท 6 comments
I use a private server(1.7.10 with Traincraft-4.4.0_016) and found a crush of server when I try to go to new village. All crashes is happened when TrainCraft try to write in file on creation a train-house. I think I need an options to dissable spawn train-houses. it is a one of a lot of crash-logs
Crash-Report: Click to expand
---- Minecraft Crash Report ---- // Quite honestly, I wouldn't worry myself about that.Time: 16.05.18 21:36
Description: Ticking entity
java.lang.RuntimeException: java.io.IOException: No file or directory
at train.common.core.handlers.TraincraftSaveHandler.createFile(TraincraftSaveHandler.java:29)
at train.common.api.AbstractTrains.manageChunkLoading(AbstractTrains.java:239)
at train.common.api.EntityRollingStock.func_70071_h_(EntityRollingStock.java:615)
at train.common.api.Freight.func_70071_h_(Freight.java:134)
at net.minecraft.world.World.func_72866_a(World.java:2070)
at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:648)
at net.minecraft.world.World.func_72870_g(World.java:2034)
at net.minecraft.world.World.func_72939_s(World.java:1887)
at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:489)
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:636)
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:334)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:396)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685)
Caused by: java.io.IOException: No file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:1012)
at train.common.core.handlers.TraincraftSaveHandler.createFile(TraincraftSaveHandler.java:24)
... 13 more
A detailed walkthrough of the error, its code path and all known details is as follows:
-- Head --
Stacktrace:
at train.common.core.handlers.TraincraftSaveHandler.createFile(TraincraftSaveHandler.java:29)
at train.common.api.AbstractTrains.manageChunkLoading(AbstractTrains.java:239)
at train.common.api.EntityRollingStock.func_70071_h_(EntityRollingStock.java:615)
at train.common.api.Freight.func_70071_h_(Freight.java:134)
at net.minecraft.world.World.func_72866_a(World.java:2070)
at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:648)
at net.minecraft.world.World.func_72870_g(World.java:2034)
at net.minecraft.world.World.func_72939_s(World.java:1887)
-- Entity being ticked --
Details:
Entity Type: tc.Freight Cart Small (train.common.entity.rollingStock.EntityFreightCartSmall)
Entity ID: 4288
Entity Name: Small Freight Car
Entity's Exact location: -1303,50, 81,65, 793,50
Entity's Block location: World: (-1304,81,793), Chunk: (at 8,5,9 in -82,49; contains blocks -1312,0,784 to -1297,255,799), Region: (-3,1; contains chunks -96,32 to -65,63, blocks -1536,0,512 to -1025,255,1023)
Entity's Momentum: 0,00, 0,00, 0,00
Stacktrace:
at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:489)
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:636)
-- Affected level --
Details:
Level name: world
All players: 1 total; [GCEntityPlayerMP['User'/4058, l='world', x=-1349,32, y=65,06, z=710,70]]
Chunk stats: ServerChunkCache: 519 Drop: 0
Level seed: 104702243
Level generator: ID 00 - default, ver 1. Features enabled: true
Level generator options:
Level spawn location: World: (212,64,144), Chunk: (at 4,4,0 in 13,9; contains blocks 208,0,144 to 223,255,159), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
Level time: 26406686 game time, 28451934 day time
Level dimension: 0
Level storage version: 0x04ABD - Anvil
Level weather: Rain time: 12810 (now: false), thunder time: 14625 (now: false)
Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: true
Stacktrace:
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:334)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:396)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685)
This is a general permissions issue with linux due to the old data management system, the "fix" is to be sure the game (and the mod's jar file) has permission to read and write in the server's "world/data" and "world/traincraft" folders, if not just straight the world folder and it's subfolders to be lazy about it.
The "world/traincraft" folder mentioned shouldn't be necessary because its using proper file management code, but this is linux we're talking about here.
I started the server as "root" and the folder is exist, the server has all rights. I fixed the bug via forge config, I set B:removeErroringEntities=true in forge.cfg and crashes was stopped. I noticed this happens when the trolley is rotated incorectly.
interesting....
that might actually be the answer to some bigger bugs, mostly said rotation bugs and other semi-related things...
very vague but idk the answers im gonna get, so i'll get back to this topic tomorrow after i've had time to experiment and stuff.
Alright, well, reply is a bit late, sorry about that, but I believe I found the related code that was causing issues.
aa4d728
If you got JDK setup as your default java version you can just use the setup.bat file, that basically automates the entire build process (you will need all the git files with it however, if that wasn't obvious).
In linux the command would be "gradlew setupDecompWorkspace --refresh-dependencies build" from the source code folder, I think.
If you're not up for that (most aren't), then yeah, let us know how it goes after the next release.