Fix HashSet modification during enumeration in AimMode/ViewfinderMode filters#82
Open
thomasgalliker wants to merge 3 commits into
Open
Fix HashSet modification during enumeration in AimMode/ViewfinderMode filters#82thomasgalliker wants to merge 3 commits into
thomasgalliker wants to merge 3 commits into
Conversation
… filters Replace foreach+Remove with RemoveWhere in both iOS and Android CameraManager to prevent InvalidOperationException being silently swallowed when AimMode or ViewfinderMode filters are active, which caused DetectionFinished to never fire for affected frames. Also extend iOS BarcodeFormatMapper ITF mapping to include I2OF5 and I2OF5Checksum symbologies alongside Itf14, aligning iOS behaviour with Android where BarcodeFormats.ITF covers all variable-length Interleaved 2-of-5 barcodes. https://claude.ai/code/session_01GxtjJWjivAt62aZ7sQpi6E
Revert iOS BarcodeFormats.ITF to map only to VNBarcodeSymbology.Itf14 (strict 14-digit). Adding I2OF5 symbologies there was wrong: results detected via I2OF5 come back tagged as BarcodeFormats.I2OF5 (not ITF) due to ToBarcodeFormats, and it would produce duplicate symbologies when both ITF and I2OF5 flags are set. Instead, fix the actual gap: BarcodeFormats.I2OF5 had no mapping at all on Android, causing it to silently fall back to scanning all formats. Map it to Barcode.FormatItf, matching ML Kit's format which covers all variable-length Interleaved 2-of-5 barcodes (ITF-14 is a fixed-14-digit subset of I2OF5; ML Kit does not distinguish them). https://claude.ai/code/session_01GxtjJWjivAt62aZ7sQpi6E
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace foreach+Remove with RemoveWhere in both iOS and Android CameraManager
to prevent InvalidOperationException being silently swallowed when AimMode or
ViewfinderMode filters are active, which caused DetectionFinished to never fire
for affected frames.
Also extend iOS BarcodeFormatMapper ITF mapping to include I2OF5 and
I2OF5Checksum symbologies alongside Itf14, aligning iOS behaviour with Android
where BarcodeFormats.ITF covers all variable-length Interleaved 2-of-5 barcodes.