PROG EDITOR CORRUPTS FILES

hippy

Technical Support
Staff member
I won't write exactly what I feel at the moment as I'd be banned from the forum, but I'm sure everyone can imagine ...

After many hours of work, I've now lost the source file I've been working on, thanks to a bug in Programing Editor 4.1.2

This isn't the sequence that trashed my hard work, but it shows the problem ...

Start Programming Editor 4.1.2

In the 'empty window' enter "XXXX"
Use Save As to save "XXXX.BAS"

Open a new edit window using File -> New -> New Basic.

In the new, empty window type "YYYY"
Use File -> Save As to save "YYYY.BAS"

use File -> Exit or click the [X] Application close button

When the pop-up appears for XXXX.BAS saying "Text has changed. Save changes ?", click Yes, even though the file hasn't changed at all.

The Programmming Editor then closes down.

Run the Programming Editor Again.
Use File -> Open -> XXXX.BAS

Oh look; XXXX.BAS contains the contents of YYYY.BAS. The contents of XXXX.BAS have disappeared off the face of the earth.

Same problem occurs whether files are saved in ASCII or RTF.
 

hippy

Technical Support
Staff member
I have checked Programming Editor 4.0.1 and that has the same bug. I guess it affects all 4.0.x and 4.1.x releases.
 

Wrightson

Senior Member
Ive just tryed this and this exact thing happened to me.

This also occurred in the 3.5x version I believe. I have a recollection of suddenly loing a whole file in this exact manner.

Could PICAXE implement a file backup system aswell? Currently I do this myself when I make a major change to a program just in case I mess up.

Mark
 

hippy

Technical Support
Staff member
I think I've tracked down how my file came to be lost.

Open Programming Editor, leave the empty window open, and open another file which you don't mind losing the contents of ( File->Open ).

Edit that file ( eg, make the first line something obvious ).

You should now have two overlapping edit windows ...

Accidentally [sic] click on the "Untitled:1" window's 'header bar' which brings it to the front.

Close the Programming Editor using File -> Exit.

To the "Text has changed, save file ?" popup for "untitled:1" answer No - It hasn't changed anyway !

To the "Text has changed, save file ?" popup for the file you did edit, answer Yes, after all you did just edit it, and want to keep the changes made.

The file you just edited is emptied, and contains nothing when re-opoened.

[ It actually contains whatever has been typed the "Untitled:1" window when the Programming Editor was exited ]

It's an insidious little bug, and probably explains those times where I thought I'd forgotten to save a file, or that I'd saved a file over the top of another through my own error.

The bug goes right back to Programming Editor 2.3.5, and possibly earlier.
 
Top