hi5 / CL3

Minimal clipboard caching utility inspired by CLCL 📋
https://autohotkey.com/boards/viewtopic.php?f=6&t=814
MIT License
88 stars 16 forks source link

XMLRoot dynamic variable is blank in XA.ahk #15

Closed u0i299pg closed 4 years ago

u0i299pg commented 4 years ago

I have received the following error on 2 different occasions, on 2 different computers now, and each error has occurred after booting my computer and having a shortcut to the CL3.ahk script in my Startup folder.

The only way I've found so far to resolve this is to delete everything and download the .ZIP again and start new with all files from scratch (all except the settings.ini file, but there isn't a correlation between adding that file back and the recurrence of the error).

XMLRoot Dynamic Var is blank error

hi5 commented 4 years ago

I've had it happen a few times, but often it was because my computer crashed or when forced it to turn off (power button) which resulted in empty XML files as the script didn't have enough time to try and save the data it seems.

So if it happens again, have a look at the various XML files in your editor (or notepad), one or more of these are probably empty, by which I mean the files are there but there are no XML tags present (so just a bunch of spaces nothing else). If you delete these empty files and restart CL3 it should startup again. Simply deleting all XML files also works. You don't need to "reinstall" CL3 as such, the script works, it is just the data files are somehow corrupted.

stats.xml
ClipData\AutoReplace\AutoReplace.xml
ClipData\ClipChain\ClipChain.xml
ClipData\History\History.xml
ClipData\Slots\Slots.xml

I'll try and see if I can add a check for "empty" XML files, and if so, recreate an empty one. It does mean some data might be lost. I'll think about a "backup" routine as well as that might be useful to "return to last know working state". Might take a little while.

hi5 commented 4 years ago

Didn't seem to complicated, so you can try v1.98 https://github.com/hi5/CL3 - if there is a problem with one of the XML files it should show a warning, delete the (corrupted?) XML file and start a new XML file (object in the script)

u0i299pg commented 4 years ago

The changes made in v1.98 (same for v1.99) seem to have fixed this issue. Thank you very much for the near immediate fix!