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

Failed To Write Player data #48291

Closed
Cpl-Jordan opened this issue Mar 31, 2021 · 39 comments · Fixed by #48308
Closed

Failed To Write Player data #48291

Cpl-Jordan opened this issue Mar 31, 2021 · 39 comments · Fixed by #48308
Labels
<Bug> This needs to be fixed (S2 - Confirmed) Bug that's been confirmed to exist
Milestone

Comments

@Cpl-Jordan
Copy link

Describe the bug

The game is unable to save data.

Steps To Reproduce

1.) Make a new world
2.) Start a new character
3.) Save and quit
4.) Fail message appears

Expected behavior

Being able to save my progress

Versions and configuration

  • OS: Windows
    • OS Version: 10.0 2004
  • Game Version: 0.E-10255-g6b8dd00 [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Bionic Professions [package_bionic_professions]
    ]
@ZhilkinSerg
Copy link
Contributor

Install your game to a folder you have write access to.

@RDru
Copy link
Contributor

RDru commented Mar 31, 2021

Updated to 0.E-10255-g6b8dd00 (tiles) / 11557 and also got this bug
1

@Cpl-Jordan
Copy link
Author

Install your game to a folder you have write access to.

I don't think that is the problem. I have the game installed in the same folder as always have. I use CDDA Game Launcher to update and keep me up to date. I haven't had this problem until Build 11557.

@Lamandus
Copy link
Contributor

Can confirm! 11556 is saving normally, while 11557 is erroring out on me, too.
The only update in 11557 is #48249

@Lamandus
Copy link
Contributor

Lamandus commented Mar 31, 2021

nvm also 11556 is throwing that error, but just after a while! Few saves before worked.
grafik

  • OS: Windows
    • OS Version: 10.0 2004
  • Game Version: 0.E-10253-g5715a33 [32-bit]
  • Graphics Version: Tiles
  • Game Language: English [en]
  • Mods loaded: [
    Dark Days Ahead [dda],
    meins [mine],
    Nonperishable Overhaul [Nonperishable_Overhaul],
    Fewer Farms [Fewer_Farms],
    SpeedyDex [speedydex],
    Stats Through Skills [StatsThroughSkills]
    ]

@BrettDong BrettDong added the <Bug> This needs to be fixed label Mar 31, 2021
@BrettDong BrettDong added this to the 0.F milestone Mar 31, 2021
@BrettDong BrettDong added the (S2 - Confirmed) Bug that's been confirmed to exist label Mar 31, 2021
@BrettDong
Copy link
Member

BrettDong commented Mar 31, 2021

Confirmed on macOS at 6b8dd00. Pre-existing worlds does not seem to be affected. The bug can be reproduced on a new created world.

@BrettDong
Copy link
Member

Fails here:

@BrettDong
Copy link
Member

Regression from #45316

@BrettDong
Copy link
Member

If I understand the code correctly, the problem here is that the new activity_history.average_activity() returns a continuous value, but log_activity_level expects a discrete value from {1, 2, 4, 6, 8, 10} defined in game_constants.h line 165:

constexpr float NO_EXERCISE = 1.0f;
constexpr float LIGHT_EXERCISE = 2.0f;
constexpr float MODERATE_EXERCISE = 4.0f;
constexpr float BRISK_EXERCISE = 6.0f;
constexpr float ACTIVE_EXERCISE = 8.0f;
constexpr float EXTRA_EXERCISE = 10.0f;

So save_activity encounters some value it doesn't recognise (0.0f in the screenshot above) and doesn't know how to serialise.

Ping @kevingranade

@wapcaplet
Copy link
Contributor

Confirmed here as well in 0.E-10255-g6b8dd0058f, simply creating a new world and saving, I get the "Failed to write player data" error.

@shmup
Copy link
Contributor

shmup commented Mar 31, 2021

this bug surfaces on linux too

@BrettDong definitely honed in on it

@actual-nh
Copy link
Contributor

I think I need to hold back on revisions to #47653 (due to #45316)... 0.0f? Lower than NO_ACTIVITY? Or is this also rescaled or something?

@zebbs
Copy link

zebbs commented Mar 31, 2021

This bug affects Linux, too, with the exact same error message. Sadly, it renders the game 100% unplayable. Good luck, devs.

@ZhilkinSerg
Copy link
Contributor

Sadly, it renders the game 100% unplayable. Good luck, devs.

There are thousands of versions that are not affected by this bug and playable, you know.

@zebbs
Copy link

zebbs commented Apr 1, 2021

Sadly, it renders the game 100% unplayable. Good luck, devs.

There are thousands of versions that are not affected by this bug and playable, you know.

You can't even save and quit. You have to switch out of the game and manually kill it. Thanks for your brilliant insights, though. CDDA is lucky to have someone with your skills on their team.

@ZhilkinSerg
Copy link
Contributor

Sadly, it renders the game 100% unplayable. Good luck, devs.

There are thousands of versions that are not affected by this bug and playable, you know.

You can't even save and quit. You have to switch out of the game and manually kill it. Thanks for your brilliant insights, though. CDDA is lucky to have someone with your skills on their team.

Have you started doing backups already?

@zebbs
Copy link

zebbs commented Apr 1, 2021

Sadly, it renders the game 100% unplayable. Good luck, devs.

There are thousands of versions that are not affected by this bug and playable, you know.

You can't even save and quit. You have to switch out of the game and manually kill it. Thanks for your brilliant insights, though. CDDA is lucky to have someone with your skills on their team.

Have you started doing backups already?

Have you started learning social skills?

@Mom-Bun
Copy link
Contributor

Mom-Bun commented Apr 1, 2021

Sadly, it renders the game 100% unplayable. Good luck, devs.

There are thousands of versions that are not affected by this bug and playable, you know.

You can't even save and quit. You have to switch out of the game and manually kill it. Thanks for your brilliant insights, though. CDDA is lucky to have someone with your skills on their team.

It is called "experimental" for a reason, if you want a guarantee that you'll have a playable game, simply check out stable, that is guaranteed to work and be stable!

However, since this is experimental, and old builds still exist right now, and the current one is broken, simply download an old build, and practice safety in either backing up, or not updating to a new experimental every day.

@Kragh50
Copy link

Kragh50 commented Apr 1, 2021

Sadly, it renders the game 100% unplayable. Good luck, devs.

There are thousands of versions that are not affected by this bug and playable, you know.

You can't even save and quit. You have to switch out of the game and manually kill it. Thanks for your brilliant insights, though. CDDA is lucky to have someone with your skills on their team.

I mean, he could have been nicer about his answer, but he's not wrong. If you have automatic backup when updating (which you should do when playing experimental), you can just load the backup and update later when it's fixed.

@zebbs
Copy link

zebbs commented Apr 1, 2021

There are thousands of versions that are not affected by this bug and playable, you know.

You can't even save and quit. You have to switch out of the game and manually kill it. Thanks for your brilliant insights, though. CDDA is lucky to have someone with your skills on their team.

It is called "experimental" for a reason, if you want a guarantee that you'll have a playable game, simply check out stable, that is guaranteed to work and be stable!

However, since this is experimental, and old builds still exist right now, and the current one is broken, simply download an old build, and practice safety in either backing up, or not updating to a new experimental every day.

I have playing "other versions" for the last 8 months: Bright Nights. I seem to have picked a bad time to check out Kevin's CDDA fork again.

As for backups, I'd love to be able to save a CDDA game at all. Good job, assuming I've been riding your train wreck this whole time.

@actual-nh
Copy link
Contributor

I have playing "other versions" for the last 8 months: Bright Nights. I seem to have picked a bad time to check out Kevin's CDDA fork again.

Well, yes, you did, I agree. I suggest if you're going to try a game out very occasionally, you might want to do so when it has a stable release.

@BrettDong
Copy link
Member

Build 11552 is a relatively safe version to play at the moment.

@ZhilkinSerg
Copy link
Contributor

There are thousands of versions that are not affected by this bug and playable, you know.

You can't even save and quit. You have to switch out of the game and manually kill it. Thanks for your brilliant insights, though. CDDA is lucky to have someone with your skills on their team.

It is called "experimental" for a reason, if you want a guarantee that you'll have a playable game, simply check out stable, that is guaranteed to work and be stable!
However, since this is experimental, and old builds still exist right now, and the current one is broken, simply download an old build, and practice safety in either backing up, or not updating to a new experimental every day.

I have playing "other versions" for the last 8 months: Bright Nights. I seem to have picked a bad time to check out Kevin's CDDA fork again.

As for backups, I'd love to be able to save a CDDA game at all. Good job, assuming I've been riding your train wreck this whole time.

So, you are still not doing any backups. If that did not taught you anything, go play more BN probably.

@zebbs
Copy link

zebbs commented Apr 1, 2021

So, you are still not doing any backups. If that did not taught you anything, go play more BN probably.

I can't do any backups in CDDA because the game is no longer capable of saving at all. BrettDong has got this bug almost completely figured out, meanwhile you MomBun are acting like cultists, accusing people of having write permissions set incorrectly, or failing to have backups. Are you people developers, or trolls?

@BrettDong
Copy link
Member

accusing people of having write permissions set incorrectly

This is a natural intuition when seeing this bug report at the first glance and I don't see it inappropriate in any aspect.

@actual-nh
Copy link
Contributor

Are you people developers, or trolls?

Umm.... are you a troll? Given that you're laughing at your own posts (see above)...

@meelock
Copy link
Contributor

meelock commented Apr 1, 2021

@actual-nh He has been banned from the official discord server, it is safe to say that he is indeed a troll.

@actual-nh
Copy link
Contributor

accusing people of having write permissions set incorrectly

This is a natural intuition when seeing this bug report at the first glance and I don't see it inappropriate in any aspect.

True, although one would hope that write permissions being set incorrectly would result in an error message that's more specific. Admittedly, this can be due to OS bugs.

@actual-nh
Copy link
Contributor

@actual-nh He has been banned from the official discord server, it is safe to say that he is indeed a troll.

@meelock: I've had a problem myself with getting registered with the discord server - the account registration protection mechanism doesn't like my email address, and assumes that I've got a Facebook/whatever account if I'm legit, which isn't the case. Any suggestions?

@meelock
Copy link
Contributor

meelock commented Apr 1, 2021

@actual-nh That's a bit strange indeed, I have encountered a similar issue with registering for a image hosting website... I think you might need to use a gmail account for discord, I don't remember it needing a facebook account though. I think the discord server is worth joining, but there is no particular advantage of joining.

@esotericist
Copy link
Contributor

esotericist commented Apr 1, 2021

@actual-nh He has been banned from the official discord server, it is safe to say that he is indeed a troll.

@meelock: I've had a problem myself with getting registered with the discord server - the account registration protection mechanism doesn't like my email address, and assumes that I've got a Facebook/whatever account if I'm legit, which isn't the case. Any suggestions?

given your established presence within the project, i think we can work something out if you contact a member of the moderation team while in the pre-authorization lobby.

edit: also, it should let you associate your github account with your discord account; the bot is supposed to be looking for associations between the discord account and other long-term internet presences. i would expect github to qualify.

@ZhilkinSerg
Copy link
Contributor

So, you are still not doing any backups. If that did not taught you anything, go play more BN probably.

I can't do any backups in CDDA because the game is no longer capable of saving at all. BrettDong has got this bug almost completely figured out, meanwhile you MomBun are acting like cultists, accusing people of having write permissions set incorrectly, or failing to have backups. Are you people developers, or trolls?

There are thousands of CDDA versions capable of saving everything correctly - use one of them.

@ZhilkinSerg
Copy link
Contributor

accusing people of having write permissions set incorrectly

This is a natural intuition when seeing this bug report at the first glance and I don't see it inappropriate in any aspect.

True, although one would hope that write permissions being set incorrectly would result in an error message that's more specific. Admittedly, this can be due to OS bugs.

There are just a few custom error messages now (writing/opening/moving file failed). Exceptions сould be more meaningful after we switch to std:filesystem.

@actual-nh
Copy link
Contributor

actual-nh commented Apr 1, 2021

I've had a problem myself with getting registered with the discord server - the account registration protection mechanism doesn't like my email address, and assumes that I've got a Facebook/whatever account if I'm legit, which isn't the case. Any suggestions?

given your established presence within the project, i think we can work something out if you contact a member of the moderation team while in the pre-authorization lobby.

Thanks! I will see about it sometime soon if possible; it's coming up on the end of the semester, and I admit to having procrastinated on some grading... sigh. I may need to hold off until after the semester is over, to avoid getting distracted.

edit: also, it should let you associate your github account with your discord account; the bot is supposed to be looking for associations between the discord account and other long-term internet presences. i would expect github to qualify.

I think it may have been because this was a few months back - KorGgenT was wondering if we could conference on the discord server about a PR I was helping someone with.

@Mom-Bun
Copy link
Contributor

Mom-Bun commented Apr 1, 2021

So, you are still not doing any backups. If that did not taught you anything, go play more BN probably.

I can't do any backups in CDDA because the game is no longer capable of saving at all. BrettDong has got this bug almost completely figured out, meanwhile you MomBun are acting like cultists, accusing people of having write permissions set incorrectly, or failing to have backups. Are you people developers, or trolls?

Here, I'll spell it out for you:

Back up: "make a spare copy of data or a disk."

Now, since you weren't playing CDDA as you admitted, there is nothing to back up.

So the solution, (now I'm being nice here, and presuming you actually want a fix and just being incredibly obtuse here) is to download an earlier build that allows saving and play on that one

Or the other solution, if you actually aren't looking to fix this and just wanting to cause problems: stop purposefully trying be a troll and be a problem on the github here just like how you decided to get yourself banned from the development discord just to be a problem. Stop obsessing over DDA, basing your entire personality around hating it and the developers, and just play BNs and have fun.

@kevingranade
Copy link
Member

This issue has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there:

https://discourse.cataclysmdda.org/t/cant-download-the-game/26177/4

@Moltenhead
Copy link
Contributor

The issue can get temporarily fixed reverting 8bc8877. At least it worked on my part.

@actual-nh
Copy link
Contributor

actual-nh commented Apr 2, 2021

The issue can get temporarily fixed reverting 8bc8877. At least it worked on my part.

That is something people can do until #48308 is fully functional (currently has a bug w/regard to multiple saves) and in master, yes. EDIT: As it turns out, the bug already existed; it just wasn't seen without #48308.

@assumecroons
Copy link

The behavior happened for me on 0.E-10268-g7c4d41985d with curses under Debian 10.9 (stable).

The temporary fix (git revert -n 8bc8877 and then re-build) worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bug> This needs to be fixed (S2 - Confirmed) Bug that's been confirmed to exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.