stephencelis / SQLite.swift

A type-safe, Swift-language layer over SQLite3.
MIT License
9.64k stars 1.56k forks source link

Crash in Prepare #977

Closed RameshBachiraju closed 3 years ago

RameshBachiraju commented 4 years ago

There is a crash observed in prepare, changed the code to use statement.failableNext and modified AnyIterator appropriately

Crash Log 0 libswiftCore.dylib 0x10c23a1a4 specialized assertionFailure(:_:file:line:flags:) + 42360 1 libswiftCore.dylib 0x10c28fc48 swift_unexpectedError + 280 2 SQLite 0x10b1f0b5c $S6SQLite10ConnectionC7prepareys11AnySequenceVyAA3RowVGAA9QueryType_pKFs0D8IteratorVyAHGycfUAHSgycfU + 204 3 SQLite 0x10b1fbcd0 $S6SQLite3RowVSgIego_ADIegr_TRTA + 24 4 libswiftCore.dylib 0x10c21e320 _ClosureBasedIterator.next() + 93472 5 libswiftCore.dylib 0x10c21e4ac _IteratorBox.next() + 93868 6 libswiftCore.dylib 0x10c0e0050 AnyIterator.next() + 237412 7 libswiftCore.dylib 0x10c21e4ac _IteratorBox.next() + 93868

0xced commented 4 years ago

I think this issue would be better fixed by #785.

nathanfallet commented 3 years ago

This was fixed by another pull request