I came across an issue with barcode recognition using Aspose.BarCodeRecognition library. I have a code (see vb.net example below) that is iterating through a TIFF image frames and recognizing barcodes (QR codes actually) on every frame. Usually it works fine, but sometimes it fails with the NullReference exception below.
What is very unpleasant is that it makes the application to crash completely, try-catch block does not help. The exception below has been retrieved from the system windows application log.
Any experience or help with this is welcome!
'Bitmap is a System.Drawing.Image instnance
Dim rd As Aspose.BarCodeRecognition.BarCodeReader = Nothing
rd = New Aspose.BarCodeRecognition.BarCodeReader(Bitmap, ReadType)
rd.Timeout = 2500
Success = rd.Read()
Catch ex As System.Exception
’ exception is logged here
Dim CodeText As String
CodeText = rd.GetCodeText
Catch ex As Exception
’ exception logged here
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)