This is the 2nd time my actions disappeared after an error message at startup. This time it's really serious with more than 100 big and small actions. It's almost impossible for me to restore because I haven't backed up before. I'm using the before version of the latest version of photoshop. Is there any way to completely solve this problem?
Custom actions are stored in your Preferences file, until you save them out to keep in a safe place. They are not part of the Photoshop program files.
Your Photoshop installation consists of two parts. The program files are read-only, and installed once and for all in a fixed directory.
Everything else that relates to application configuration, user settings, preferences and customizations - goes to a separate directory in your OS user account. When Photoshop opens, all these settings are read and loaded, and when Photoshop closes again, it's all written out again and resaved in your user account.
It's this continuous resaving that makes Preferences vulnerable to corruption. An irregular shutdown can easily corrupt preferences. Deleting all Adobe files in your user account leaves only the read-only program files, which restores the application to out-of-the-box factory state.
One should manually save out each action set "folder" individually to a .atn file using the menu on the upper right of the action palette window.
Loaded .atn files or newly created and unsaved action sets are temporarily stored in the Actions Palette presets file (Actions Palette.psp). This file should be considered temporary and may be subject to corruption or loss, which is why making an explicit save to .atn file for each individual action set is strongly advised.
Never save custom Actions into the "Default Actions" set.