Skip to content

[macOS Desktop] Crash in RewindOCRService on macOS 26 — empty array access in TextRecognition framework #6944

Closed as not planned

Description

@keishingu

Bug Report

Summary

The desktop app crashes consistently within ~25 seconds of launch on macOS 26.
The crash occurs in RewindOCRService.extractTextWithBounds(from:) when the
Vision/TextRecognition framework attempts to access an element of an empty Swift array.
Reproducible across multiple versions (confirmed on 0.11.338 and 0.11.352).

Environment

  • App version: 0.11.352 (also confirmed on 0.11.338)
  • macOS: 26.3.1 (25D771280a)
  • Hardware: Mac16,1 (MacBook Pro M4)
  • Architecture: ARM-64 (Native)

Crash Details

  • Exception: EXC_BREAKPOINT (SIGTRAP)
  • Faulting thread: com.apple.root.utility-qos.cooperative

Crash stack (faulting thread):
```
libswiftCore.dylib assertionFailure(::file:line🎏)
libswiftCore.dylib closure #1 in __SwiftNativeNSArrayWithContiguousStorage.objectAt(:)
libswiftCore.dylib __EmptyArrayStorage.withVerbatimBridgedUnsafeBuffer(:)
libswiftCore.dylib @objc __SwiftNativeNSArrayWithContiguousStorage.objectAtSubscript(
:)
TextRecognition (internal frames)
Vision -[VNRecognizeTextRequest internalPerformRevision:inContext:error:]
Omi Computer closure #2 in RewindOCRService.extractTextWithBounds(from:)
Omi Computer RewindOCRService.extractTextWithBounds(from:)
Omi Computer closure #1 in RewindIndexer.processFrame(cgImage:appName:windowTitle:captureTime:)
```

Root Cause (hypothesis)

`TextRecognition.framework` internally calls back into Swift and attempts to index
into an array that is empty (`__EmptyArrayStorage`). This suggests that when the
OCR engine processes certain screen captures, it returns a result that Omi's
`RewindOCRService` passes back without guarding against the empty-array case.

This may be a regression in Apple's `TextRecognition`/`Vision` framework on macOS 26,
or a missing nil/empty guard in `RewindOCRService.extractTextWithBounds(from:)`.

Steps to Reproduce

  1. Install Omi on macOS 26.3.1
  2. Launch the app
  3. App crashes within ~25 seconds (during Rewind screen capture + OCR indexing)

Possible Fix

Add an empty-array guard before passing OCR results back from
`VNImageRequestHandler` in `RewindOCRService.extractTextWithBounds(from:)`.

Additional Notes

  • Crash is 100% reproducible on launch
  • Both 0.11.338 and 0.11.352 have identical crash stacks and identical
    `TextRecognition.framework` UUID (`fae6ebc8-68e2-304e-b7e5-6255a3fdae3f`),
    confirming this is not fixed in the latest release
  • `External Modification Summary` is all zeros — no third-party interference

Activity

  1. added
    p0
    bug
    needs-info
    and removed
    p0
    on Apr 27, 2026
  2. added
    p0
    on May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdesktopneeds-infop0

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions