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
I saw that there was a fix in 1.5.9. committed, but our App is still crashing at the same location.
*** Terminating app due to uncaught exception 'System.NullReferenceException', reason: 'Object reference not set to an instance of an object. (System.NullReferenceException)
at BarcodeScanning.BarcodeResult.GetHashCode()
at System.Collections.Generic.HashSet`1[[BarcodeScanning.BarcodeResult, BarcodeScanning.Native.Maui, Version=1.5.9.0, Culture=neutral, PublicKeyToken=null]].AddIfNotPresent(BarcodeResult value, Int32& location)
at System.Collections.Generic.HashSet`1[[BarcodeScanning.BarcodeResult, BarcodeScanning.Native.Maui, Version=1.5.9.0, Culture=neutral, PublicKeyToken=null]].Add(BarcodeResult item)
at BarcodeScanning.Methods.ProcessBarcodeResult(VNBarcodeObservation[] inputResults, HashSet`1 outputResults, AVCaptureVideoPreviewLayer previewLayer)
at BarcodeScanning.BarcodeAnalyzer.<.ctor>b__4_0(VNRequest request, NSError error)
at ObjCRuntime.Trampolines.SDVNRequestCompletionHandler.Invoke(IntPtr block, NativeHandle request, NativeHandle error) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/build/dotnet/ios/generated-sources/ObjCRuntime/Trampolines.g.cs:line 50766
at Vision.VNSequenceRequestHandler.Perform(VNRequest[] requests, CMSampleBuffer sampleBuffer, NSError& error) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/build/dotnet/ios/generated-sources/Vision/VNSequenceRequestHandler.g.cs:line 355
at BarcodeScanning.BarcodeAnalyzer.DidOutputSampleBuffer(AVCaptureOutput captureOutput, CMSampleBuffer sampleBuffer, AVCaptureConnection connection)
The text was updated successfully, but these errors were encountered:
I see the crash happens on iOS/MacOS.
Both DisplayValue and RawValue are bound to PayloadStringValue so i guess PayloadStringValue is null or empty, but this is very strange.
I'll update the code in next release to ignore this barcodes or to get the value from PayloadData.
Can you please share the barcode image and OS version where it crashes.
I'll do one more net8 release next week as there is a major AndroidX.Camera update so I have to update a few things.
What I have noticed is that I didn't have <Nullable>enable</Nullable> so I'll do a hardening on a dozen of possible null reference exceptions.
I saw that there was a fix in 1.5.9. committed, but our App is still crashing at the same location.
The text was updated successfully, but these errors were encountered: