Hi Abby team,
I am trying to run the Hello.java 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 [libImage.Services.Core.so+0x3d2572] FObj::CPtr<Image::CWriteImageStream>::~CPtr()+0x22
Please help.
Comments
4 comments
Hi
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
Yes, I have the Finereader Engine with the jar file and samples. I also have the libImage.Services.Core.so 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.io.File;
import java.nio.file.*;
public class Hello {
private IEngine engine = null;
public static void main( String[] args ) {
try {
Hello application = new Hello();
application.Run();
} catch( Exception ex ) {
displayMessage( ex.getMessage() );
}
}
public void Run() throws Exception {
// Load ABBYY FineReader Engine
loadEngine();
try{
// Process with ABBYY FineReader Engine
processWithEngine();
} finally {
// Unload ABBYY FineReader Engine
unloadEngine();
}
}
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
setupFREngine();
// Process sample image
processImage();
} 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 );
return;
}
// Create document
IFRDocument document = engine.CreateFRDocument();
try {
// Add image file to document
displayMessage( "Loading image..." );
System.out.println(imagePath);
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
document.Close();
}
} catch( Exception ex ) {
displayMessage("Catch Block " + ex.getMessage());
}
}
private void unloadEngine() throws Exception {
displayMessage( "Deinitializing Engine..." );
engine = null;
Engine.DeinitializeEngine();
}
private static void displayMessage( String message ) {
System.out.println( message );
}
}
Hi
It seems all fine,
are other Java-programs running correctly?
I see you are running finereader as root, is Java running as root also?
Please sign in to leave a comment.