{"action":"created","issue":{"url":"https://api.github.com/repos/ccgus/fmdb/issues/262","labels_url":"https://api.github.com/repos/ccgus/fmdb/issues/262/labels{/name}","comments_url":"https://api.github.com/repos/ccgus/fmdb/issues/262/comments","events_url":"https://api.github.com/repos/ccgus/fmdb/issues/262/events","html_url":"https://github.com/ccgus/fmdb/issues/262","id":32913693,"number":262,"title":"Disk I/O error when device is locked","user":{"login":"Dave005","id":711799,"avatar_url":"https://avatars.githubusercontent.com/u/711799?v=3","gravatar_id":"","url":"https://api.github.com/users/Dave005","html_url":"https://github.com/Dave005","followers_url":"https://api.github.com/users/Dave005/followers","following_url":"https://api.github.com/users/Dave005/following{/other_user}","gists_url":"https://api.github.com/users/Dave005/gists{/gist_id}","starred_url":"https://api.github.com/users/Dave005/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dave005/subscriptions","organizations_url":"https://api.github.com/users/Dave005/orgs","repos_url":"https://api.github.com/users/Dave005/repos","events_url":"https://api.github.com/users/Dave005/events{/privacy}","received_events_url":"https://api.github.com/users/Dave005/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":20,"created_at":"2014-05-06T17:21:00Z","updated_at":"2015-11-13T08:58:11Z","closed_at":null,"body":"Hi,\r\n\r\ni get the following error if i write to the database when the device is locked:\r\nUnknown error calling sqlite3_step (10: disk I/O error)\r\n\r\ni works fine if the app is in running in the background without locking the device.\r\n\r\nI'v tried to set the file protection to none with the following code:\r\n\r\ncurrentDB = [FMDatabase databaseWithPath: pathToDatabase];\r\n[[NSFileManager defaultManager] setAttributes:[NSDictionary dictionaryWithObject:NSFileProtectionNone forKey:NSFileProtectionKey] ofItemAtPath: pathToDatabase error:&error];\r\n\r\nbut it will still raise the same error.\r\n\r\nIs there something i'm missing ?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ccgus/fmdb/issues/comments/156366167","html_url":"https://github.com/ccgus/fmdb/issues/262#issuecomment-156366167","issue_url":"https://api.github.com/repos/ccgus/fmdb/issues/262","id":156366167,"user":{"login":"lqdncel","id":7944129,"avatar_url":"https://avatars.githubusercontent.com/u/7944129?v=3","gravatar_id":"","url":"https://api.github.com/users/lqdncel","html_url":"https://github.com/lqdncel","followers_url":"https://api.github.com/users/lqdncel/followers","following_url":"https://api.github.com/users/lqdncel/following{/other_user}","gists_url":"https://api.github.com/users/lqdncel/gists{/gist_id}","starred_url":"https://api.github.com/users/lqdncel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lqdncel/subscriptions","organizations_url":"https://api.github.com/users/lqdncel/orgs","repos_url":"https://api.github.com/users/lqdncel/repos","events_url":"https://api.github.com/users/lqdncel/events{/privacy}","received_events_url":"https://api.github.com/users/lqdncel/received_events","type":"User","site_admin":false},"created_at":"2015-11-13T08:58:11Z","updated_at":"2015-11-13T08:58:11Z","body":"Hi,\r\n\r\nI got the following error if i write to the database when the device is locked,and my device system is iOS9.1\r\nerror message list:\r\nUnknown error calling sqlite3_step (10: disk I/O error)\r\nDB Query: begin exclusive transaction\r\nUnknown error finalizing or resetting statement (10: disk I/O error)\r\n\r\ni works fine if the app is in running in the background without locking the device.\r\n\r\nI'v tried to set the file protection to none with the following code:\r\n\r\n[[NSFileManager defaultManager] setAttributes:[NSDictionary dictionaryWithObject:NSFileProtectionNone forKey:NSFileProtectionKey] ofItemAtPath:document error:NULL];\r\n\t\r\n_dataQueue = [FMDatabaseQueue databaseQueueWithPath:dbPath    flags:SQLITE_OPEN_READWRITE |\r\n\t\t\t\t  SQLITE_OPEN_CREATE |\r\n\t\t\t\t  SQLITE_OPEN_FILEPROTECTION_NONE];\r\n\r\nbut it will still raise the same error.And I remember before iOS9.1 system, there have not been Appear this error.\r\n\r\nIs there something i'm missing ?"}}