This project is read-only.

Sample Code - Recognition Engine halted with code: 0


I am using the latest build (x86) and running the sample application.

I managed to get the sample app to run but when I try to use it on a small test .bmp attached

I get the error halted with code 0:
Puma.Net.RecognitionEngineException was unhandled
Message=Recognition engine halted with code:0
   at Puma.Net.PumaPage.RecognizeToFile(String fileName, PumaFileFormat format)
   at Puma.Net.PumaPage.RecognizeToFile(String fileName)
   at Puma.Net.Sample.MainForm.recognizeButton_Click(Object sender, EventArgs e) in c:\Program Files (x86)\Puma.NET\Sample\MainForm.cs:line 94
   at Puma.Net.Sample.ImageViewer.recognizeButton_Click(Object sender, EventArgs e) in c:\Program Files (x86)\Puma.NET\Sample\ImageViewer.cs:line 217
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at Puma.Net.Sample.Program.Main() in c:\Program Files (x86)\Puma.NET\Sample\Program.cs:line 41
   at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Can anyone help me get the sample app actually working.

Thanks in advance


file attachments


doncisaro wrote Nov 5, 2012 at 3:16 PM

PS I have the build config set to x86

wrote Nov 25, 2012 at 3:41 PM

tsdaemon wrote Dec 21, 2012 at 12:27 PM

same problem. some thing wrong with the call to BitmapToDIB.
"A call to PInvoke function 'Puma.Net!Puma.Net.PumaPage::BitmapToDIB' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature."

wrote Feb 22, 2013 at 12:04 AM

wrote Aug 12, 2013 at 10:00 AM