viewtopic.php?f=7&t=3086BryanFRitt wrote: ↑Tue Jun 30, 2020 12:10 am Several times during playing there were these crashes where it lost old save data, old high scores, and/or list of completed levels. Instead of writing directly to [existing] files RnD should finish a temp file and then rename that. This would minimize the likelihood of data loss if something were to happen during writing. (If RnD already does so, I never found out about it during my playing)
Write to a temp file 1st.
Moderators: Flumminator, Zomis
-
- Posts: 255
- Joined: Mon Nov 13, 2017 4:16 pm
Write to a temp file 1st.
--- Strike a balance between generating new things/ideas, and being good/organized. Pick somewhere between a gibberish mess and nothing said/done. ---
--- Core RnD + lots of RnD downloads completed ---
--- Core RnD + lots of RnD downloads completed ---
Re: Write to a temp file 1st.
If you encounter lots of crashes that may be caused by bad memory (see other thread), trying to fix your system seems to be better than trying to work around the resulting data loss. 

-
- Posts: 255
- Joined: Mon Nov 13, 2017 4:16 pm
Re: Write to a temp file 1st.
An analogy would be wearing helmet and elbow/knee pads when doing a stunt. Sure it doesn't reduce the chances of an accident happening, but it would likely reduce the damage done if an accident occurs.
complete temp file creation in temp folder / copy temp file / rename(overwriting old file, if need be) / delete temp file(s)
complete temp file creation in temp folder / copy temp file / rename(overwriting old file, if need be) / delete temp file(s)
source: https://softwareengineering.stackexchan ... -to-the-in"TL;DR - it mostly boils down to atomicity, that is, you want to make it so that (at the final location) the file is either complete or not there at all at any given time."
--- Strike a balance between generating new things/ideas, and being good/organized. Pick somewhere between a gibberish mess and nothing said/done. ---
--- Core RnD + lots of RnD downloads completed ---
--- Core RnD + lots of RnD downloads completed ---
-
- Posts: 255
- Joined: Mon Nov 13, 2017 4:16 pm
Re: Write to a temp file 1st.
I'm only getting these crashes with R'n'D. I've run the built-in to laptop memory tests, and it passes. Maybe it could be a driver issue? and/or maybe race condition? Most(but not all) of the time it crashes seems to be when quickly saving/restoring games several times.
--- Strike a balance between generating new things/ideas, and being good/organized. Pick somewhere between a gibberish mess and nothing said/done. ---
--- Core RnD + lots of RnD downloads completed ---
--- Core RnD + lots of RnD downloads completed ---
Re: Write to a temp file 1st.
Hm, OK... then it was misunderstanding. From reading the other thread (as linked to above), I had the impression that R'n'D was not the only program you encountered such crashes with, but that you get similar crashes with other programs.I'm only getting these crashes with R'n'D.

What puzzles me is the sheer number of crashes you documented in the other thread, which I neither encountered by myself (no crashes for a very long time), nor were reported by others.
It may indeed be possible that different usage of the game triggers bugs that are hidden under "normal" circumstances.Most(but not all) of the time it crashes seems to be when quickly saving/restoring games several times.
Could you please do some more test runs with your usual "R'n'D usage profile" on a different computer? Just to see if you get those crashes on a different system, too, or if this only happens on a single machine.