Author Topic: [BUG][PLAYER] "An error occurred while trying to save data"  (Read 1661 times)

0 Members and 1 Guest are viewing this topic.

Offline WillLem

  • Posts: 2460
  • "I declare before you all..."
    • View Profile
[BUG][PLAYER] "An error occurred while trying to save data"
« on: March 22, 2020, 04:50:36 AM »
Not sure what I've done wrong, but I'm seeing this in between almost every level load, and at other random times as well.
« Last Edit: January 08, 2021, 12:27:11 AM by WillLem »

Offline namida

  • Administrator
  • Posts: 12190
    • View Profile
    • NeoLemmix Website
Re: [BUG][PLAYER] "An error occurred while trying to save data"
« Reply #1 on: March 22, 2020, 06:15:32 AM »
Do you:
a) have multiple instances of NeoLemmix running at once?
b) have any of the files in the "settings" folder open in another app (such as a text editor)?
c) have your NeoLemmix folder anywhere it'd be automatically backed up?
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline WillLem

  • Posts: 2460
  • "I declare before you all..."
    • View Profile
Re: [BUG][PLAYER] "An error occurred while trying to save data"
« Reply #2 on: March 22, 2020, 09:15:36 AM »
c) have your NeoLemmix folder anywhere it'd be automatically backed up?

This one: my desktop gets automatically backed up to my GDrive, and the NeoLemmix folder is on the desktop. I'm guessing I should move it?

But, I like that it automatically gets backed up tbh... I guess I can put up with the odd error message. It's not all that frequent, actually. And it usually happens more when I've changed something (for example, added a new levelpack or moved stuff around within NL's folders), so this would explain it.
« Last Edit: March 22, 2020, 09:45:10 PM by WillLem »

Offline namida

  • Administrator
  • Posts: 12190
    • View Profile
    • NeoLemmix Website
Re: [BUG][PLAYER] "An error occurred while trying to save data"
« Reply #3 on: March 22, 2020, 10:14:12 AM »
Okay, so - this is likely happening because GDrive is trying to back up the config file, at the same time as NL is trying to save it. NL saves the configuration (and progress) every time you move between screens, as well as upon exiting.

My initial thought here:
- When transitioning between screens, if the files can't be saved, fail silently (ie: just accept that saving failed, and continue without saving, without displaying an error)
- When exiting NeoLemmix, if the files can't be saved, either wait a short time and try again (a few seconds), or save to an alternate filename and alert the user

Perhaps also, some tracking of if the contents have changed (or at least if they've potentially changed; eg. simply check "has the user opened the config dialog since the last time settings were saved?").
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline Proxima

  • Posts: 4435
    • View Profile
Re: [BUG][PLAYER] "An error occurred while trying to save data"
« Reply #4 on: January 14, 2022, 09:07:22 PM »
I asked namida in discord to bump this. I've been having this problem now that I'm on a Windows 10 machine with OneDrive, and namida thinks it might be possible to fix.

Offline WillLem

  • Posts: 2460
  • "I declare before you all..."
    • View Profile
Re: [BUG][PLAYER] "An error occurred while trying to save data"
« Reply #5 on: January 14, 2022, 10:12:31 PM »
This only ever happens when GDrive is running. If I pause syncing (or if it's otherwise inactive), it doesn't happen. GDrive also interferes with a number of other processes, like saving or loading levels which are currently being synced.

Offline namida

  • Administrator
  • Posts: 12190
    • View Profile
    • NeoLemmix Website
Re: [BUG][PLAYER] "An error occurred while trying to save data"
« Reply #6 on: January 15, 2022, 04:47:24 PM »
I asked namida in discord to bump this. I've been having this problem now that I'm on a Windows 10 machine with OneDrive, and namida thinks it might be possible to fix.

Not so much fix per se, but rather, possible to implement workarounds for, based on either (a) just accepting failure silently in cases where saving is not critical, and (b) in cases where it is critical (or at least as close to that as saving your settings in a Lemmings clone comes :P ), respond to failure by waiting a short time then trying again, raising an error message only in the case of repeated failure (after perhaps 3 attempts).
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)