Crash when accessing in multi-threaded environment

Open
#813 12 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
sqlite, swift

Research direction

Start at Connection.prepare and Connection.pluck, which lead to the reported sqlite3_prepare_v2 crash. Compare how connections are accessed across threads on iOS 9 and iOS 10 versus iOS 11 and later, and first establish a reproducible case. Done means the cause is identified and the issue has a verified resolution or a clearly documented limitation.

Written by the indexing model from the issue text.

Description

bug

Build Information

Application is written in Swift 4
Using SQLite.swift 0.11.4 via CocoaPods
Xcode 9.3.1

Crash Information

I'm experiencing a crash in sqlite3_prepare_v2 which gets called from Connection.prepare or Connection.pluck on devices running iOS 9 & iOS 10. The connections are accessed in a multi-threaded environment and works fine on iOS 11 and above.

Below is a screenshot of the exact place where the crash happens:

What might be the possible reason for this. TIA

screen shot 2018-06-04 at 18 32 32

Dominant language
Swift
Stars
10.2k
Forks
1.6k
Avg merge
6d 2h
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from stephencelis/SQLite.swift

All issues in stephencelis/SQLite.swift

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.