Usually that means that the database file is corrupted.
In most cases the following solution would be enough to fix the database:
Firebird 2.5

Firebird 3

If it is not fixed try the following solution:

First backup

and finally restore

You can download our software, which makes the process automatically.

 

The process can also be done automatically with the script:
https://github.com/sbzsystems/windows-batch-scripts/blob/main/fix_firebird_db.bat