zero bytes

English main discussion
  • Author
  • Message
Offline
Posts: 41
Joined: Wed Apr 09, 2008 3:57 am
Location: NL

zero bytes

Post by Sam_Zen »

A strange behaviour occurred by AkelPad with just one specific file. A plain ascii-based HTML file, no scripts etc.
If opened, changed a bit, than, first saved or not, first closed or not, after minimizing AP to the taskbar, the contents of the file was reduced to 0 bytes. Afaik the file wasn't used by any other app at the moment.
Fortunately I could replace it by a backup, but this is quite damaging.
This happened to only this file, others were fine.
So I used File Monitor to see what's happening :

Image

The line with Set Information is the one that causes this. In FM-logs of other files this line is not there.
Still I have no clue what's happening here. Checked with an earlier version of AP : the same.

Offline
Posts: 40
Joined: Sat Sep 06, 2008 1:39 am

Post by ravenlaughs »

That happened to me yesterday, I went back to add something to a small memo I had just saved and it was empty. Something equally weird is going on tonight. Suddenly every file that I "Save as" is truncated to exactly 2048 bytes, and one that was just saved after some minor changes was cut in half.

I can't use AkelPad any more until I can trust it :(

Edited to add: More than once now it has crashed nastily. It just did so, but now that I opened it again it is saving normally.

I think something else that I had open may have been bothering it, but it was nothing I don't normally have going at the same time. It never did this crazy stuff before.

Second edit: I've gone back to v. 4.1.8, but i'm still nervous. Even with backups, losing tedious edits of a 33-chapter novel is painful :o

Offline
Site Admin
Posts: 6311
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

Sam_Zen & ravenlaughs
Can you pack AkelPad folder with problem file and send them to my e-mail?

Offline
Posts: 40
Joined: Sat Sep 06, 2008 1:39 am

Post by ravenlaughs »

I am now kicking myself for simply replacing the misbehaving program with the older version, I thought of renaming the old folder first. But I don't know if it would help. I was using v. 4.1.9 from the zip package, with the latest plug-ins. I replaced the EXE and all DLLs with the older version (I keep ALL versions, just in case!), leaving the INI files as they were. *Sigh* it was late and I was a bit shook. AkelPad is my default text editor, it was like suddenly losing the use of one hand.

This is a comparison view of my messed-up files (in Free Commander). I moved the truncated ones, and restored the most recent versions from a web backup.

Image

All files not 0kb have the beginning intact, they are cut wherever they match the length criterion:
0 bytes
2048 bytes (offset 000007F0)
4096 bytes (offset 00000FF0) -- only two this length

The length is perfectly consistent, as if I had asked it to split the files at a certain point.

As you can see in the screenshot, some files were not affected. Today I sorted them according to time modified to see if the chopping started at a certain time, but there are intact files mixed all through. I was not aware that the files were being saved truncated until I did a save-as with a file in another folder.
The action seemed to be random. The size would seem slightly meaningful, it was always 0k-2k-4k. Closing the program and re-opening it had no effect. It didn't matter what folder or drive I worked in. After the crash, it stopped doing it.

I did the same thing with all of the html files in the screenshot, carefully and not in a hurry. I was pasting something back in that I had accidentally removed with another program (never had any trouble with), and changing one character in each. The key commands I used all through were Enter, Arrow-up, Ctrl+V, Ctrl+S, Esc. My fingers sometimes go astray -- I will paste in the date when I am trying to save -- but I don't think I set off anything that way.

I have looked over the INI files a few times, but there is nothing unusual.

.Windows XP Professional
Install Date 1/13/2009 (following a small HD accident lol)
Build Number 2600
Service Pack 3
AMD Athlon(tm) Processor 1007MHz
512MB RAM

I reboot at least once a day.

Offline
Site Admin
Posts: 6311
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

ravenlaughs
And again. Can you pack AkelPad folder with problem file and send them to my e-mail?

Offline
Posts: 2247
Joined: Tue Aug 07, 2007 2:03 pm
Location: Vinnitsa, Ukraine

Post by FeyFre »

Hm.. I think I have similar problem, but....

Вижу тут тоже портится содержимое... Я часто запускаю Акел на wine на Линуксе... Просто привычно редактировать именно в нем. Вроде бы всё работало. Но недели две назад я редактировал пхп-скрипт в Акеле. Ну и неглядя залил его на сервер не сделав бэкапа.. Как оказалось зря.. Скрип оказался не рабочим, так как, как потом выяснилось, последние несколько байт скрипта были битыми. Бєкап нашел только через два часа. Но с тех пор Акелом там не пользуюсь. Сначала списал это на wine но вот сейчас вижу что и Акел мог и напортачить. Версия того Акела 4.1.8.

Offline
Posts: 41
Joined: Wed Apr 09, 2008 3:57 am
Location: NL

Post by Sam_Zen »

2 Instructor : In the meantime this has happened with another *.txt file as well, not 0 bytes, but lost a big part.
The start was intact, so maybe from the same 2k-4k point. Didn't check that amount.
This time the file didn't have a web backup, so I lost quite some work.
So unfortunately, I'll have to skip the use of Akelpad for the moment, until it's clear what's happening here.

Offline
Site Admin
Posts: 6311
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

Sam_Zen
:) somebody hear me? Can you pack AkelPad folder with problem file and send them to my e-mail?

Offline
Posts: 40
Joined: Sat Sep 06, 2008 1:39 am

Post by ravenlaughs »

I'm not sure what you mean by "the problem file". I can't pack the AkelPad folder as it was when it happened, because I replaced the files already. If you want the INI files or a sample of the ruined files, I heve those. I am very anxious to see this problem solved. I am willing to put v. 4.1.9 back for a while and see if it makes a mess of something, if that will help.

Edited to add: Never mind, I just did that, and it did it again, and I packed it up and sent it. Look for mail from matera (aT) firefromthesky (.) org

Second edit (again LOL): Now I can't rename the folder and go back to the safe version because:
---------------------------
FreeCommander.exe
---------------------------
The process cannot access the file because it is being used by another process.

---------------------------
OK
---------------------------

:evil:

Oh well. I have to go wash dishes anyway, I'll just get off and reboot. :lol:

Offline
Posts: 41
Joined: Wed Apr 09, 2008 3:57 am
Location: NL

Post by Sam_Zen »

Sorry Instructor. While working on this, I missed some new posts here.

I have created a seperate test-directory. I unpacked AkelPad 4.1.9 from the zip, plus the pluginspack and copied that in the test-dir.
The first thing, when running the .exe, was a dialog about a missing dutch.dll file, even before the main window opened.
Since the 'lang' dir is empty here, this search must have come from something in the registry.

I hate the registry, so I want my settings in an *.ini file. But I must choose this the first time in Preferences.
If I remember well, this choice can be made with the setup-version, during the installation.
With a .exe file from the zip-package, there's no choice for that, unless AP is already opened for the first time.

Here I suspect some residue of AkelPad in the registry, maybe being in conflict with the recent *.ini file.
So I cleaned any trace of AkelPad from the registry.
No missing lang-file anymore, things seem to be normal.
No more loss of bytes so far, tested with copies of the same files that I mentioned.

Offline
Posts: 40
Joined: Sat Sep 06, 2008 1:39 am

Post by ravenlaughs »

I should have mentioned that when I switched the last time, I copied all the INI files to the new akelpad location, and the first install of 4.1.9 was also a dll-exe replacement only. I keep configuration files for my favorite proggies as much as possible. I have very particular taste in font and color and I hate doing it all over.

It was possible to rename the folders again when I was done washing dishes :) The naughty AkelPad is now in D:\txt-html\zakelpad. I edited the main INI file down to a few lines, thus preventing any registry invasions ;)

It did not repeated the bad behavior immediately. I adjusted the preferences a little at a time and tested. It is now saving only 0-byte files. Watch for another e-mail with the current INI.

Offline
Posts: 41
Joined: Wed Apr 09, 2008 3:57 am
Location: NL

Post by Sam_Zen »

And I should have mentioned that a couple of times in the beginning of this behaviour, I got dialogs about another app handling the same file. While I was pretty sure I had no other program opened to claim it.

Offline
Site Admin
Posts: 6311
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

After ravenlaughs sending necessary files problem was founded and fixed. It was bad pointer assignment in word wrap mode in 4.1.9. Thanks for the help!

P.S.
If some problem happened, one can help to fix it by sending problem file with AkelPad folder (with settings). Sometimes just to know that something happened it is not enough to fix it. Even when ravenlaughs sended archive and even when I seen the problem, it tooks 2 hours to fix it.

Offline
Posts: 40
Joined: Sat Sep 06, 2008 1:39 am

Post by ravenlaughs »

Ouch. You need a PayPal button so we can send you some beer money.

In case it helps anyone, I experimented quite a bit and found that turning off the "Watch file change" feature stops the truncation. No guarantee on that.... It seems tied to file size somehow too. A 58k file saves at 4096 bytes, a 28k file at 2048 bytes. Some files are apparently immune because they are not in the right size range. Very interesting, if frustrating, bug.

We look forward with awed gratitude to the next version :)

Offline
Posts: 41
Joined: Wed Apr 09, 2008 3:57 am
Location: NL

Post by Sam_Zen »

Yep, cheers ... :)
Post Reply