aliens

Author Topic: Please add a warning, that there is no more space on HDD  (Read 6034 times)

Offline Vansi

  • Captain
  • ***
  • Posts: 86
    • View Profile
Please add a warning, that there is no more space on HDD
« on: September 25, 2018, 01:29:33 am »
Today I experienced plethora of strange errors with Open Xcom, and I was writing lenghty post about them, when I had EUREKA moment and I checked HDD - no more free space. So I purged 12 Gigs of old Piratez saves  ;) and I have request - please add a warning that there is not enough space on HDD to make savefile, or at least show on load/save screen, how much there is free space.     

In case someone is interested, here are symptoms, what happens when you don't have space on HDD:

1. Game starts in windowed mode, most (but not all) of your settings from options menu is restored to default.
2. List of items for autoselling after mission is cleared.
3. Game no longer takes screenshots.
4. Save files are incomplete and/or corrupted. They don't load at all, showing strange and cryptic error messages, or they load, but, for example from 8 your bases only 2 are still standing.         


Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Please add a warning, that there is no more space on HDD
« Reply #1 on: September 25, 2018, 03:44:17 pm »
Neglecting managing your hard disk space isn't an OXC issue, as there are often OS-level warnings when disk space is running low.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11721
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Please add a warning, that there is no more space on HDD
« Reply #2 on: September 25, 2018, 07:54:08 pm »
Just out of morbid curiosity: how many saves do you have?
Let's assume they're all battlescape saves (which makes no sense, but let's make it easier). Let's assume each one is 1 MB (which is probably too big, but again, let's be easy on the case).
12 GB is still well over ten thousand saved games.
...
What the hell were you doing? :)

Offline Stoddard

  • Colonel
  • ****
  • Posts: 485
  • in a fey mood
    • View Profile
    • Linux builds & stuff
Re: Please add a warning, that there is no more space on HDD
« Reply #3 on: September 25, 2018, 10:14:17 pm »
I have an idea - autosave after every UI click and autocommit to git. add a branch on reload. that way you keep full history of what was happening ;)

Offline Vansi

  • Captain
  • ***
  • Posts: 86
    • View Profile
Re: Please add a warning, that there is no more space on HDD
« Reply #4 on: September 26, 2018, 01:17:27 am »
Neglecting managing your hard disk space isn't an OXC issue, as there are often OS-level warnings when disk space is running low.

I disagree. If game creates corrupted savefiles that can erase days of progress with many missions due to lack of free space, then it is issue. Serious one. And it is easy to fix. And not every sigle OS provide warnings.     


Just out of morbid curiosity: how many saves do you have?
Let's assume they're all battlescape saves (which makes no sense, but let's make it easier). Let's assume each one is 1 MB (which is probably too big, but again, let's be easy on the case).
12 GB is still well over ten thousand saved games.
...
What the hell were you doing? :)

I am now in about 30th month of campaing. Geo saves are 4,5 mega, battle saves are 5-6 mega. But I checked size of the saves only in beginning of my first campaign, they were then like 0,1 or 0,2 mega, so I assumed that all saves are small/compressed and I had over 10 gigs of room. But they are not compressed. And when I was upgrading game several times, I was simply copying all saves from old version to new version, as I incorrectly thought that saves/freespace wouldn't be a problem. :)
And I save everyday after midnight and after missions.     

Offline Stoddard

  • Colonel
  • ****
  • Posts: 485
  • in a fey mood
    • View Profile
    • Linux builds & stuff
Re: Please add a warning, that there is no more space on HDD
« Reply #5 on: September 26, 2018, 02:58:25 am »
Now that I thought about it a bit more, Vansi's right.

Disk space management is not OXCE's task, but on the other hand operations should not fail silently.

Or at least not leave inconsistent state. One can understand not handling memory allocation failures, because in this case most conceivable actions would require more memory and it's a deadlock. But this is not the case here.

Offline Vansi

  • Captain
  • ***
  • Posts: 86
    • View Profile
Re: Please add a warning, that there is no more space on HDD
« Reply #6 on: September 26, 2018, 05:45:27 am »
on the other hand operations should not fail silently.

Exactly. When you are out of space on HDD, game still allows you to make multiple savegames, providing you with false sense of security that your progress has been saved. You save your game, end your gaming session, quit Xcom and there is not even a smallest hint that there is something wrong, not until you start game again.

And warning is enough to alt+tab, delete/move some old savefiles, and return to game - no progress is lost.   

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: Please add a warning, that there is no more space on HDD
« Reply #7 on: September 29, 2018, 01:35:20 am »
Most operations will fail silently, because most people don't want OpenXcom crashing over something trivial like a log file or a screenshot. However savegames should report errors, I'll have a look if something's missing.
We can't tell you what the cause is if an error occurs though. I/O errors amount to "something happened".

KZad Bhat

  • Guest
Re: Please add a warning, that there is no more space on HDD
« Reply #8 on: September 29, 2018, 07:26:59 am »
At the very least, if a program attempts to write a file, and the OS says it can't, doesn't the OS return a particular reason, with no space being one of those trapped and reported? Or has Windows gotten more like Mac than I've ever realized?

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: Please add a warning, that there is no more space on HDD
« Reply #9 on: October 28, 2018, 12:47:09 am »
At the very least, if a program attempts to write a file, and the OS says it can't, doesn't the OS return a particular reason, with no space being one of those trapped and reported? Or has Windows gotten more like Mac than I've ever realized?
The OS probably does, but that's not cross-platform. :P C++ just gives you a flag.
Anyways latest nightly should pop an error if a save fails for any reason, and won't corrupt your old save.