EXCEPTION_ACCESS_VIOLATION in Java

Symptoms

The code written in Java throws the error:

Error: EXCEPTION_ACCESS_VIOLATION

What should I do?

Cause

The error is thrown if FineReader Engine's objects are handled incorrectly.

Resolution

  1. In your code the Engine.DeinitializeEngine() method must be called;
  2. Engine.DeinitializeEngine() cannot be called in the same thread as the InitializeEngine(...) method.
    Check the FineReader Engine's log. It should not contain entries like "Engine should be initialized and deinitialized in the same thread";
  3. In case you initialize the Engine object in one thread and use it in the other, PDF Support should be initialized in the same thread as the Engine object. You can do it by calling
    Engine.LoadModule( FREngineModuleEnum.FREM_PDF )
    OR
    Use the setting to process all PDFs in a separate thread: engine.getMultiProcessingParams().setProcessPdfInOneThread( true )
  4. In case the FineReader Engine's log contains entries "Wrong thread!", check that all calls to the Engine object are synchronized. It can be done explicitly or by Inproc/Outproc loading.

Was this article helpful?

1 out of 1 found this helpful

Have more questions? Submit a request

Comments

0 comments

Article is closed for comments.