You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When try to extract content of Arabic image the code throwing System.AccessViolationException , and its happening only when Arabic language is selected.
Giving stack trace below System.AccessViolationException was unhandled HResult=-2147467261 Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Source=InteropRuntimeImplementer.TessApiSignaturesInstance StackTrace: at InteropRuntimeImplementer.TessApiSignaturesInstance.TessApiSignaturesImplementation.BaseApiInit(HandleRef handle, String datapath, String language, Int32 mode, String[] configs, Int32 configs_size, String[] vars_vec, String[] vars_values, UIntPtr vars_vec_size, Boolean set_only_non_debug_params) at Tesseract.Interop.TessApi.BaseApiInit(HandleRef handle, String datapath, String language, Int32 mode, IEnumerable1 configFiles, IDictionary2 initialValues, Boolean setOnlyNonDebugParams) at Tesseract.TesseractEngine.Initialise(String datapath, String language, EngineMode engineMode, IEnumerable1 configFiles, IDictionary2 initialValues, Boolean setOnlyNonDebugVariables) at Tesseract.TesseractEngine..ctor(String datapath, String language, EngineMode engineMode) at TexlangRECOEngineAPI.RECOCALL.ReadOCR(HttpPostedFileBase file, String Language, String ext, Boolean Preprocess, Boolean PDF) in C:\Users\Megdap\Documents\Visual Studio 2015\Projects\TexlangRECOEngineAPI\TexlangRECOEngineAPI\RECOCALL.cs:line 135 at TexlangRECOEngineAPI.RECOSERVICE.GetExtratedText(String key, String file, Formats f, Language language) in C:\Users\Megdap\Documents\Visual Studio 2015\Projects\TexlangRECOEngineAPI\TexlangRECOEngineAPI\RECOSERVICE.svc.cs:line 99 at SyncInvokeGetExtratedText(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet) at System.ServiceModel.Dispatcher.ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext) at System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext) at System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(IAsyncResult result) at System.ServiceModel.Dispatcher.ChannelHandler.OnAsyncReceiveComplete(IAsyncResult result) at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result) at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously) at System.Runtime.InputQueue1.AsyncQueueReader.Set(Item item)
at System.Runtime.InputQueue1.EnqueueAndDispatch(Item item, Boolean canDispatchOnThisThread) at System.Runtime.InputQueue1.EnqueueAndDispatch(T item, Action dequeuedCallback, Boolean canDispatchOnThisThread)
at System.ServiceModel.Channels.SingletonChannelAcceptor3.Enqueue(QueueItemType item, Action dequeuedCallback, Boolean canDispatchOnThisThread) at System.ServiceModel.Channels.HttpPipeline.EnqueueMessageAsyncResult.CompleteParseAndEnqueue(IAsyncResult result) at System.ServiceModel.Channels.HttpPipeline.EnqueueMessageAsyncResult.HandleParseIncomingMessage(IAsyncResult result) at System.Runtime.AsyncResult.SyncContinue(IAsyncResult result) at System.ServiceModel.Channels.HttpPipeline.EmptyHttpPipeline.BeginProcessInboundRequest(ReplyChannelAcceptor replyChannelAcceptor, Action dequeuedCallback, AsyncCallback callback, Object state) at System.ServiceModel.Channels.HttpChannelListener1.HttpContextReceivedAsyncResult1.ProcessHttpContextAsync() at System.ServiceModel.Channels.HttpChannelListener1.BeginHttpContextReceived(HttpRequestContext context, Action acceptorCallback, AsyncCallback callback, Object state)
at System.ServiceModel.Activation.HostedHttpTransportManager.HttpContextReceived(HostedHttpRequestAsyncResult result)
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest()
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest()
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequest(Object state)
at System.ServiceModel.AspNetPartialTrustHelpers.PartialTrustInvoke(ContextCallback callback, Object state)
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequestWithFlow(Object state)
at System.Runtime.IOThreadScheduler.ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at System.Runtime.Fx.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
InnerException:
`
The C# code :-
` using (IResultRenderer renderer = Tesseract.ResultRenderer.CreateTextRenderer(outputpath))
{
using (renderer.BeginDocument("Test"))
{
string configurationFilePath = tessdatapath;
using (TesseractEngine engine = new TesseractEngine(configurationFilePath, "ara", EngineMode.TesseractAndLstm))
{
string tifFile = filepathnew;
using (Pix img = Pix.LoadFromFile(tifFile))
{
using (Page page = engine.Process(img, "Test"))
{
outs = page.GetHOCRText(1, true).ToString();
renderer.AddPage(page);
}
}
}
}
}`
Please help me on this, the code is working well for other languages.
The text was updated successfully, but these errors were encountered:
I use the build with LSTM (both fast and accurate traindata) and LSTM + Tesseract modes, under several of the PSM modes. I’ve seen it work with Tesseract Only. I only use English. The posted version is a little old now.
From: ahmed-tea [mailto:notifications@github.com]
Sent: Monday, April 2, 2018 9:52 AM
To: tdhintz/tesseract4win64 <tesseract4win64@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Subject: Re: [tdhintz/tesseract4win64] Tesseract 4 win64 giving exception on Arabic language (#6)
@BladeRunner1989<https://protect-us.mimecast.com/s/v_xQCPNrVlcK4NwQs0S3Vv?domain=github.com>
May be the problem because this build work for OcrEngineMode=0 (OEM_TESSERACT_ONLY)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<https://protect-us.mimecast.com/s/JAAaCQWv8mhk6lQ7FMzFny?domain=github.com>, or mute the thread<https://protect-us.mimecast.com/s/_uauCR6wVnsvr06NSOQ8oJ?domain=github.com>.
When try to extract content of Arabic image the code throwing System.AccessViolationException , and its happening only when Arabic language is selected.
Giving stack trace below
System.AccessViolationException was unhandled HResult=-2147467261 Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Source=InteropRuntimeImplementer.TessApiSignaturesInstance StackTrace: at InteropRuntimeImplementer.TessApiSignaturesInstance.TessApiSignaturesImplementation.BaseApiInit(HandleRef handle, String datapath, String language, Int32 mode, String[] configs, Int32 configs_size, String[] vars_vec, String[] vars_values, UIntPtr vars_vec_size, Boolean set_only_non_debug_params) at Tesseract.Interop.TessApi.BaseApiInit(HandleRef handle, String datapath, String language, Int32 mode, IEnumerable
1 configFiles, IDictionary2 initialValues, Boolean setOnlyNonDebugParams) at Tesseract.TesseractEngine.Initialise(String datapath, String language, EngineMode engineMode, IEnumerable
1 configFiles, IDictionary2 initialValues, Boolean setOnlyNonDebugVariables) at Tesseract.TesseractEngine..ctor(String datapath, String language, EngineMode engineMode) at TexlangRECOEngineAPI.RECOCALL.ReadOCR(HttpPostedFileBase file, String Language, String ext, Boolean Preprocess, Boolean PDF) in C:\Users\Megdap\Documents\Visual Studio 2015\Projects\TexlangRECOEngineAPI\TexlangRECOEngineAPI\RECOCALL.cs:line 135 at TexlangRECOEngineAPI.RECOSERVICE.GetExtratedText(String key, String file, Formats f, Language language) in C:\Users\Megdap\Documents\Visual Studio 2015\Projects\TexlangRECOEngineAPI\TexlangRECOEngineAPI\RECOSERVICE.svc.cs:line 99 at SyncInvokeGetExtratedText(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet) at System.ServiceModel.Dispatcher.ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext) at System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext) at System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(IAsyncResult result) at System.ServiceModel.Dispatcher.ChannelHandler.OnAsyncReceiveComplete(IAsyncResult result) at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result) at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously) at System.Runtime.InputQueue
1.AsyncQueueReader.Set(Item item)at System.Runtime.InputQueue
1.EnqueueAndDispatch(Item item, Boolean canDispatchOnThisThread) at System.Runtime.InputQueue
1.EnqueueAndDispatch(T item, Action dequeuedCallback, Boolean canDispatchOnThisThread)at System.ServiceModel.Channels.SingletonChannelAcceptor
3.Enqueue(QueueItemType item, Action dequeuedCallback, Boolean canDispatchOnThisThread) at System.ServiceModel.Channels.HttpPipeline.EnqueueMessageAsyncResult.CompleteParseAndEnqueue(IAsyncResult result) at System.ServiceModel.Channels.HttpPipeline.EnqueueMessageAsyncResult.HandleParseIncomingMessage(IAsyncResult result) at System.Runtime.AsyncResult.SyncContinue(IAsyncResult result) at System.ServiceModel.Channels.HttpPipeline.EmptyHttpPipeline.BeginProcessInboundRequest(ReplyChannelAcceptor replyChannelAcceptor, Action dequeuedCallback, AsyncCallback callback, Object state) at System.ServiceModel.Channels.HttpChannelListener
1.HttpContextReceivedAsyncResult1.ProcessHttpContextAsync() at System.ServiceModel.Channels.HttpChannelListener
1.BeginHttpContextReceived(HttpRequestContext context, Action acceptorCallback, AsyncCallback callback, Object state)at System.ServiceModel.Activation.HostedHttpTransportManager.HttpContextReceived(HostedHttpRequestAsyncResult result)
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest()
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest()
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequest(Object state)
at System.ServiceModel.AspNetPartialTrustHelpers.PartialTrustInvoke(ContextCallback callback, Object state)
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequestWithFlow(Object state)
at System.Runtime.IOThreadScheduler.ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at System.Runtime.Fx.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
InnerException:
`
The C# code :-
` using (IResultRenderer renderer = Tesseract.ResultRenderer.CreateTextRenderer(outputpath))
{
using (renderer.BeginDocument("Test"))
{
Please help me on this, the code is working well for other languages.
The text was updated successfully, but these errors were encountered: