[i'm using JAVA] I'm facing a problem while running my Flexicapture application using SDK. As per as your tutorials, 1. First load the engine 2. perform all task 3. unload the engine.

same way i'm trying to do (same as your java Hello sample code), additionally i'm using flexicapture processor for recognition process.

if any kind of exception occurs during application life cycle ( even not related to Flexicapture engine object, for example null pointer exception while accessing a object of our application) a problems occurs when i try to run our application again, FCengine.dll loaded already in classloader

i'm carefully unloading engine as below;

  // Release Engine resources
    if (engine != null) { // stop making entry in log files


    logger.debug("unloading EngineLoader and Engine");

    // release engine object

    if (engineLoader != null)

i've loaded engine as below

logger.debug("Loading Engine Objects");

        engineLoader = Engine.CreateEngineOutprocLoader();
        engine = engineLoader.Load(serialNumber, dllPath);

        if (engine == null || engineLoader == null)
            logger.debug("Failed to load engine, engine=null Or                                      engineLoader == null...... : startRecognization() ");
            return ;

        logger.debug("Engine Loaded");

          //This method enables logging of errors, warnings and method calls
          engine.StartLogging(engineLogFilePath, true);

I'm making sure the unload engine task must execute at the end the application, either any exception occurs or not, the unload engine method must be execute.

Additionally i found, in tutorials, under the title "Final Step: Unload FlexiCapture Engine" ... following code sample for unloading FCengine.dll

FCEngine::IEnginePtr Engine;
// HANDLE to FCEngine.dll
static HMODULE s_libraryHandle = 0;
BOOL UnloadFCEngine()
  if( s_libraryHandle == 0 ) {
    return TRUE;

  // Release Engine object
  if( Engine != 0 ) {

  // Check if FCEngine.dll can be unloaded
  typedef HRESULT (STDAPICALLTYPE* DeinitializeEngineFunc)();
  DeinitializeEngineFunc pDeinitializeEngine = 
    (DeinitializeEngineFunc)GetProcAddress( s_libraryHandle, "DeinitializeEngine" );

  if( pDeinitializeEngine == 0 || pDeinitializeEngine() != S_OK ) {
    return FALSE;

  // Now we can free library safely
  FreeLibrary( s_libraryHandle );
  s_libraryHandle = 0;

  return TRUE;

but can't found a way to implement the same in Java, can't found any method like DeinitializeEngineFunc()

Please suggest us a solution.

asked 27 Jan '14, 15:41

nits's gravatar image


edited 27 Jan '14, 15:43

We have received your letter with this description sent to SDK_Support@abbyy.com and are already investigating your issue. As soon as we get any news, we will let you know via e-mail.


answered 27 Jan '14, 19:11

SDK_support's gravatar image

SDK_support ♦♦

Yet there is no reply from your side with solution. Pls help us to resolve this issue asap

(15 May '14, 11:30) nits

Probably there was some technical issue with the e-mail - we have send you our letter once more. Can you please check your e-mail and let us know whether you have received it?

(15 May '14, 11:50) SDK_support ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 27 Jan '14, 15:41

Seen: 2,225 times

Last updated: 15 May '14, 13:26

© 2016 ABBYY. All rights Reserved. www.ABBYY.com | Privacy Policy | Legal