This is a very anomalous situation that never happens on Linux under normal installation and working conditions. The errors you are reporting:
error writing setting data (int) or error writing setting data (string)
denote that your current user does not have write permissions on the corresponding home directory, which is wrong.
I solved my problem by searching all the pixinsigth files and changing the owner ( to me) and given them all permission
Please note that the owner of *all* files in /opt/PixInsight should always be root, since /opt is a system directory reserved for installed applications. Changing ownership as you have described is dangerous.