pg9182 / northstar-dedicated

Docker image for the Northstar dedicated server.
https://ghcr.io/pg9182/northstar-dedicated
zlib License
101 stars 18 forks source link

Container crashes when trying to write file #63

Closed Legonzaur closed 1 year ago

Legonzaur commented 1 year ago

When trying to write in a file using NSSaveFile, container kills itself unpromptedly

void function SavePlayerCount(){
    NSSaveFile("playerCount.txt", file.playerCount.tostring())
}
version: "3.1"

services:

  northstar:
    image: ghcr.io/pg9182/northstar-dedicated:1-tf2.0.11.0
    ports:
      - '37015:37015/udp'
    volumes:
      - ./Titanfall2:/mnt/titanfall:ro
      - ./test:/mnt/save_data:rw
      - ./NorthstarPlayerCount:/mnt/mods/NorthstarPlayerCount:ro
    environment:
      - 'NS_SERVER_NAME=your server name'
      - 'NS_SERVER_DESC=your server description'
      - 'NS_MASTERSERVER_REGISTER=0'
      - 'NS_INSECURE=1'

image

pg9182 commented 1 year ago

The crash is a bug in Northstar.

Also remember to check the permissions on that test folder.

Legonzaur commented 1 year ago

My bad yeah, it was indeed a pemission issue. The test directory was owned by root, and the issue didn't occured after I chowned it.

This behaviour seems different on Windows : when setting the file to "Read Only", Northstar doesn't seems to be able to write on it, but doesn't crashes either.

pg9182 commented 1 year ago

Again, exceptions aren't being caught correctly in NS. There must be a linter for this...