Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Thanks, I will direct folks to use environment variables in the meantime.

Sorry to jump in with another thing. This is a bug report I received that I’m passing along. No expectation that you have to fix but an FYI and my apologies for the length:

First I ran the game with `strace ./sfp` and among all the output, two
    | interesting lines showed up:
    | 
    | openat(AT_FDCWD, "game//news/2025-01-07.txt", O_WRONLY|O_CREAT|O_TRUNC, 0666) = -1 EACCES (Permission denied)
    | --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0xc0
    | 
    | So I did an `ls -l game/news/` and among many others:
    | -rw-rw-r-- 1 jules     jules      652 Jan  7 00:15 2025-01-07.txt
    | 
    | It seems that the news for that day is generated when the first player for that
    | day logs in, and this file is created with the user and group of the player
    | playing. The perms are 664 for some reason and not 666, which is not normally
    | an issue because usually reading the news is enough for other players.
    | 
    | Note that the openat() call specifies "O_WRONLY" or "write-only" however. I
    | noticed in the past that if a player levels up a skill, this is shown in the
    | news. Updating the news to reflect this requires write access to the file, not
    | just read access. However, if the player who leveled up is not the same person
    | that logged in for the first time that day and created the news file, the news
    | for that day cannot be updated due to lack of write permissions. The game fails
    | to take this into account and ends up crashing.
    | 
    | Running the game with `gdb ./sfp` shows where the game segfaults more precisely:
    | 
    | Program received signal SIGSEGV, Segmentation fault.
    | __vfprintf_internal (s=0x0, format=0x530cc6 "%s\n", ap=ap@entry=0x7fffffffa160, mode_fl
    | ags=mode_flags@entry=0) at ./stdio-common/vfprintf-internal.c:1218
    | 
    | s is basically the location to read from, but it's 0x0 or NULL, and trying to
    | read from that location results in a crash. My guess is that it is trying to
    | print the news it just tried to write...? Not sure really.
    | 
    | I kinda wrote this for myself because oddly enough I enjoyed figuring out why
    | the game was not working for me, but maybe we should send this to the author
    | of the game as a bug report?
    | 
    | So basically I need to be the first one to play the next day or else I can
    | never play again. Unfortunately, if another player levels up the same day then
    | the game will crash for them. Hm.

Hmm. That's odd. Which OS is this, again?

I'll add it to my to-fix list.

Thanks. We’re running Ubuntu 22.04.5 LTS.

I presume you've already done so, but if you change the directory permissions it should be fine for future days.