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 : Wednesday, July 29, 2009 4:24:55 PM(UTC)

KJS  
KJS

Groups: Registered
Posts: 7


When My-program1 and My-program2 are OCRing at the same time on an PC, an Exception occured as below. This is because I want faster OCR performance and 2 same program OCR parrarelly. Surely, My-program1 and My-program2 are same one but different name on them.

What is very strange is that there is no problem when one of them soley OCRs.

---- Occured Exception ----

System.ArgumentNullException: null is not allowed

variable name: ptr
   : System.Runtime.InteropServices.Marshal.PtrToStringAnsi(IntPtr ptr, Int32 len)
   : Leadtools.Forms.Ocr.Plus.OcrPage.RecognizeText(OcrProgressCallback callback)
   : HIRIS_OCR_G1.MainForm._GetOcrCode_folder(Rectangle rect, String gbn, String saupbu, Int32 SaveCnt)

----------------------------------------------------------

this is part of my source code.

------------------------------------------------------------

namespace My-program1
{

    public partial class MainForm : Form
    {

...........

         private string strOCRCode = "";

        void _GetOcrCode_folder(Rectangle rect, string gbn, string saupbu, int SaveCnt)
        {

......

            try
            {

...........

                strOCRCode = _document.Pages[0].RecognizeText(null);           // exception occured !!!!

..............

            catch (Exception ex)
            {

................

            }

}

----------------------------------------

namespace My-program2
{

    public partial class MainForm : Form
    {

...........

         private string strOCRCode = "";

        void _GetOcrCode_folder(Rectangle rect, string gbn, string saupbu, int SaveCnt)
        {

......

            try
            {

...........

                strOCRCode = _document.Pages[0].RecognizeText(null);           // exception occured !!!!

..............

            catch (Exception ex)
            {

................

            }

}

---------------------------------------------------

Leadtool V16 and C# is used.

Thanks in advance.

 

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 : Thursday, July 30, 2009 6:21:30 AM(UTC)

Basel  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

It seems to me that you are using the old setup of LEADTOOLS v16.0. The design of the OCR engine has been changed and the Leadtools.Document namespace is deprecated and no longer supported as of LEADTOOLS v16. For v16 and later use Leadtools.Forms.Ocr instead. Please send your serial to sales@leadtools.com and check the possibility of a free upgrade to LEADTOOLS v16.5

 
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.059 seconds.