System.Threading.ThreadAbortException: Thread was being aborted
at ZXing.Common.HybridBinarizer.calculateBlackPoints (System.Byte[] luminances, Int32 subWidth, Int32 subHeight, Int32 width, Int32 height) [0x00000] in <filename unknown>:0
at ZXing.Common.HybridBinarizer.binarizeEntireImage () [0x00000] in <filename unknown>:0
at ZXing.Common.HybridBinarizer.get_BlackMatrix () [0x00000] in <filename unknown>:0
at ZXing.BinaryBitmap.get_BlackMatrix () [0x00000] in <filename unknown>:0
at ZXing.QrCode.QRCodeReader.decode (ZXing.BinaryBitmap image, IDictionary`2 hints) [0x00000] in <filename unknown>:0
at ZXing.MultiFormatReader.decodeInternal (ZXing.BinaryBitmap image) [0x00000] in <filename unknown>:0
at ZXing.MultiFormatReader.decodeWithState (ZXing.BinaryBitmap image) [0x00000] in <filename unknown>:0
at ZXing.BarcodeReaderGeneric`1[T].Decode (ZXing.LuminanceSource luminanceSource) [0x00000] in <filename unknown>:0
at ZXing.BarcodeReaderGeneric`1[T].Decode (.T rawRGB, Int32 width, Int32 height) [0x00000] in <filename unknown>:0
at BarcodeScanner.Parser.ZXingParser.Decode (UnityEngine.Color32[] colors, Int32 width, Int32 height) [0x0001e] in /Users/emmanuelah-kouen/Projects/ghm-unity/Assets/Libraries/UnityBarcodeScanner/Parser/ZXingParser.cs:41 : at ZXing.Common.HybridBinarizer.calculateBlackPoints (System.Byte[] luminances, Int32 subWidth, Int32 subHeight, Int32 width, Int32 height) [0x00000] in <filename unknown>:0
at ZXing.Common.HybridBinarizer.binarizeEntireImage () [0x00000] in <filename unknown>:0
at ZXing.Common.HybridBinarizer.get_BlackMatrix () [0x00000] in <filename unknown>:0
at ZXing.BinaryBitmap.get_BlackMatrix () [0x00000] in <filename unknown>:0
at ZXing.QrCode.QRCodeReader.decode (ZXing.BinaryBitmap image, IDictionary`2 hints) [0x00000] in <filename unknown>:0
at ZXing.MultiFormatReader.decodeInternal (ZXing.BinaryBitmap image) [0x00000] in <filename unknown>:0
at ZXing.MultiFormatReader.decodeWithState (ZXing.BinaryBitmap image) [0x00000] in <filename unknown>:0
at ZXing.BarcodeReaderGeneric`1[T].Decode (ZXing.LuminanceSource luminanceSource) [0x00000] in <filename unknown>:0
at ZXing.BarcodeReaderGeneric`1[T].Decode (.T rawRGB, Int32 width, Int32 height) [0x00000] in <filename unknown>:0
at BarcodeScanner.Parser.ZXingParser.Decode (UnityEngine.Color32[] colors, Int32 width, Int32 height) [0x0001e] in /Users/emmanuelah-kouen/Projects/ghm-unity/Assets/Libraries/UnityBarcodeScanner/Parser/ZXingParser.cs:41
UnityEngine.Debug:LogError(Object)
Wizcorp.Utils.Logger.Service.ConsoleService:AddLog(LogLevel, Object, Object) (at Assets/Libraries/UnityBarcodeScanner/External/WizUtils/Logger/Services/ConsoleService.cs:36)
Wizcorp.Utils.Logger.Log:AddLog(LogLevel, Object, Object) (at Assets/Libraries/UnityBarcodeScanner/External/WizUtils/Logger/Log.cs:56)
Wizcorp.Utils.Logger.Log:Error(Object, Object) (at Assets/Libraries/UnityBarcodeScanner/External/WizUtils/Logger/Log.cs:82)
BarcodeScanner.Parser.ZXingParser:Decode(Color32[], Int32, Int32) (at Assets/Libraries/UnityBarcodeScanner/Parser/ZXingParser.cs:49)
BarcodeScanner.Scanner.Scanner:ThreadDecodeQR() (at Assets/Libraries/UnityBarcodeScanner/Scanner/Scanner.cs:209)
What do you think about adding a boolean in Scanner and put a condition on it inside the thread loop:
public void ThreadDecodeQR()
{
while (Result == null && !stopBGThread)
{
//....
}
}