Hi,
I'm doing some test with zxing bar code reader and sometimes I get the following error:
Jan 17 10:06:24 Criticals-iPad MobileUIiOS[11754] <Warning>: Unhandled Exception: 0 MobileUIiOS 0x00ce3d73 MobileUIiOS + 12914035 1 MobileUIiOS 0x00ce444f MobileUIiOS + 12915791 2 MobileUIiOS 0x00ce411f MobileUIiOS + 12914975 3 MobileUIiOS 0x00cde46d MobileUIiOS + 12891245 4 MobileUIiOS 0x00325a60 MobileUIiOS + 2697824 at MonoTouch.ObjCRuntime.Runtime.GetINativeObject_Dynamic (intptr,bool,intptr) <0x00070> at (wrapper native-to-managed) MonoTouch.ObjCRuntime.Runtime.GetINativeObject_Dynamic (intptr,int,intptr) <0x00070> 7 MobileUIiOS 0x00cb1985 MobileUIiOS + 12708229 8 AVFoundation 0x2e466e79 <redacted> + 340 9 libdispatch.dylib 0x3a1b7d1b <redacted> + 10 10 libdispatch.dylib 0x3a1be273 <redacted> + 374 11 libdispatch.dylib 0x3a1be06b <redacted> + 42 12 libdispatch.dylib 0x3a1bece1 <redacted> + 76 13 libdispatch.dylib 0x3a1bef59 <redacted> + 56 14 libsystem_pthread.dylib 0x3a2f9dbf _pthread_wqthread + 298 15 libsystem_pthread.dylib 0x3a2f9c84 start_wqthread + 8 Jan 17 10:06:24 Criticals-iPad MobileUIiOS[11754] <Warning>: Unhandled managed exception: Unable to cast object of type 'ZXing.Mobile.ZXingScannerViewController' to type 'MonoTouch.CoreMedia.CMSampleBuffer'. (System.InvalidCastException) at MonoTouch.ObjCRuntime.Runtime.GetINativeObject (IntPtr ptr, Boolean owns, System.Type target_type, System.Type implementation) [0x00000] in <filename unknown>:0 at MonoTouch.ObjCRuntime.Runtime.GetINativeObject_Dynamic (IntPtr ptr, Boolean owns, IntPtr type_ptr) [0x00000] in <filename unknown>:0 at (wrapper native-to-managed) MonoTouch.ObjCRuntime.Runtime:GetINativeObject_Dynamic (intptr,int,intptr)
My code is:
`var scanner = new ZXing.Mobile.MobileBarcodeScanner();
var result = await scanner.Scan(MobileBarcodeScanningOptions.Default, false);
if (result != null)
{
string scanResult = result.Text;
....
}`
Any of you have this problem? Is there anything wrong with my code?
Thanks,
L. Pinho