Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : Editor Issues And Data Loss
Author | Message | ||||
chris Regular Member Joined: 24/08/2020 Location: United KingdomPosts: 54 |
Sharing my experience (running 5.0.5). I'd been editing a file for about 30 minutes, it was about 1K of BASIC. The editor went a bit screwy, and when I was typing it wasn't showing up anything. I pressed escape and then pressed F1 to save. I then typed EDIT, and the file would not load up. When looking in the files explorer, the file was suddenly 32K. I'd lost my basic program. No backup. I think perhaps maybe I accidentally deleted an "end of line" character by accident (should not be possible) maybe because I was holding shift to select text prior, and the file save routine just kept writing memory out up to 32K. It would be cool if there were a system folder at root level that saves the last few edits of all .bas files as currently - every time you save a cmm2 file, you are running the risk of it disappearing. Saving the last 10 edits with timestamps and clearing down older ones wouldn't really put wear on the SD card, as .BAS files are tiny anyway and SD cards are huge. One for the wishlist too - can I also suggest being able to toggle between two documents in the editor without exiting to the command line (the previous document loaded and the current document). I wanted to do something as simple as copy and paste some code from one of my other programs and I couldn't do it. I had to resort to taking a picture of my screen and retyping it all. Toggling between two documents (in the editor) could also be useful for loading up a document with the application APIs in them (in textual format). |
||||
capsikin Guru Joined: 30/06/2020 Location: AustraliaPosts: 341 |
I had this happen to me a couple of times yesterday before I upgraded my firmware. I was on an earlier v5.05.06 beta, but I'd been running that for a while previously and don't think I had the issue before (maybe different data loss issues). I think my SD card is old and slow, but I'm sticking with it for now to keep aware of any issues. The error I got trying to open the 32k file afterwards was something about a line being too long. When I looked at the file on another computer, there was the start of my program, followed by garbage characters (some of which seemed to include file or folder names from elsewhere on the SD card). The garbage characters included lines which were too long. I can't remember if a part of my program was missing, I think it was. After that I started going to the file manager and copying my program to a backup after each successful program test, which I'd do fairly often. Have you looked at the file saving improvements being discussed in the latest beta thread? F8 and F7 in the full screen editor are not quite as convenient as copy and paste, but they help. One saves copied text to a file, one pastes in a file. |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8572 |
Please see the main beta thread for a change to how the editor saves files |
||||
twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1133 |
I can confirm that (CMM2/400MHz/V5.05.05). Occasionally it happens several times. So far I thought it was just my problem. Michael |
||||
djwildstar Newbie Joined: 29/07/2020 Location: United StatesPosts: 24 |
Happened to me as well with an earlier version of the 5.05.06 beta. I've updated to the latest beta and it hasn't happened again. I was able to recover my file by putting the SD card in my Mac and use a disk sector editor on it. I used R-Studio Disk Recovery, which has a search mode - I searched unallocated space on the card for text that was in my code. Once I found the sector with the code, I was able to copy and paste it from R-Studio into an editor and re-saved the file on disk. |
||||
chris Regular Member Joined: 24/08/2020 Location: United KingdomPosts: 54 |
I'm now running the latest beta version and I encountered another data loss issue in the editor. I haven't been able to produce an exact series of events that triggers data loss, but I often press keyboard combinations out of muscle memory that are not supported in CMM2, and I'm wondering if it's one of those that triggers it. One such action is selecting text then pressing backspace (not DEL). Another is pressing up and shift to start selecting text backwards from the cursor. I haven't isolated if either of these is the direct cause but I recall I did both at time of the data loss. The symptoms this time are that the bottom part of the basic file was simply cut off (around the bottom 10 lines). I 100% did not delete these myself. As far as the current backup mechanism, I think one backup isn't enough. For example, at time of the data loss, I had gone back into my file and edited a bit more then saved before I realised that the bottom of the file was gone. By then the backup had already been overwritten, so it wasn't really a backup at all. As requested before, a better failsafe would be to have a folder that contains the 10 last edits somewhere on the SD (rolling incremental cleardown). Anyway, I leave it up to you what to do with this information, but I should say that I am having increasing levels of anxiety in using the editor, and it's almost persuading me to not use the editor at all on CMM2, which is a real shame, because I love the feeling of being in the editor and the syntax highlighting and workflow is beautiful. |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8572 |
If you need more backups use Ctrl-W whenever appropriate. Multiple automatic backups is just clunky. In the meantime if you can identify a replicable cause of the loss of lines then I can fix it |
||||
capsikin Guru Joined: 30/06/2020 Location: AustraliaPosts: 341 |
Thanks, good to know about Ctrl-W to save a backup. I've skimmed over that so many times and I still didn't notice the command - this prompted me to read the editor documentation properly. Hmm, you can toggle insert/overtype. Most of the time this I don't use overtype but it would be useful next time I'm editing a sprite file. Ctrl-K to delete to the end of the line. I feel like this would be useful if I can remember it. Already using ESC, F1, F2, Ctrl-F, Shift-Right, Ctrl-V, F7, F8 Including Ctrl-F to find then Ctrl-V to replace then Right arrow to choose another match and Ctrl-V to replace again - this is very useful for renaming and for making repeated changes. While I'm here I'll look through the command prompt function keys. F2,F4 - already using. F1 - FILES - this would be useful. F8,F10 - these would be useful to use. |
||||
epsilon Senior Member Joined: 30/07/2020 Location: BelgiumPosts: 255 |
Chris wrote: > The symptoms this time are that the bottom part of the basic file was simply cut off (around the bottom 10 lines). I 100% did not delete these myself. I have exactly the same issue on 5.05.05. It happened twice but I haven't found yet how to reproduce it. Epsilon CMM2 projects |
||||
Print this page |