Skip to content

Fix HashSet modification during enumeration in AimMode/ViewfinderMode filters#82

Open
thomasgalliker wants to merge 3 commits into
developfrom
claude/fix-barcode-detection-filters-53jJM
Open

Fix HashSet modification during enumeration in AimMode/ViewfinderMode filters#82
thomasgalliker wants to merge 3 commits into
developfrom
claude/fix-barcode-detection-filters-53jJM

Conversation

@thomasgalliker
Copy link
Copy Markdown
Owner

@thomasgalliker thomasgalliker commented Apr 22, 2026

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.

… 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
@thomasgalliker thomasgalliker linked an issue Apr 22, 2026 that may be closed by this pull request
thomasgalliker and others added 2 commits April 24, 2026 15:15
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Bounding-Box-Transformation on iOS is buggy

2 participants