Save Project logical issue

Started by WAS, April 07, 2018, 01:04:22 AM

Previous topic - Next topic

WAS

So there is a logical issue with projects, and saving, and the backup file. When you save a file, both the backup, and the project are saved to. Seems very normal, but I've been having issues with a buggy GUI, and the compute stick I'm using is within spec of minimum system requirements, but often, it crashes. One of the crashes, is during saving. And when this happens... it overwrites my project with the null character, as WELL as the backup file at the same time, so when I recover and open my broken, it's broken, when I go to rename the backup and use it, it is the same broken file.

It seems beneficial in scenarios like this that the backup file is not saved until the master file is saved with a successful write.

I've lost a few files now to this issue with Ctrl + Save and TG just Crashing to Desktop without error. Forcing me to restart on ideas, loosing two really good ones that I can't recreate.

jaf

I've gotten into the habit of saving incrementally quite often. Also, enable "Always save project file incrementally" in preferences.  Each Ctrl-S then does an incremental save.  Wish I could assign that key sequence to Shift-S so it would be like the Lightwave incremental save.
(04Dec20) Ryzen 1800x, 970 EVO 1TB M.2 SSD, Corsair Vengeance 64GB DDR4 3200 Mem,  EVGA GeForce GTX 1080 Ti FTW3 Graphics 457.51 (04Dec20), Win 10 Pro x64, Terragen Pro 4.5.43 Frontier, BenchMark 0:10:02

WAS

Quote from: jaf on April 07, 2018, 03:40:59 AM
I've gotten into the habit of saving incrementally quite often. Also, enable "Always save project file incrementally" in preferences.  Each Ctrl-S then does an incremental save.  Wish I could assign that key sequence to Shift-S so it would be like the Lightwave incremental save.

Thanks for letting me know about that. Going to try that setting.

Though I still believe this is a logical issue with the idea of file preservation through backups. I've done a lot of data management in other languages, and while that may mean nothing here, I always have done primary saves separate from backup saves (often writing an entirely separate object for backup "systems" but that may be my OCD) since the backup should retain a working file/system image/database. When you save both at the same time, and there is a system failure, for whatever reason, the backup is not harmed as it's function hadn't initiated. This also preserved the file in the event of another failure (system stability) when the file is restored and another save attempt and crash happens.

Matt

The backup file should simply be the old file renamed. We only save one file during save, and do either a "swap" or rename (I forget which, we had two different ways of handling this in the past). If the backup is corrupted too then it might mean the previous save was also corrupted. Why that happened I do not know. On the other hand it could be something failing in the file swap, which we do in some places specifically to avoid the possibility of corruption, ironically. My memory is vague on this.

Can you tell whether a file is good or bad from the file size? Please use incremental save and let us know what sort of ratio of good files to bad files you get. Is it possible that every file is corrupted? Or have you had some files successfully save and reopen?

Matt
Just because milk is white doesn't mean that clouds are made of milk.

Matt

#4
Quote from: WASasquatch on April 07, 2018, 01:04:22 AM
it overwrites my project with the null character

What do you mean by this? I can't check the .tgd at the moment but I see that it's 35kb. What's in the file (it's text so you can inspect it) and what error do you get when you open it?

Matt
Just because milk is white doesn't mean that clouds are made of milk.

jaf

Seems to load and save fine on my PC.  It loads to 5.5GB of memory and uses 6.4GB @4 threads (Galaxy Render.)
(04Dec20) Ryzen 1800x, 970 EVO 1TB M.2 SSD, Corsair Vengeance 64GB DDR4 3200 Mem,  EVGA GeForce GTX 1080 Ti FTW3 Graphics 457.51 (04Dec20), Win 10 Pro x64, Terragen Pro 4.5.43 Frontier, BenchMark 0:10:02

WAS

Quote from: Matt on April 07, 2018, 05:59:21 AM
Quote from: WASasquatch on April 07, 2018, 01:04:22 AM
it overwrites my project with the null character

What do you mean by this? I can't check the .tgd at the moment but I see that it's 35kb. What's in the file (it's text so you can inspect it) and what error do you get when you open it?

Matt
a null character is nothing, a binary 0, it's represented in programs like Notepad++ as a "null" character. A black pill symbol that says "NULL".

This is a random occurance out of hundreds of saves (I Ctrl + Save out of habit after any change)

WAS

#7
Quote from: jaf on April 07, 2018, 12:36:45 PM
Seems to load and save fine on my PC.  It loads to 5.5GB of memory and uses 6.4GB @4 threads (Galaxy Render.)

Strange. It only contains a bunch of null characters and only loads to a blank project complaining about parse errors and no camera

I loaded the file again and it does load. I am so confused. Literally all I have done is removed bloatware from the computer stick like camera import software and media center suite.

Though your memory usage is something to be desired. This stick only has 4gb. Not sure how you get so much more usage when I can run it and render it on 3.5gb usable memory.

Update: Seems this 64gb of memory is actually 32gb of memory, but shows 64gb of memory? I tried to install Blender which put me at 34gb space used, and the files that were created had no icons and were corrupted. I uninstalled Fallout 3, which put me at 24gb, and reinstalled blender, and it was fine. Maybe this is why I got this free. Is it bootleg? Never heard of this other than online scams for flash drives and sd cards from China.