rejetto forum

[2.4.0 RC6][*.vfs][Menu->Save file system] almost empty file (less than 300byte)

0 Members and 1 Guest are viewing this topic.

Offline adrian3k

  • Occasional poster
  • *
    • Posts: 7
    • View Profile
Hi.

From time to time a see a bug with saving file system to file.
Older *.vfs are around ~6kB (and they are fine), new saved file has ~250bytes

Can't find 'why', but without restarting the server everything is fine. Problem when power is lost or PC crash - have to add files/folders/users again and again.

Can some info be saved 'from memory' before exiting the program to later 'add from saved memory' after I get empty Virtual File System window?

Also there is a strange bug that allowing anyone to access - can't revert this option without restarting program.


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
This is the only method that comes to mind, and I hope that it will solve your problem of loss of VFS  ;)

switch to expert mode (key F5)
select Menu>Save options to file,  and activate  Menu>Auto-save Options

in Menu>Virtual File System , choice Backup on Save   and  Autosave every: enter 900 (= every 15mn) or more

Menu>Others options> Edit Event Script... (ALT+F6)

put this content in hfs.events and save it in the hfs.exe folder
Code: [Select]
[server start]
{.if|{.{.filesize|hfs.vfs.}<255.}|
{:{.add to log|Empty VFS detected.}
  {.if|{.exists|hfs.vfs.bak.}|
{:{.add to log| VFS backup found.}
  {.delete|hfs.vfs.}
  {.copy|hfs.vfs.bak|hfs.vfs.}
  {.add to log| previous VFS restored and loaded.}
:}|{:{.add to log| VFS backup not found.}:}
/if.}:}
|{:{.add to log|VFS seems good.}:}
/if.}

this script tests if the size of the vfs is less than a certain value (255 to be reduced if necessary) and in this case restores the backup, every time  the server is SWITCHING ON ( not possible only when hfs is launched), allowing a functional VFS to be found

verify  in windows registry if not exist those keys  else delete them
HKEY_CURRENT_USER\Software\rejetto  and  HKEY_LOCAL_MACHINE\Software\rejetto
« Last Edit: November 04, 2023, 05:24:23 PM by Mars »


Offline LeoNeeson

  • Tireless poster
  • ****
    • Posts: 842
  • Status: On hiatus (sporadically here)
    • View Profile
    • twitter.com/LeoNeeson
This is the only method that comes to mind, and I hope that it will solve your problem of loss of VFS  ;)
Hey Mars! Woo-hoo!! :D Happy to see you, like the good-old days... (and nice macro solution, by the way). Now we just need SilentPliz to visit us, and the team is almost complete. 8)
HFS in Spanish (HFS en Español) / How to compile HFS (Tutorial)
» Currently taking a break, until HFS v2.4 get his stable version.


Offline adrian3k

  • Occasional poster
  • *
    • Posts: 7
    • View Profile
This is the only method that comes to mind, and I hope that it will solve your problem of loss of VFS  ;)

Thank you very much, but the bak files are also messed up.
Managed to copy by hand settings (allow >1 instance, open in second and add files having both instances opened - F8, up one folder, drag&drop) - not the shortest one, but at least solved the problem of making everything from scratch.
Guess running 24/7 for couple months has it's problems :(


Offline LeoNeeson

  • Tireless poster
  • ****
    • Posts: 842
  • Status: On hiatus (sporadically here)
    • View Profile
    • twitter.com/LeoNeeson
...this script tests if the size of the vfs is less than a certain value (255 to be reduced if necessary) and in this case restores the backup...
Besides checking VFS's file size, is there some alternative to check VFS integrity? (even if it requires modifying the source code). This is serious, because I think it could be very frustrating loosing a well configured VFS.



» Edit: by saying 'checking VFS integrity', I mean comparing what's loaded on memory, versus what is stored on file, before writing the VFS to the disk (of course it would need writing a new function, modifying the source code). An easy source code modification, would be saving a copy of the VFS without compressing (without applying zlib). If the origin of this issue is a bug with zlib, perhaps on those cases, it could be useful (or not, it depends). ???
 
« Last Edit: November 07, 2023, 05:24:55 AM by LeoNeeson »
HFS in Spanish (HFS en Español) / How to compile HFS (Tutorial)
» Currently taking a break, until HFS v2.4 get his stable version.


Offline Rapid

  • Occasional poster
  • *
    • Posts: 49
    • View Profile
    • R&Q Portal
I suggested a new file format to save settings - JSON in Zip.
So it's much easier to check for corruption and modify by hands.

Unfortunately I don't have time to make a patch for Rejetto's version as my version is very different now...
Maybe someone could make it? I think new format and PNG-support - is a must have.


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
HFS versions 2.3 and 2.4 will no longer evolve, the VFS recording format cannot be modified in order to maintain compatibility between these versions

a new HFS 3.0 development has been implemented by rejecto by following this link
https://rejetto.com/forum/index.php?board=46.0


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile