You are viewing limited content. For full access, please sign in.

Question

Question

System.NullReferenceException: Invalid pointer

SDK
asked on May 7, 2014

I am getting the following error message when OCRing a document using DocumentProcessor 8.0.  Any ideas what might cause this and/or what it means? 

 

System.NullReferenceException: Invalid pointer (Exception from HRESULT: 0x80004003 (E_POINTER))
   at DocumentProcessor80.OCREngineClass.OCRMarkedPages(Object DocumentPages)

 

Thanks,

 

Russell

 

0 0

Replies

replied on May 13, 2014

Any ideas on this?

0 0
replied on June 23, 2014 Show version history

I have added the OCR logging and the Application Tracing (LFApplication.EnableTracing).  The error text seen in both logs is below.  The most information was in the App Tracing.  I have only posted the section of the tracing log that has the error.  Please let me know if you would like to see the entire log.  Seems to be losing the connection?

 

OCR Log File:

 

23-Jun-2014, 08:30:50, [16387 (0x00004003)]: 12804 - Invalid pointer

 

Application Tracing: (just error section)

 

08:30:55.644 [12804]  ILFHasEntryLock::~ILFHasEntryLock
08:30:55.644 [12804]   CLFLock::UnlockObject
08:30:55.644 [12804]    LFSession::SendRequest (UNLOCK /+LF/entry/388369)
08:30:55.644 [12804]    Connection 21 was marked terminated (admin)
08:30:55.644 [12804]    ERROR: 790 (LFSession::SendRequest, LFSession.cpp:3319)
08:30:55.644 [12804]     LFOException::GetErrorMessage
08:30:55.644 [12804]     Error: Invalid connection.
08:30:55.644 [12804]    LFOException::GetErrorMessage
08:30:55.644 [12804]    Error: Invalid connection.
08:30:55.645 [12804]  ILFObjectImpl::~ILFObjectImpl
08:30:55.645 [12804]  CLFPage::~CLFPage

 

 

 

0 0
replied on June 25, 2014

Here is a sample page that fails.  This is not specific to this page.  The issue is seen on many other pages when the app tries to process them.  

FailedPage.tiff (265.13 KB)
0 0
replied on May 13, 2014

What object are you passing into the method?

0 0
replied on May 13, 2014

Dim myOCR As New OCREngine

Dim DocPages As LFDocumentPages = LFDoc.Pages
DocPages.MarkAllPages()
myOCR.OCRMarkedPages(DocPages)

0 0
replied on May 14, 2014

I don't see anything obviously wrong. You say you are using DocumentProcessor 8.0, are you using LFSO80 as well? That could cause the issue.

 

Additionally I would check if OCR worked on the machine by using a 8.0 Client. 

0 0
replied on May 14, 2014

The OCR worked on the machine when using Client 8.2. This is running on the Laserfiche Server which has 8.2.0 installed.

0 0
replied on May 14, 2014

I think you need to use Document Processor 8.2 instead of 8.0 then.

0 0
replied on May 14, 2014

We have the 8.0 win 32 runtime installed.  There was not SDK for 8.2.  Only a beta as far as I know.

0 0
replied on May 14, 2014

Are you using LFSO 80 or 82 to connect to Laserfiche?

0 0
replied on May 14, 2014

LFSO 8.0, DocProc 8.0 and the 8.0 Runtime is installed.  The LF server is 8.2

0 0
replied on June 20, 2014

Ed,

 

I have run the app now using 9.0 LF objects (LFSO and DocProc), 9.0 client, 9,0 server and the 9.0 run time installed.  I am still getting the same error.  I need to know the specifics of this error and what is causing it?   What is need to assist?

 

Thanks,

 

Russ

0 0
replied on June 20, 2014 Show version history

Does the document have image pages or is it an electronic document?

 

Does the application work for some documents and then fails after time?

replied on June 25, 2014

Laserfiche Dev stated that I am closing the connection based on what is in the trace log.  I am not calling connection.terminate anywhere in the code.  In fact I have a sample app that processes jut this page and does not kill the connection when the app closes .  I have to kill the connection in the admin console or wait for it to time out based on my inactivity log out time I have set for the repository.

0 0
replied on June 25, 2014

If this is in a long running process, is it possible that someone else is using the LF Admin Console to kill the connection of the user?

0 0
replied on June 25, 2014 Show version history

This is not the case.   It takes under a minute for the process to begin and the exception to be thrown.  I can get replicate the exception across multiple repositories with 9.0 (server and LF Objects) as well as 9.1 (server and LF Objects).

0 0
replied on June 25, 2014 Show version history

Then is your program setting up multi-threading to OCR multiple documents at the same time?  If so, is your app logging out after the first OCR thread finishes?

 

Add detailed logging to your app to see what is going on inside your app to trace if it is killling the connection without you realizing it.

0 0
replied on June 25, 2014

No as I mentioned above I created a very simple single threaded application that OCR's just the page I am using for an example that causes the exception to be thrown.  The app does NOT  conn.terminate() anywhere in the code.  This simple app generates the exact same error as I am seeing in out OCR app that process multiple documents. 

 

I am beginning to wonder about the result of the trace.  The app will continue to process multiple docs/pages after the exception is thrown so how could there be no connection? 

0 0
replied on July 1, 2014 Show version history

I am unable to attach the requested sample file.

 

The file has a .tif extension. Apparently this site requires .tiff amongst others and doesn't also allow .zip exntensions. Please advise on how to proceed.

 

"The selected file FailedPage.tif cannot be uploaded. Only files with the following extensions are allowed: txt, jpg, jpeg, gif, png, tiff, rtf, doc, docx, pdf, xls, xlsx, odt."

0 0
replied on July 1, 2014

Just rename the extension to .tiff.

0 0
replied on July 2, 2014

Sample image attached

FailedPage.tiff (265.13 KB)
0 0
replied on July 8, 2014

Can you attach all of the trace logs? The application tracing snippit you posted isn't relevant to this error.

0 0
replied on July 10, 2014

Robert,

 

Can you specify which trace logs you're referring to?

 

 

0 0
replied on July 10, 2014

The log where you got "Application Tracing: (just error section)".

0 0
replied on July 14, 2014

trace log attached

0 0
replied on July 14, 2014

I looked through the log and we need more information to pinpoint the problem. I will talk to support about re-opening your case. In the meantime, can you reproduce the problem with LFSO  & DocumentProcessor tracing enabled through the client? You enable them from Help->About->Tracing. This should produce more verbose logs.

0 0
replied on August 26, 2014

I am having a very similar if not identical issue to this one except using the 9.1 sdk.  I get an invalid point exeception when trying to OCR all pages in a document.  The page it fails on is one that is a full page image that contains no text.  It fails on that page and throws an invalid pointer exception.

0 0
replied on August 26, 2014

This particular bug was on pages with more than 29000 characters of text.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.