advanced search > severe database dommage

Started by ccarnot, March 18, 2025, 11:34:36 AM

Previous topic - Next topic

ccarnot

When I try to use advanced search I have a message "severe database dommage"
What is going wrong ?

axel.hennig

That's not that much information.

  • Where do you use "advanced search"?
  • What do you enter there?
  • Are you able to reproduce this? Which steps do we need to do?
  • Do you have the log-file when this happened?
  • Did you run a Database Diagnostics?

ccarnot

#2
Quote from: axel.hennig on March 18, 2025, 12:17:05 PMThat's not that much information.

  • Where do you use "advanced search"?
  • What do you enter there?
  • Are you able to reproduce this? Which steps do we need to do?
  • Do you have the log-file when this happened?
  • Did you run a Database Diagnostics?

I tried that in media and folder view.
I search using the word colo ... I get 8 files. That's ok
I enter colo NOT colorado and as a result I get the message "severe database dommage...
After that, running a diagnostic using database tools, I can repair the database...

Mario

#3
Boolean operators like NOT are only allowed when the Advanced Search Mode option is enabled for the search bar.

I've tried to reproduce the problem you are reporting, but all I've got was no results and a warning about a syntax error (because of the NOT operator).

Please enable the option in the search bar drop-down and retry.

Please always ZIP and attach the log file (see log file) when you report such issues.

I doubt that the database is damaged, this is more like a warning that is somehow elevated to a hard error by the database. The diagnosis cannot repair physical database damage.

We had one similar report yesterday: https://www.photools.com/community/index.php/topic,15026.

The database is NOT damaged. It's just that a missing table (even a temporary table produced by the File Window) is considered a critical error, and that's causing the error message.
It also explains why the diagnosis "fixes" it.

I tried to reproduce both issues, but I could not. No other user ever has reported this afaik.
I need to know exactly what your search options for the File Window Search Bar are (the drop-down menu) and what you did, step-by-step. And the logfile (log file) of the IMatch session where the error was reported.

If I can reproduce it here, I can fix it.

Mario

#4
I figured it out.

It happens when the user cancels the search by clicking on the X button while a search is running in the background.

The cancel operation is implemented by calling Abort() in the database engine. This tells the database engine to cancel what it is doing (for the calling thread).

And if the database system is currently creating and filling the temporary table which caches the metadata of the files in the File Window, the Abort() will stop that, dropping (deleting) the table.

And when the File Window then tries to access the cached table, it does not exist and a critical error is logged. And the database remembers that a critical error was logged, causing the scary message and the diagnosis log entry.

The easiest way to solve this is to let the database finish when the user clicks X - basically disabling this feature.
I think this is tolerable, except for maybe one or two users who always run database-wide searches, on slower computers and with the habit to cancel searches often. Or, maybe, I can find another solution.

I've found another solution. Actually, the solution was already in place, what was missing was an additional check if the create/fill of the temporary table used for caching was successful and aborting the search when not.