Getting this from .net and C++ code and can't figure out what is causing it. Seems to work when targeting 9.2 but 9.1 Laserfiche fails.
Server is Windows Server 2012 R2 Standard
DocumentProcessor log:
26-Aug-2015, 20:33:39, [16387 (0x00004003)]: 14960 - Invalid pointer
Example Program:
```C#
using LFSO91Lib;
using DocumentProcessor91;
using System;
namespace OcrTest
{
class Program
{
static void Main(string[] args)
{
var program = new Program();
}
public Program()
{
var app = new LFApplication();
app.EnableTracing("C:\\temp\\");
var server = app.GetServerByName("aosdemo");
var db = server.GetDatabaseByName("aosdemo");
var conn = new LFConnection();
conn.UserName = "admin";
conn.Password = "admin";
conn.Create(db);
MoveFileToDestination(db, "DEFAULT", "__SCTest\\OCRTesting\\New Folder\\", "ctest", "data\\SAMPLE 1.tif");
Console.WriteLine("Press any key to quit...");
Console.ReadKey();
conn.Terminate();
}
bool MoveFileToDestination(ILFDatabase db, string Volume, string Destination, string DocumentName, string filename)
{
bool result = false;
bool newDocument = false;
Entry_Type entryType = Entry_Type.ENTRY_TYPE_DOCUMENT;
ILFDocument document = null;
try
{
newDocument = true;
document = new LFDocument();
var volume = db.GetVolumeByName(Volume);
var parent = db.GetEntryByPath(Destination);
document.Create(DocumentName, parent, volume, true);
int idxStartPage = 0;
int idxEndPage = 0;
int pageRef = 0;
var DI = new DocumentImporter();
DI.LogFile = "C:\\temp\\di.log";
DI.LogLevel = Log_Level.LOGLEVEL_DEBUG;
DI.Document = document;
var path = System.IO.Path.Combine(
System.Reflection.Assembly.GetExecutingAssembly().Location,
filename);
document.LockObject(Lock_Type.LOCK_TYPE_WRITE);
DI.ImportImagesFromFile(filename);
document.UnlockObject();
result = true;
LFDocumentPages docPages = (LFDocumentPages)document.Pages;
var ocr = new OCREngine();
docPages.MarkAllPages();
ocr.OCRMarkedPages(docPages);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
// if we created a new document and it wasn't sent to LF successfully,
// then delete it and show the error
if (document != null)
{
document.Delete();
document = null;
}
}
finally
{
if (document != null)
{
document.Update();
document.Dispose();
}
}
return result;
}
}
}
```