cocoa - EXC_BAD_ACCESS in SQLite on Mac OS -


I am pulling data from a secret database and pushing it. I use the FMDabase cocoa wrapper.

I am dragging and pushing data from multiple threads, but I'm sure there is never a transaction at the same time.

I get EXC_BAD_ACCESS after a few hundred calls on the database but never at the same time. It is also not related to memory (I have tried NSGobies and seen memory management of parameters).

Here is the stack and code:

  FMResultSet * Result = [db executeQuery: @ "Select from latitude, longitude, where name = ?", Name]; [Result next]; NSString * latitude = [result stringfor column: @ "latitude"]; NSString * latitude = [result stringfor column: @ "longitude"];  

I do not know, does anyone have it? Seeing the relevant code in

FMDatabase , it seems that Result bind NSString 's -UTF8 string method to use the result of the sqlite_bind_text () routine result SQLITE_STATIC Code> autoresaled pointer).

This means SQLite assumes that the storage of text will remain valid until the text is tied, while -UTF8 string return is valid only Current autorelease reference If you are using the same FMResultSet on multiple threads or function calls, then changing that parameter to SQLITE_TRANSIENT will be more secure

< P> I thought that every sqlite3_bind_text () was suggested to make changes and it still crashes Watching on One wish that he should report back as it does, it's possible that you have the potential to improve the developer fine.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -