Author Topic: Laptop battery failure destroys the currently edited file  (Read 4557 times)

waudbyp

  • New Community Member
  • Posts: 1
  • Hero Points: 0
Laptop battery failure destroys the currently edited file
« on: June 04, 2015, 10:41:43 AM »
 :'( :'( :'(
I've just lost four day's work.

I've been using Slick Edit since about 1998 and, apart from some formatting idiosyncrasies, I've never had a problem with it; until today.

I usually do all my development on Linux. Unfortunately, for the past few days, I've had to use a Windows laptop to develop some C code for an embedded terminal. One of the proprietary packing tools for the target device (the cap file generator) crashes if you try to run it in a Windows virtual machine so the only way to use it successfully is to run it on a Native Windows platform. I installed my multi-platform version of SlickEdit and went to work.

I've been debugging a serial protocol for a few days to allow an Android device talk to an EFT-POS terminal via a serial connection. The interface has to be encrypted and this useless old device only has a serial port so it's all very flaky. However, after a lot of tweaking and fiddling, I finally got it stable and was ready for the next phase of development.

Unfortunately, the AC adapter for the laptop wasn't plugged in properly and the laptop wasn't charging (I thought it was fully charged). I just started it to do a bit of work, opened SlickEdit and added a couple of characters to the source file and the whole laptop powered down.

When I had charged the battery a bit, I rebooted the laptop and went to open the file I had been editing before it turned itself off. Unfortunately, whilst the file was on the drive, and, was theoretically 128k long, the entire file had been set to NULLs (0x00 binary). Oh, well, I though, it's killed the current file, but I have backup history on so, I'll just do a few undo's and that should sort it out.

No such luck, the useless pile of @#$%# had also set all the values in the backup history file to NULLs. Amazingly, I had several other files open but they are all perfect. It's only destroyed the critical file for my deliveries this week.

Thanks guys

P.S. Before people start going on about repositories and off-machine backups, we are a Linux shop. I didn't install Git on this thing because we had another incident where Windows clients corrupted the git repository on a regular basis so they are banned from connecting. Similarly, we don't run Samba (because, as far as I know, this is the only Windows PC in the entire building) and I couldn't find a Windows SSH client. This is the first time I've EVER lost a file through data corruption and I've been programming for 30 years.

mwb1100

  • Senior Community Member
  • Posts: 156
  • Hero Points: 13
Re: Laptop battery failure destroys the currently edited file
« Reply #1 on: June 05, 2015, 07:50:44 PM »
First off, let me start by saying that I have nothing to do with SlickEdit except being a customer (so nothing I say should reflect on them).

Second, I'm sorry this happened to you - critical data loss for whatever reason is always a painful experience.

Here are some suggestions that probably won't help you in this incident, but they might be useful in the future (I'm not trying to be preachy, just pointing out some tools I've used in situations similar to your pre-crash circumstances):

  - WinSCP (http://winscp.net/eng/download.php) is an open source utility for Windows that can transfer files using SCP and SFTP over SSH.
  - if you need SSH on Windows for a console connection to a Linux box, Putty (http://www.chiark.greenend.org.uk/~sgtatham/putty/) has worked well for me.
  - even if you're not permitted to push changes to a remote, you could still use Git locally to provide history and some measure of backup
  - I have used "git bundle create repo.bundle --all" to create a single file backup of a git repository for copying to a USB stick.  Of course, copying the workspace (including the .git directory) would do the trick as well.