OCR: Exception thrown by the target of an invocation

Discussions about machine vision support in GdPicture.
Post Reply
mjnaleva
Posts: 14
Joined: Fri Jul 03, 2009 8:44 pm

OCR: Exception thrown by the target of an invocation

Post by mjnaleva » Sat Jan 29, 2011 7:27 pm

Hello,

We have a Windows form application which utilizes GdPicture.NET v6 with the tesseract OCR plugin. Every once in a while a customer reports getting a popup message that is coming from GDPicture saying "OCR: Exception thrown by the target of an invocation". As this issue only on occasion pops up we can not pinpoint what the trigger might be for this error and since it comes from within GDPicture we currently have no way of knowing how to better handle this situation other than tell the customer if this happens repeatedly to basically close things and then re-open. I have read other posts about the tesseract engine not being thread safe but in our application we don't have any extra background threads running. It's a standard Windows form .NET application. At one point we realized that we were missing a required DLL for redistribution. However, adding that missing DLL didn't fix things entirely. So now, we ship 3 DLLs as recommended in the v6 documentation:

GdPicture.NET.Dll
GdPicture.NET.image.gdimgplug.dll
GdPicture.NET.ocr.tesseract.dll

Is is possible we need to include another DLL that maybe only very occasionally is needed? It seems like this wouldn't be the case if the error is really coming from the OCR plugin as suggested by the error message.

We're not in a position where simply trying to update DLLs and see if that fixes the problem works. Instead, we would like to know more about how this exception gets generated from GdPicture and what, if anything, we can do in our application to handle things when this exception happens (unless it's verified in release notes somewhere that this issue was known and fixed). For example, is there a flag we can check somewhere after the call to OCRTesseractDoOCR() as I don't think we can assume that a null or empty string returned from this call means that this exception occurred.


Thanks,
Mark

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: OCR: Exception thrown by the target of an invocation

Post by Loïc » Sun Jan 30, 2011 6:14 pm

Hi Mark,

I can only (highly) suggest to update your customers with latest V6 version available from https://www.gdpicture.com/download/legacy/V6
If the problem persists, we need the file which caused the crash + a code snippet. But it should not with our latest release.

Kind regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest