glest / glest-source

Glest is a network multi-player cross-platform 3D real-time strategy (RTS) game, where you create armies of units and battle different factions.
https://glest.io
GNU General Public License v3.0
56 stars 39 forks source link

Glest fails to create a user .glest directory and fails to crash when it cannot launch. #298

Open Jammyjamjamman opened 5 years ago

Jammyjamjamman commented 5 years ago

If glest cannot access resources e.g. user files, it stops working but doesn't crash. This means glest has to be killed using kill -kill <glest-pid>.

It also fails to generate a .glest user directory freezes soon after due to this.

andy5995 commented 5 years ago

I think that might be related to this:

andy@oceanus:~/Downloads$ ./Glest-2.0-x86_64.AppImage

File NOT FOUND, can't open file: [/home/andy/.glest/glestuser.ini]

shows in the terminal, nothing happens. no crash, doesn't go back to the prompt.

andy5995 commented 5 years ago

That should be easy enough to fix, btw. I wrote a function that'll first check for the existence of a directory, and create it if it doesn't exist: https://github.com/theimpossibleastronaut/rmw/blob/master/src/utils_rmw.c#L36

Another option is to use the boost library... But I tend to think there may already be a function in the existing code base that does that (I never had that problem with MegaGlest).

Jammyjamjamman commented 5 years ago

Just thought I'd leave an update here: afaik, @mathusummut has a plan to replace current file loading/ saving code with something better on this project, which is why a bugfix is not being rushed out.