ashvardanian / ashvardanian/SwiftSemanticSearch

App crashes when I try to search after the index is loaded.

Open
#8 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
161
Forks
11
PR merge metrics
No merged PRs in 30d

Description

- The main cause of the previous issue: #4
The main cause was that the index file, `images.uform3-image-text-english-small.usearch`, was missing both in the project and target membership.
After manually adding the index file, the app can read the `imageIndex` from the bundle file.

- However, the app crashes if I try to search after the index is fully loaded.
I wonder that USearchIndex.load() might need a fix.
This also happens when I load the index file saved by a previous PR: #7

Xcode: 16.1
MacOS: Sonoma 14.7.1
Device: iPhone 16 Plus - iOS 18.0
Simulator: iPhone 16 - iOS 18. 1, iPhone SE 3rd Gen - iOS 17.5

Console Log:
```
Wants to filter images by B
libc++abi: terminating due to uncaught exception of type std::runtime_error: No available threads to lock
Type: studio
```

Stack images:
image
image

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading issues #4 and #7, then trace how USearchIndex.load() relates to the search triggered after the index finishes loading. Reproduce the crash on the reported Apple device or simulator and use the provided console log and stack images to investigate; done means searching after loading no longer crashes.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, swift
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.