Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault on fresh build due to non-existent config files #50

Closed
jozef-mitro opened this issue Jun 19, 2015 · 2 comments
Closed

Comments

@jozef-mitro
Copy link
Contributor

I created fresh build on Ubuntu 14.04 (but I assume same would go for other plaforms) and I got segfaults due to recent.txt and keys.txt (the one inside config directory) not existing.

Fixing the recent.txt part is pretty easy. Just check inside PlayerInfo::LoadRecent() if creating ifstream was successful.

Fixing the keys.txt part would either require check before actually trying to load them or modifying, so that it can handle file not existing and either return error value or throw exception?

Btw. installing game from ppa didn't result in segfaults. I assume the config files are already created in those.

@endless-sky
Copy link
Collaborator

Oops. It looks like that's actually a bug I introduced recently when optimizing the file-loading code. Commit 35febc9 should fix it. (I tested it by deleting those files and found that the segfault goes away with that change.)

@jozef-mitro
Copy link
Contributor Author

I tested it as well. It does fix the issue.

tehhowch pushed a commit to tehhowch/endless-sky that referenced this issue Jul 12, 2017
tehhowch pushed a commit to tehhowch/endless-sky that referenced this issue Jul 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant