Page 1 of 1

Error OCRing large file

Posted: Wed Dec 21, 2016 9:11 am
by Tom Princen
When I try to ocr a file I get this error:

System.Runtime.InteropServices.SEHException was unhandled
Message=Een extern onderdeel heeft een uitzondering veroorzaakt.
bij _Namespace..OCR_MakeSearchable(IntPtr pdf, PXO_Options& Options, IntPtr pagelist)
bij _Namespace..OCR_MakeSearchable_NoRef(IntPtr pdf, PXO_Options Options) in C:\Visual Studio Projects\\\.cs:regel 13
bij WindowsFormsApplication1.Form1.button2_Click(Object sender, EventArgs e) in C:\Visual Studio Projects\\WindowsFormsApplication1\Form1.cs:regel 114
bij System.Windows.Forms.Control.OnClick(EventArgs e)
bij System.Windows.Forms.Button.OnClick(EventArgs e)
bij System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
bij System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
bij System.Windows.Forms.Control.WndProc(Message& m)
bij System.Windows.Forms.ButtonBase.WndProc(Message& m)
bij System.Windows.Forms.Button.WndProc(Message& m)
bij System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bij System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bij System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
bij System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
bij System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
bij System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
bij System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
bij System.Windows.Forms.Application.Run(Form mainForm)
bij WindowsFormsApplication1.Program.Main() in C:\Visual Studio Projects\\WindowsFormsApplication1\Program.cs:regel 18
bij System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
bij System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
bij Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
bij System.Threading.ThreadHelper.ThreadStart_Context(Object state)
bij System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bij System.Threading.ThreadHelper.ThreadStart()

BTW I Could not attach file: The file is too big, maximum allowed size is 5 MiB...

Re: Error OCRing large file

Posted: Thu Dec 22, 2016 11:59 pm
by Ivan - Tracker Software
If you are using 32-bit DLL, I'm afraid the process cannot allocate continues chunk of memory large enough to keep required images for OCR, as the 32-bit processes has limited address space and that space often become fragmented, so, even if most of the address space is free, there are no continues block of memory.

As a solution I can see switching to 64-bit DLLs, if possible, or try to reduce quality/DPI used for OCR documents.

Re: Error OCRing large file

Posted: Fri Dec 23, 2016 10:39 am
by Tom Princen
Switching to 64 is not that simple.

Another option is to implement better memory handling in your code...

Re: Error OCRing large file

Posted: Fri Dec 23, 2016 7:45 pm
by Paul - Tracker Supp
Hi Tom,

we are always working on improving our code. Given the declining use of 32 bit systems and the 64 bit solution presented, we would consider this is a rather low priority "issue" I'm afraid.

I do not expect to see the 32 bit code "improved" in any practical time frame for your purposes, if at all.

I do apologise for any inconvenience this may cause.