Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, March 10, 2015 3:52:56 AM(UTC)

alekz  
alekz

Groups: Registered
Posts: 9


Good day,

I was trying to test the multithreading capabilities of the OCR engines (we have Advantatge and Professional licenses).

In a normal winforms application, both engines work as expected with and without the thunk=true option passed to OcrEngineManager.CreateEngine.

But an unhandled win32 exception happens everytime in w3wp.exe (worker process of IIS) when the code tries to recognize a page. The exact method that fails is IOcrPage.RecognizeText.

The code is pretty simple, and further tests showed that the exception is NOT thrown when the thunk parameter is FALSE, although this won't enable the professinal engine for multiple simultaneous recognitions.

The error reported is:
Unhandled Exception at 0x77A8E753 (ntdll.dll) in w3wp.exe: 0xC0000374: A heap has been corrupted (parameters: 0x77AC4270)

The thunk file versions I'm using are:
Ltdocthunk2u.dll = 17.5.0.7
ltthunkutlu.dll = 17.5.0.2
ltthunkserver.exe = 17.5.0.3
ltdocthunku.dll = 17.5.0.3
Ltdocthunkaru.dll = 17.5.0.3

I investigated further and found these 2 pages, which I think may point to the right source of the problem (since it happens when the COM+ thunk comes in):
1- http://blogs.msdn.com/b/...n-from-native-c-dll.aspx

2- https://msdn.microsoft.com/en-us/library/f1cf4kkz(VS.80).aspx

The testes were done in a Windows 7 64bit, with IIS7, but the .net code that uses the LT Ocr engine is compiled to 32 bit (both the winforms client and the IIS Wcf service).

Do you know of a workaround to this problem?
Thanks in advance
Alejandro

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Tuesday, March 10, 2015 7:38:59 AM(UTC)

mohamed  
mohamed

Groups: Registered, Tech Support
Posts: 179


Alejandro,
I need more information about this issue so please send an email to support@leadtools.com and include the following:
1.  Your toolkit serial number (do not post it here).
2. A link to this forum post.
3. The build number of Leadtools.dll
4. Small test project (not your full application) along with test steps. So we can test this issue on my side.

If you email any attachments, please put them in a ZIP or RAR file to ensure our server delivers them correctly and do not send your full application.
Mohamed Abedallah
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 
#3 Posted : Wednesday, March 11, 2015 4:39:33 AM(UTC)

alekz  
alekz

Groups: Registered
Posts: 9


Hello Mohamed,

I was building a sample application in order to send it to you, and when I tested it worked just fine, so never mind.

I reviewed my code, and didn't find any problems. The only thing I was doing different from the sample application I was going to send, was the use of a new separate thread when doing the recognition, and then waiting for the result in the original thread. Maybe there's something related to threading that complicates the process.

When I changed the recognition to be performed synchronously the ocr thunking didn't hang w3wp.exe

Thank you for your time anyway
Best regards
Alejandro
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.132 seconds.