YY-CHR can clear your chr file

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
YY-CHR can clear your chr file
by on (#136601)
I just found out that if YY-CHR crashes, the chr file you were working on will be completely empty next time you open it. I don't know how commonly known this is, but backup your chr file before you start working on it! I lost a lot of progress because of this and wanted to let others know so the same thing wouldn't happen to them.
Re: YY-CHR can clear your chr file
by on (#136612)
Which OS version are you using?
Also, Which version of YY-CHR are you using

if you're using YY-CHR.NET, Things can be glitchy

YYCHR.NET is still being made as a WIP by the author, so it should still be bugfixed a bit before the first release

The Linux-Wine Method was an assumption by me, so some things will not work out a bit!
Re: YY-CHR can clear your chr file
by on (#136617)
Personally I still use version 0.98 because all the newer ones have been buggy and unstable.

Besides I always have a dozen of backup of the games I'm working on, so it's not that much of a problem if a file should be lost.
Re: YY-CHR can clear your chr file
by on (#136618)
Tsutarja wrote:
backup your chr file before you start working on it!

Actually, backup your entire projects regularly, regardless of the tools you're using. This is common sense. If you don't make backups, you're asking to lose data, no matter how stable and bug-free your tools are.
Re: YY-CHR can clear your chr file
by on (#136620)
Actually backups are not here just to recover lost data, but also to have a re-starting point if you mess up something to the point that fixing it would take more time than taking back an old version.

This happened to me quite a few times, where I wanted to add some functionality but messed up very badly.
Re: YY-CHR can clear your chr file
by on (#136623)
And at that point, it becomes worth it to learn git. In fact I need to do that myself; so far, I've been just working from the previous release as my backup.
Re: YY-CHR can clear your chr file
by on (#136624)
Yes I agree git is very good to use. It is nice to have a history of what you have changed in your project. Also as for bugs in programs is the author aware of them? I know for my project Retro Graphics Toolkit I want to hear about bugs in my program so that I can fix them. I have fixed some bugs that caused me to think if only someone would have told me about that. I would have fixed it sooner. I fixed some bugs after releasing a new version but have held off due to no one has complaining.
Re: YY-CHR can clear your chr file
by on (#136630)
tokumaru wrote:
Tsutarja wrote:
backup your chr file before you start working on it!

Actually, backup your entire projects regularly, regardless of the tools you're using. This is common sense. If you don't make backups, you're asking to lose data, no matter how stable and bug-free your tools are.

I think the point was to back-up before every time you open the program. Regularly will not be good enough, e.g. if your last back-up is from yesterday but you edited the file several times today and then the file gets corrupted, you will lose all of today's progress (and it can be a lot).

The git suggestion would help in this case (or any version control system, for that matter). In fact this is very much the main point of them, to be able to easily roll back in case the changes to the file end up breaking something. But they still have the downside that you need to be explicitly commiting every change and here you may actually forget to do that (so you'll need to find a way to automate this if possible).
Re: YY-CHR can clear your chr file
by on (#136637)
FWIW I've been using YY CHR.NET for some time without problem. Maybe I just haven't been using the bugged bits?
Re: YY-CHR can clear your chr file
by on (#136640)
I've never had data loss occur with YY-CHR. I'm not sure if op was saying that YY-CHR actively deleted his data, or that he just forgot to save (and YY-CHR didn't automatically back it up, which it indeed does not).

Version control systems are good, but they work better if the data is textual.
Re: YY-CHR can clear your chr file
by on (#136641)
I think he meant that YY-CHR completely nuked the file (truncating it to 0 bytes), not only losing the current work but also all the previous work on it as well.
Re: YY-CHR can clear your chr file
by on (#136643)
I would strongly recommend setting up source control and use it for your project, whatever it is. I like subversion, personally, but git is also very popular. They are both free tools.

git: http://git-scm.com/
subversion: https://subversion.apache.org/

You can create free repositories here:
https://www.assembla.com/
Re: YY-CHR can clear your chr file
by on (#136647)
For the last few years all my projects have been on git, and while I haven't had any disasters having a remote to push to is relieving. It also makes moving between machines very easy.
Re: YY-CHR can clear your chr file
by on (#136649)
rainwarrior wrote:
You can create free repositories here:
https://www.assembla.com/

Also: https://bitbucket.org/
Re: YY-CHR can clear your chr file
by on (#136650)
Hamtaro126 wrote:
Which OS version are you using?
Also, Which version of YY-CHR are you using


I'm using Windows 8.1 on my laptop. My YY-CHR version seems to be YY-CHR.NET ver.0.99

Sik wrote:
I think he meant that YY-CHR completely nuked the file (truncating it to 0 bytes), not only losing the current work but also all the previous work on it as well.


Yeah, this was exactly what happened. The crash has occurred only once, but I did lose a lot of work because of that.
Re: YY-CHR can clear your chr file
by on (#136656)
I see you are using windows 8.1, have you tried checking the previous version tab in de properties of your project folder? (I am talking about shadow copies here)
I have configured my PC to make at least 3 shadowcopies per day of all my folders. ( and a shadow copy only takes 1 or 2 seconds to complete )

It is a huge lifesaver.. especially in situations like yours.

edit--
if nothing turns up doesn't it isn't there.

go to command prompt (administrative) and use the following command

vssadmin list shadows /for=<driveletter>, ex: vssadmin list shadows /for=c:

A typical result looks like this.
Code:
vssadmin 1.1 - Volume Shadow Copy Service administrative command-line tool
(C) Copyright 2001-2013 Microsoft Corp.

Contents of shadow copy set ID: {e1abd399-3319-4395-bf66-1501bb6da274}
   Contained 1 shadow copies at creation time: 23-09-2014 12:53:54
      Shadow Copy ID: {f8aa8c3e-9164-4eab-9756-5d391953e084}
         Original Volume: (C:)\\?\Volume{88940d3b-ed17-11e1-be66-806e6f6e6963}\
         Shadow Copy Volume: \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1
         Originating Machine: ScrewupWin8.HMComputers.local
         Service Machine: ScrewupWin8.HMComputers.local
         Provider: 'Microsoft Software Shadow Copy provider 1.0'
         Type: ClientAccessible
         Attributes: Persistent, Client-accessible, No auto release, No writers,
 Differential

Contents of shadow copy set ID: {bb57cc0d-320a-4b3a-9828-01891adfcdba}
   Contained 1 shadow copies at creation time: 29-10-2014 04:49:21
      Shadow Copy ID: {9e88c4c9-d97e-4b9d-9993-4e2cf97959ae}
         Original Volume: (C:)\\?\Volume{88940d3b-ed17-11e1-be66-806e6f6e6963}\
         Shadow Copy Volume: \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy9
         Originating Machine: ScrewupWin8.HMComputers.local
         Service Machine: ScrewupWin8.HMComputers.local
         Provider: 'Microsoft Software Shadow Copy provider 1.0'
         Type: ClientAccessibleWriters
         Attributes: Persistent, Client-accessible, No auto release, Differentia
l, Auto recovered

Contents of shadow copy set ID: {5a18cf92-fc3f-452c-b226-f47cd3be71bf}
   Contained 1 shadow copies at creation time: 03-11-2014 14:51:12
      Shadow Copy ID: {57959b57-a50e-4654-8619-fc7a80a79190}
         Original Volume: (C:)\\?\Volume{88940d3b-ed17-11e1-be66-806e6f6e6963}\
         Shadow Copy Volume: \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy10
         Originating Machine: ScrewupWin8.HMComputers.local
         Service Machine: ScrewupWin8.HMComputers.local
         Provider: 'Microsoft Software Shadow Copy provider 1.0'
         Type: ClientAccessibleWriters
         Attributes: Persistent, Client-accessible, No auto release, Differentia
l, Auto recovered

Contents of shadow copy set ID: {0be64c34-4f93-423b-b959-d9b6d4c8e52d}
   Contained 1 shadow copies at creation time: 11-11-2014 03:42:05
      Shadow Copy ID: {b523243b-d176-4de6-9a01-2afbe1d6c180}
         Original Volume: (C:)\\?\Volume{88940d3b-ed17-11e1-be66-806e6f6e6963}\
         Shadow Copy Volume: \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy11
         Originating Machine: ScrewupWin8.HMComputers.local
         Service Machine: ScrewupWin8.HMComputers.local
         Provider: 'Microsoft Software Shadow Copy provider 1.0'
         Type: ClientAccessibleWriters
         Attributes: Persistent, Client-accessible, No auto release, Differentia
l, Auto recovered


look at "Creation Time" and "Shadow Copy Volume"

to "mount" a shadow copy you can use the MKLINK command.
for example:

MKLINK /D c:\shadowcopy11 \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy11

and if your files are at: c:\users\user\documents\projects\nes for example. you can go to the shadowcopy variant using
CD c:\shadowcopy11\users\user\documents\projects\nes

you cannot go to C:\ShadowCopy11 directly.

I hope this helps.