Error message: "Cannot open settings database"

Started by hamishr, September 17, 2022, 11:30:57 AM

Previous topic - Next topic

hamishr

I have had a similar problem to that given in the old post https://www.photools.com/community/index.php/topic,11494.msg82141.html#msg82141 where I got the following error message when I tried to launch Imatch: "Cannot open settings database c:\ProgramData\photools.com\Imatch6\config\imatch.pts in writable mode or failed to create the database. Imatch cannot continue. Check file system privileges for this folder and then retry." I have succeeded in overcoming the problem but thought it would be useful to share how I did it and possible issues with Imatch's ProgramData containing some garbage.

I recently had a crash of my system caused by my son unwisely taking out my bootable ssd card, putting in his to download some stuff, and then putting my ssd card back in again. This resulted in Windows rolling back to old versions of programs, including Imatch (weird). I reinstalled with the latest version of Imatch and all seemed fine until I got this message at a later stage - possibly due to Windows updates inbetween.
I tried updating the system privileges without success.
I tried reinstalling Imatch without success.
I tried deinstalling Imatch and reinstalling it and in the process found that I had two versions of Imatch on my computer - I deinstalled both of them and reinstalled the latest version but the problem persisted.
I found that the deinstallation did not include removing the ProgramData directory and that it contained about 15 GB of data including many jpg files. I copied this directory to another drive as a backup. I deinstalled Imatch and also deleted the ProgramData directory on C: This time the installation was successful and I opened my database successfully.

Besides the lessons learned in how to solve this error message problem, I am wondering if there is any process in Imatch for cleaning up the ProgramData directory. What seems to be garbage in this directory was using up valuable space on my ssd drive.

Mario

The Program Data folder hierarchy contains important data from all installed applications, not just IMatch.

A fresh installation of IMatch places only about 130 MB of data in the Program Data\photools.com\IMatch6 folder.
And this data is required in order to run apps and IMatch.

If IMatch reports that it cannot access or create the settings database:

1. If the file exists, right-click on it in Windows Explorer > Properties > Security. Make sure your user account has read/write/modify privileges for he file. Maybe the security settings got messed up by the operations you have performed...

2. If the file does not exist, check the file system privileges for the Program Data\photools.com\IMatch6 folder. Make sure your user account has read/write/modify privileges to the folder, all sub-folders and the files within.

Uninstalling / re-installing IMatch will not remove the Program Data\photools.com\IMatch6 folder. This would be bad, since it contains all your user settings, custom presets etc. You want to keep these. Windows installer will uninstall static files in that folder automatically.

Installing a newer IMatch will install missing files in that folder hierarchy automatically,but keep the settings database, IMWS data storage etc. untouched.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

hamishr

Hi Mario, the procedure you suggest above did not work, which is why I went for deleting the Program Data and going to the default with a new installation. By deleting the program data I have lost my settings for how IMatch operates for me but this is not a serious issue in my case.

I have had a look at the large Program Data folder (> 15 gb) and it turns out that the large size is caused by the preview cache, which has a large number of jpg files with filenames that were subsequently renamed; I have been using IMatch for many years and for some reason these files have not been cleaned out.

Mario

#3
QuoteHi Mario, the procedure you suggest above did not work
This does not tell us much.
What did you do, in which order, what did Windows show, etc.

The only reason that IMatch cannot create an IMatch.pts file is missing file system privileges.
The only reason that IMatch cannot open an IMatch.pts file is a) missing file system permissions or b) a corrupted database file (but then the error message is different).
Please always include the log file when you report problems. See log file

The preview cache stores cache files per-database and for each file. The name of the cache image is derived from the internal unique "id" of each file, and is not affected when you move or rename a file in IMatch.

When you delete a database with the corresponding command in the Database menu, the cache folder is also deleted. If you delete a database manually, you also need to delete the cache folder for that database.

The name of the root cache folder for the current database is shown in Edit > Preferences > Cache. When you click on the name, IMatch displays the full name of the cache folder for the current database and the size in the info area at the bottom of the dialog box.

The name of the cache folder and the size is also shown in the IMatch Dashboard, in the Info Panel at the bottom.

You can place the cache folder wherever you like and you can limit its size and purge it manually etc.
See The Cache for more information.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

hamishr

Thanks Mario, apologies for my lack of understanding of how the preview cache works. I have a large database (over 200 000 images), which is why the cache is so big.

I could not include a log file because the error message came up before the program loaded.
I repeat that I updated the file system privileges and they seemed OK (but clearly were not). Also note that everything worked fine when I originally re-installed after the crash and it was only after a week that this problem arose. I decided to delete the subdirectory because it seemed there was some hidden Windows problem. Everything is working fine now.

Mario

Quote from: hamishr on September 17, 2022, 05:17:32 PMThanks Mario, apologies for my lack of understanding of how the preview cache works. I have a large database (over 200 000 images), which is why the cache is so big.
You can limit the cache size. IMatch then deletes older cache files when new cache images are created and the cache size limit is hit. When you view an image without a cache file, the cache file is automatically created.

But 15GB of cache is not that much, considering today's disk sizes. Unless your computer has a very small SSD for the C: disk. Some systems shipped with only 128 or 256 GB for the system disk, which is not much.
In that case, you can move the cache folder to another disk and update the cache settings under Edit > Preferences > Cache.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook