Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

OCR Engine fails on long runs
Started by przemekg at 02-08-2008 5:14. Topic has 7 replies.

Print Search « Previous Thread Next Thread »
  02-08-2008, 5:14
przemekg is not online. Last active: 2/27/2008 11:26:35 AM przemekg

Top 75 Posts
Joined on 09-14-2005
Posts 27
OCR Engine fails on long runs
Reply Quote
I'm using Leadtools to automaticaly perform large amount of documents. One of the performing scenario step is text recognition and unfortunately I have problem with this. The problem occurs when the app perform more than c.a. 1000 documents. It seems to be that something is wrong with the OCR Engine. Here is the log:
<BR>
<BR>

Type : System.AccessViolationException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Attempted to read or write protected memory. This is often an
indication that other memory is corrupt.
Source : Leadtools.Kernel.Ocr
Help link :
Data : System.Collections.ListDictionaryInternal
TargetSite : Int32 a(y*)
Stack Trace : w a(y* )
w Leadtools.Kernel.Ocr.ScanSoftSDK.RecFreeImg(IntPtr hImg)
w Leadtools.Ocr.RasterOcr.RemovePage(Int32 pageIndex)
<BR>
<BR>
<BR>

After that error ocr engine stops working and throws:
<BR><BR>

Type : Leadtools.Ocr.RasterOcrException, Leadtools.Ocr, Version=14.5.0.72, Culture=neutral, PublicKeyToken=9cf889f53ea9b907
Message : Recognition process time out
Source : Leadtools.Ocr

<BR><BR><BR>
As you can see I am using 14.5.0.72 version and the 12.7.2006.1041 version of the ocr engine. I observed the memory ussage, and for sure it is not an issue. It is on the same level during the whole processing. My guess is that sth is wrong with the ScanSoft OCR engine because it's not the first time when it failed. Last time when i had problem with it I ve just upgraded the engine but this time i think that there is no newer version?
   Report 
  02-10-2008, 4:56
Adam Boulad is not online. Last active: 11/20/2008 3:23:08 PM Adam Boulad



Top 10 Posts
Joined on 09-16-2007
Posts 513
Re: OCR Engine fails on long runs
Reply Quote

Hello,

Is this problem specific to certain files?

If you use the same file repeatedly, do you still get the same error?

I want to try to reproduce the problem here, so can you try to reproduce the problem in a small sample project (not your full application) in a ZIP or RAR file? You can either post it here or send it to support@leadtools.com and mention this forum post.

If you are attaching the project to this post, please do include any serial numbers or unlock key, and do not hit preview when attaching a file.


Adam Boulad
LEADTOOLS Technical Support

   Report 
  02-11-2008, 2:14
przemekg is not online. Last active: 2/27/2008 11:26:35 AM przemekg

Top 75 Posts
Joined on 09-14-2005
Posts 27
Re: OCR Engine fails on long runs
Reply Quote
Unfortunately the problem is not conected with specific files. After the weekend's tests i discovered that the problem might be connected with multithreading. If I ran my app in only one thread everything seems to be fine after 2000+ documents. I know that OCR engine does not support multithreading so that each operation that uses RasterOcr class is synchronized by C# lock statement.
   Report 
  02-11-2008, 6:55
Adam Boulad is not online. Last active: 11/20/2008 3:23:08 PM Adam Boulad



Top 10 Posts
Joined on 09-16-2007
Posts 513
Re: OCR Engine fails on long runs
Reply Quote

If it turns out to be a problem in our SDK, and you can reproduce it in a program that doesn't use multi-threading, please send me the details (or a small sample demo) and I will check it here.


Adam Boulad
LEADTOOLS Technical Support

   Report 
  02-27-2008, 6:34
przemekg is not online. Last active: 2/27/2008 11:26:35 AM przemekg

Top 75 Posts
Joined on 09-14-2005
Posts 27
Re: OCR Engine fails on long runs
Reply Quote
Hi,

Unfortunately the problem occurs also in the single thread app. I will try to prepare small app that can reproduce the problem. The strange thing is that the engine fails with different errors. For example last time i got following:



Type : Leadtools.Ocr.RasterOcrException, Leadtools.Ocr, Version=14.5.0.72, Culture=neutral, PublicKeyToken=9cf889f53ea9b907
Message : Recognition process time out
Source : Leadtools.Ocr
Help link :
Code : RecognitionTimeOut
Data : System.Collections.ListDictionaryInternal
TargetSite : Void a(Int32)
Stack Trace : w Leadtools.Ocr.RasterOcrException.a(Int32 A_0)
w Leadtools.Ocr.RasterOcr.Recognize(Int32 startPage, Int32 pageCount)


   Report 
  02-27-2008, 11:30
Adam Boulad is not online. Last active: 11/20/2008 3:23:08 PM Adam Boulad



Top 10 Posts
Joined on 09-16-2007
Posts 513
Re: OCR Engine fails on long runs
Reply Quote

OK, if you create a sample project, post it here or send it to support@leadtools.com and we will check it for you.


Adam Boulad
LEADTOOLS Technical Support

   Report 
  04-17-2008, 4:46
Matthias Korn is not online. Last active: 4/17/2008 9:42:46 AM Matthias Korn

Not Ranked
Joined on 07-20-2007
Posts 4
Re: OCR Engine fails on long runs
Reply Quote

Hi,

are there any news on this subject?
I have the same issue when ocr'ing large amounts of pages. (LT 14.5)

Would it be helpful to count the pages and reinitialize the OCR Engine after a certain number?

Thanks in advance.

Regards,
Matthias


   Report 
  04-20-2008, 10:14
Adam Boulad is not online. Last active: 11/20/2008 3:23:08 PM Adam Boulad



Top 10 Posts
Joined on 09-16-2007
Posts 513
Re: OCR Engine fails on long runs
Reply Quote

Matthias,

The problem you're facing my or may not be similar or related to the post above, so please start a new thread and explain the issue in full details. When you do that, please mention which LEADTOOLS programming interface you're using (DLL API, Raster COM objects, C++ Classes, etc.) and the build number (version info) of LEADTOOLS files you have.

Also, explain whether you keep adding pages to the same recognition session, or do you repeatedly add a page then remove it. It would be better to create a small test project (not your full application) that shows the problem and send it to us.

You can either post or send an email to support@leadtools.com.

Also, if you want to include attachments, please put them in a ZIP or RAR file.

Please don't post here any unlock keys or serial number.


Adam Boulad
LEADTOOLS Technical Support

   Report 
Post
LEAD Support Fo... » Developer » OCR » OCR Engine fails on long runs

Powered by Community Server, by Telligent Systems