The exception "Engine deinitialization failed" is thrown during deinitialization of the Engine object if not all the Engine-related objects (such as FRDocument, DocumentProcessingParams) which were created and used by the application have been deleted before the deinitialization of the Engine object. If not all the objects have been deleted, then the exception may occur during garbage collection.
Use the StartLogging method to get the list of objects that have not been deleted.
If the application is developed in Visual Basic .Net all objects set to Nothing are not actually deleted, they are only marked for deletion. The exact moment when the garbage collector deletes the object is not defined. Call the following methods before deinitializing the Engine object to force garbage collector:
In Delphi all objects with the nil value are deleted only after exiting the procedure in which the objects were declared. Therefore, the entire ABBYY FineReader Engine code must be inserted into a separate procedure, and this procedure must be called before the deinitialization of the Engine object.