objectbox / objectbox-swift

Swift database - fast, simple and lightweight (iOS, macOS)
https://swift.objectbox.io
Apache License 2.0
465 stars 30 forks source link

After update from 0.8.0 to 0.9 Storage error code 78 #16

Closed jrjohn closed 5 years ago

jrjohn commented 5 years ago

After upgrade from 0.8.0 to 0.9 and run simulator ios well but in real iphone.

2019-08-12 15:30:27 /Users/jrjohn/Documents/projects/tester/mvvm/mvvm/dao/impl/ObjectBoxDatabase.swift:19 Info: ObjectBoxDatabase init.../var/mobile/Containers/Data/Application/76315A46-D295-4BF4-B95B-EA5A239CAC0A/Documents 001-07:33:37.8837 [ERROR] Storage error code 78

extension ObjectBox.Store { /// A store with a fully configured model. Created by the code generator with your model's metadata in place. /// /// - Parameters: /// - directoryPath: Directory path to store database files in. /// - maxDbSizeInKByte: Limit of on-disk space for the database files. Default is 1024 * 1024 (1 GiB). /// - fileMode: UNIX-style bit mask used for the database files; default is 0o755. /// - maxReaders: Maximum amount of concurrent readers, tailored to your use case. Default is 0 (unlimited). internal convenience init(directoryPath: String, maxDbSizeInKByte: UInt64 = 1024 * 1024, fileMode: UInt32 = 0o755, maxReaders: UInt32 = 0) throws { try self.init( <=== Thread 1: signal SIGSYS . hang model: try cModel(), directory: directoryPath, maxDbSizeInKByte: maxDbSizeInKByte, fileMode: fileMode, maxReaders: maxReaders) } }

uli-objectbox commented 5 years ago

I'll look into it. Usually error 78 happened when there was a sandboxing issue (either during file creation of the actual database files, or of the mutexes used by the database). What version of iOS are you running?

jrjohn commented 5 years ago

version 11.4 (iPhone SE) and version 12.1.4(iPhone 6s) will show error 78

uli-objectbox commented 5 years ago

Thank you, I'll investigate and try to fast-track a fix.

uli-objectbox commented 5 years ago

OK, I just released 0.9.1 which should fix this issue. Apologies for the oversight.

greenrobot commented 5 years ago

@jrjohn Can you confirm that the fix worked for you?

jrjohn commented 5 years ago

@greenrobot @uli-objectbox It's work. Thanks very much.