rejetto / hfs2

web based file server
https://rejetto.com/hfs
GNU General Public License v3.0
601 stars 131 forks source link

hfs create corrupted vfs #20

Open NewUserHa opened 2 years ago

NewUserHa commented 2 years ago

version: hfs 2.4RC7 (Don't know if 2.3m has this issue.)

the hfs usually has 1~2 folders, 100+ files. the file size of the corrupted .vfs usually is about 300bytes. and via a text editor, can see only the first few(usually <10) items in the .vfs file. all the others items are lost.

guess: the filenames usually contain special characters, or chinese, or japanese. like ( ) [ ] { } ` & ~ @ _. the hfs has run > a few hours.

rejetto commented 2 years ago

Try to narrow down the single factor causing the problem so that I can reproduce it. Does it happen at first save attempt? Try to describe usage in time

NewUserHa commented 2 years ago

once happen, save .vfs always get the same result.

hard to locate a single reason. If save .vfs can handle special characters, then the reason should be the running time.

I found after long time running, maybe with sleep of window, hfs will prompt address ... can't read (or similar something) sometime. when that happens, save .vfs usually is corrupted, other times, it has a chance may corrupt.

NewUserHa commented 2 years ago

occur again after 300 files and 5 days image

NewUserHa commented 2 years ago

another found: after happened, dragging files to the right-bottom of the main window of hfs will add files into the first folder instead of the root folder

NewUserHa commented 2 years ago

after running 2.3m300 for months, it shows that 2.3m300 does not have any above issue of 2.4rc7, including corrupted saved vfs, dragging issues, etc.

rejetto commented 2 years ago

I found after long time running, maybe with sleep of window, hfs will prompt address ... can't read (or similar something) sometime. when that happens, save .vfs usually is corrupted, other times, it has a chance may corrupt.

if the problem happens only with saving AFTER such error displayed, then probably the corrupted file is a consequence and not the real bug

NewUserHa commented 2 years ago

remembered they are sperate issues. maybe the reason is that hfs can't recognize the saved vfs. when look at the main.pas, I found newer version delphi changed something for ansistring (I'm not familiar with delphi).

rejetto commented 2 years ago

my experience tells me to assume what I said in my last comment, but feel free to investigate differently