Go to this page: http://people.omnigroup.com/kc/Debug...dDatabase.html
and then click the Rebuild OmniFocus Database link there. It will launch OmniFocus, ask for confirmation, and then restart OmniFocus, hopefully successfully!
and then click the Rebuild OmniFocus Database link there. It will launch OmniFocus, ask for confirmation, and then restart OmniFocus, hopefully successfully!