アプリでこの種のエラーが発生することがあります。
(3551,0xb0103000) malloc: *** error for object 0xd27ce60: Non-aligned pointer being freed (2)
*** set a breakpoint in malloc_error_break to debug
(3551,0xb0353000) malloc: *** error for object 0x65676170: Non-aligned pointer being freed (2)
*** set a breakpoint in malloc_error_break to debug
(3551,0xb0103000) malloc: *** error for object 0xd27cd40: Non-aligned pointer being freed (2)
*** set a breakpoint in malloc_error_break to debug
(3551,0xb0353000) malloc: *** error for object 0x40640000: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
(3551,0xb0103000) malloc: *** error for object 0xd27cc20: Non-aligned pointer being freed (2)
これは、新しい情報を sqlite に挿入しようとすると発生します。
if ( sqlite3_exec(databaseHandle, [insertStatement UTF8String], NULL, NULL, &error) == SQLITE_OK)//exception
{
return YES;
}
else{
{
databaseHandle オブジェクトは静的で、アプリの起動時にデータベースを開きます。
sqlite3_open([databasePath UTF8String], &databaseHandle) == SQLITE_OK)
多分私は何かを逃していますか?
NSString *insertStatement = [NSString stringWithFormat:@"INSERT INTO INFORMATION (INFO) VALUES (\"%@\")",info];