Abby Sample File Not working(java)

  • Last Post 27 November 2018
Ash Gajankush posted this 25 January 2018

Hi Abby team,

I am trying to run the file in eclipse to get the output of the Sample file but when I run it it shows this error.

# A fatal error has been detected by the Java Runtime Environment:


#  SIGSEGV (0xb) at pc=0x00007f42d7644572, pid=35651, tid=139927034603264


# JRE version: OpenJDK Runtime Environment (8.0_65-b17) (build 1.8.0_65-b17)

# Java VM: OpenJDK 64-Bit Server VM (25.65-b01 mixed mode linux-amd64 compressed oops)

# Problematic frame:

# C  []  FObj::CPtr<Image::CWriteImageStream>::~CPtr()+0x22

Please help.

Order By: Standard | Newest | Votes
Koen de Leijer posted this 26 January 2018


Have you installed the Finereader Engine itself?
Can you provide some more logging, or the exact sample you've used of even the complete eclipse-project?
What version of Finereader are you using? Is that the 32- or 64-bit installation?
Have you included the com.abbyy.frengine.jar into your build-path?

Best regards
Koen de Leijer

Ash Gajankush posted this 26 January 2018

Bin folder showing the required library.Java Build path with jar added.Hi Koen,

Yes, I have the Finereader Engine with the jar file and samples. I also have the file in the Bin folder after installation which is apparently throwing the error. The FREngine which we have installed is 64 bit. I have attached two documents, they contain the build path an the Bin folder showing the required driver files. Here is the code snippet which I used as an example,

package {rightly specified}

// (c) 2013 ABBYY Production LLC

// SAMPLES code is property of ABBYY, exclusive rights are reserved. 


// DEVELOPER is allowed to incorporate SAMPLES into his own APPLICATION and modify it under 

// the  terms of  License Agreement between  ABBYY and DEVELOPER.



// ABBYY FineReader Engine 11 Sample


// This sample shows basic steps of ABBYY FineReader Engine usage:

// Initializing, opening image file, recognition and export.


import com.abbyy.FREngine.*;



import java.nio.file.*;


public class Hello {

private IEngine engine = null;

public static void main( String[] args ) {

try {


Hello application = new Hello();


} catch( Exception ex ) {

displayMessage( ex.getMessage() );




public void Run() throws Exception {

// Load ABBYY FineReader Engine



// Process with ABBYY FineReader Engine


} finally {

// Unload ABBYY FineReader Engine





private void loadEngine() throws Exception {

displayMessage( "Initializing Engine..." );

displayMessage( SamplesConfig.GetDllFolder()+"\t"+SamplesConfig.GetDeveloperSN());

engine = Engine.GetEngineObject(SamplesConfig.GetDllFolder(),SamplesConfig.GetDeveloperSN());



private void processWithEngine() {

try {

// Setup FREngine


// Process sample image


} catch( Exception ex ) {

displayMessage( ex.getMessage() );




private void setupFREngine() {

displayMessage( "Loading predefined profile..." );

engine.LoadPredefinedProfile( "DocumentConversion_Accuracy" );

// Possible profile names are:

//   "DocumentConversion_Accuracy", "DocumentConversion_Speed",

//   "DocumentArchiving_Accuracy", "DocumentArchiving_Speed",

//   "BookArchiving_Accuracy", "BookArchiving_Speed",

//   "TextExtraction_Accuracy", "TextExtraction_Speed",

//   "FieldLevelRecognition",

//   "BarcodeRecognition_Accuracy", "BarcodeRecognition_Speed",

//   "HighCompressedImageOnlyPdf",

//   "BusinessCardsProcessing",

//   "EngineeringDrawingsProcessing",

//   "Version9Compatibility",

//   "Default"



private void processImage() {

String imagePath = SamplesConfig.GetSamplesFolder() + "/SampleImages/Demo.tif";

try {

// Don't recognize PDF file with a textual content, just copy it


if( engine.IsPdfWithTextualContent( imagePath, null ) ) {

displayMessage( "Copy results..." );

String resultPath =SamplesConfig.GetSamplesFolder() + "/SampleImages/Demo_copy.pdf";

Files.copy( Paths.get( imagePath ), Paths.get( resultPath ), StandardCopyOption.REPLACE_EXISTING );




// Create document

IFRDocument document = engine.CreateFRDocument();


try {

// Add image file to document

displayMessage( "Loading image..." );


document.AddImageFile( imagePath, null, null ); // GETTING ERROR AT THIS PARTICULAR LINE.


// Process document

displayMessage( "Process..." );

document.Process( null );


// Save results

displayMessage( "Saving results..." );


// Save results to rtf with default parameters

String rtfExportPath =SamplesConfig.GetSamplesFolder() + "/SampleImages/Demo.rtf";

document.Export( rtfExportPath, FileExportFormatEnum.FEF_RTF, null );


// Save results to pdf using 'balanced' scenario

IPDFExportParams pdfParams = engine.CreatePDFExportParams();

pdfParams.setScenario( PDFExportScenarioEnum.PES_Balanced );

String pdfExportPath =SamplesConfig.GetSamplesFolder() + "/SampleImages/Demo.pdf";

document.Export( pdfExportPath, FileExportFormatEnum.FEF_PDF, pdfParams );

} finally {

// Close document



} catch( Exception ex ) {

displayMessage("Catch Block " + ex.getMessage());



private void unloadEngine() throws Exception {

displayMessage( "Deinitializing Engine..." );

engine = null;




private static void displayMessage( String message ) {

System.out.println( message );





Koen de Leijer posted this 28 January 2018

It seems all fine,
are other Java-programs running correctly?
I see you are running finereader as root, is Java running as root also?

선승훈 posted this 27 November 2018

I meet the same issue also. Do you support the open jdk?