iOS Question ExecQuery error: out of memory - KVS


Licensed User

in my app i am using kvs to store my data. when the app starts i initialize the kvs object now i want to let the user the possibility to perform a restore, what means that i want to delete the create db file and download another db file from a cloud server. the problem is that i cannot delete the db file because the sql connection is active. so i try to close the sql connection but i get an error.

Class (b4i_httpjob) instance released.
The FMDatabase <FMDatabase: 0x600000eff3e0> is not open.
Error occurred on line: 129 (KeyValueStore)
ExecQuery error: out of memory
Stack Trace: (
CoreFoundation __exceptionPreprocess + 350
libobjc.A.dylib objc_exception_throw + 48
CoreFoundation +[NSException raise:format:] + 188
result -[B4ISQL ExecQuery2::] + 258
result -[B4ISQL ExecQuerySingleResult2::] + 62
result -[b4i_keyvaluestore _containskey::] + 884
result -[b4i_main _maintimer_tick] + 603
CoreFoundation __invoking___ + 140
CoreFoundation -[NSInvocation invoke] + 287
result +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1669
result -[B4IShell runMethod:] + 401
result -[B4IShell raiseEventImpl:method:args::] + 2361
result -[B4IShellBI raiseEvent:event:params:] + 1357
result __24-[B4ITimer startTicking]_block_invoke + 233
libdispatch.dylib _dispatch_client_callout + 8
libdispatch.dylib _dispatch_continuation_pop + 440
libdispatch.dylib _dispatch_source_invoke + 1997
libdispatch.dylib _dispatch_main_queue_callback_4CF + 857
CoreFoundation __CFRunLoopRun + 2329
CoreFoundation CFRunLoopRunSpecific + 438
GraphicsServices GSEventRunModal + 65
UIKitCore UIApplicationMain + 1621
result main + 112
libdyld.dylib start + 1

how can i delete the db file after i have initialize it?

thanks, ilan


Licensed User
you are right erel, i found out that it was a bug in my code. i am checking in a timer if the db contains a key and after deleting the db or closing the sql the app crashes. now i am disabling the timer before deleting the db.

thank you :)
Last edited:
Upvote 0