Page 1 of 1

Profile file contents become deleted??

PostPosted: Wed Oct 12, 2022 2:02 pm
by Dennis CNC
Hi,

This is second time happened on customers machines.
That are few states away from me. Not a easy fix.

How can the profile file become completely visually empty but still is 38k file size?

And the error comes up "screen file not found"

I would like to know a permanent fix for this problem.

These machine computers are not on network not connected to internet never get windows updates.

I cannot say for sure that users close uccnc and do proper windows shutdown before power off.

Thank you

Dennis

Re: Profile file contents become deleted??

PostPosted: Wed Oct 12, 2022 2:48 pm
by dezsoe
The profile is read/written by a set of Windows API functions. Sometimes when Windows is shut down and UCCNC still tries to write to the profile then the profile may fill up with zero bytes. That is why you see the size, but nothing in it, the whole file is filled up with zero. From 1.2116 this will change, the new versions will have an own set of functions to handle the profile.

You get the message that the screen file cannot be found because the name of the current screenset is in the profile, but when there's no data in it then the "Screens\.ssf" file does not exist.

There is a plugin, the Auto Backup Profile to save your current settings on all startup. Enable the plugin and restart UCCNC. The plugin will ask for the configuration. The best practice is to use the following settings:

abp config details.png

Browse for the UCCNC, create new folder, name it e.g. ProfileBackups, check Set as relative path, check Backups per profile and enter 20. The relative path means that if you copy the whole UCCNC folder to anywhere then the backup will be always relative to the UCCNC.exe, so if you move to e.g. X:\MyUC then the plugin will copy the profile to X:\MyUC\ProfileBackups. The Backups per profile limits the number of created copies, only the given number of files per profile will remain, the oldest files will be deleted. 20 is far enough: if you have something misconfigured then you can restore one of the latest copies. If you get the same bug as now then no new copy will be created (and no old file will be deleted!), because the plugin will not start. (It will not start, because the settings for the used plugins are also in the profile which is empty.)