Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash on [FMStatement reset] (FMDatabase.m:1470) #521

Open
Yuzeyang opened this issue Aug 18, 2016 · 15 comments
Open

crash on [FMStatement reset] (FMDatabase.m:1470) #521

Yuzeyang opened this issue Aug 18, 2016 · 15 comments

Comments

@Yuzeyang
Copy link

Yuzeyang commented Aug 18, 2016

sometimes i insert message to database, it will crash on FMStatement reset

this is crash log

0  libsystem_kernel.dylib         0x18379411c __pthread_kill + 8
1  libsystem_pthread.dylib        0x183860ef8 pthread_kill + 112
2  libsystem_c.dylib              0x183705dc8 abort + 140
3  libsystem_malloc.dylib         0x1837c8d24 free_list_checksum_botch + 438
4  libsystem_malloc.dylib         0x1837c8f28 free_small_botch + 84
5  libsqlite3.dylib               0x1841254bc (null) + 7112
6  libsqlite3.dylib               0x184124c10 (null) + 4892
7  libsqlite3.dylib               0x1840e143c (null) + 876
8  libsqlite3.dylib               0x1840e1248 (null) + 376
9  libsqlite3.dylib               0x18411ff64 sqlite3_reset + 64
10 xxx                     0x1003e778c -[FMStatement reset] (FMDatabase.m:1470)
11 xxx                     0x1003ea424 -[FMResultSet close] (FMResultSet.m:55)
12 xxx                     0x1003e3eb4 -[FMDatabase closeOpenResultSets] (FMDatabase.m:309)
13 xxx                     0x1003e3b1c -[FMDatabase close] (FMDatabase.m:218)
14 xxx                     0x1003e17dc __37-[FIMUserCRUD insertItem:inDatabase:]_block_invoke (FIMUserCRUD.m:77)
15 xxx                     0x1003e9bf4 __30-[FMDatabaseQueue inDatabase:]_block_invoke (FMDatabaseQueue.m:162)
16 libdispatch.dylib              0x18364547c _dispatch_client_callout + 16
17 libdispatch.dylib              0x183650480 _dispatch_barrier_sync_f_slow + 824
18 xxx                     0x1003e9b64 -[FMDatabaseQueue inDatabase:] (FMDatabaseQueue.m:176)
19 xxx                     0x1003e1344 -[FIMUserCRUD insertItem:inDatabase:] (FIMUserCRUD.m:78)
20 xxx                     0x1003cfe44 -[FIMCacheManager insertMessage:] (FIMCacheManager.m:63)

this is insert code

- (void)insertMessage:(FIMMessageModel *)message {
    FIMCacheMessage *cacheMessage = [[FIMCacheMessage alloc] initWithFIMMessageModel:message];
    [[FIMMessageCRUD shareInstance] insertItem:cacheMessage inDatabase:self.databaseQueue];
    [[FIMUserCRUD shareInstance] insertItem:cacheMessage inDatabase:self.databaseQueue];
}

this is insert message code

- (void)insertItem:(FIMCacheMessage *)model inDatabase:(FMDatabaseQueue *)databaseQueue {
    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
        [databaseQueue inDatabase:^(FMDatabase *database) {
            if (![database open]) {
                return;
            }
            NSString *sqlString =
            [NSString stringWithFormat:@"INSERT INTO %@ ("
                                       @"msg_id, msg_create_time, msg_operate_time, "
                                       @"msg_is_self, msg_status_code, kdt_id, "
                                       @"req_id, user_id, msg_type, "
                                       @"msg_content, conversation_id, msg_resource_path, "
                                       @"automate, isEvent"
                                       @") VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)",
                                       MESSAGE_TABLE_NAME];

            [database executeUpdate:sqlString, @(model.messageID), @(model.createTime),
                                    @(model.opearteTime), @(model.isSelf), @(model.statusCode),
                                    model.kdtID ?: [NSNull null], model.requestID ?: [NSNull null],
                                    model.userID ?: [NSNull null], model.messageType ?: [NSNull null],
                                    model.content ?: [NSNull null], model.conversationID ?: [NSNull null],
                                    model.resourcePath ?: [NSNull null], @(model.automate), @(model.isEvent)];

            NSLog(@"MessageCRUD insertItem %@ errorMsg: %@", model, [database lastErrorMessage]);

            [database close];
        }];
    });
}

this is insert user info code

- (void)insertItem:(FIMCacheMessage *)model inDatabase:(FMDatabaseQueue *)databaseQueue {
    [databaseQueue inDatabase:^(FMDatabase *database) {
        if (![database open]) {
            return;
        }

        NSString *querySQLString = [NSString
        stringWithFormat:@"SELECT * FROM %@ WHERE user_id = '%@'", USER_TABLE_NAME, model.userID];

        FMResultSet *resultSet = [database executeQuery:querySQLString];
        if ([resultSet next]) {
            NSString *avatar = [resultSet stringForColumn:@"user_avatar"];
            NSString *nickname = [resultSet stringForColumn:@"user_nickname"];
            if (![avatar isEqualToString:model.userModel.userAvatar] ||
                ![nickname isEqualToString:model.userModel.userNickname]) {
                [self updateItem:model.userModel inDatabase:databaseQueue];
            }
        } else {
            NSString *sqlString = [NSString stringWithFormat:@"INSERT INTO %@ ("
                                                             @"user_id, user_nickname, user_avatar"
                                                             @") VALUES (?,?,?)",
                                                             USER_TABLE_NAME];

            [database executeUpdate:sqlString, model.userModel.userID ?: [NSNull null],
                                    model.userModel.userNickname ?: [NSNull null],
                                    model.userModel.userAvatar ?: [NSNull null]];

            NSLog(@"UserCRUD insertItem %@ errorMsg: %@", model, [database lastErrorMessage]);
        }

        [database close];
    }];
}

what cause it?

@Yuzeyang
Copy link
Author

i think i should not close every handle,maybe the first handle doesn't complete,the second handle close the dababase

@robertmryan
Copy link
Collaborator

Are these two singletons referencing different databases or the same database?

@ccgus
Copy link
Owner

ccgus commented Aug 18, 2016

Don't FMDatabaseQueue will open the database, so you don't need to do that either.

Also, doing updates in the middle of a result set might cause problems. Though, if it's async as well, maybe not.

@robertmryan
Copy link
Collaborator

You should not call [database close] inside an inDatabase block.

@Yuzeyang
Copy link
Author

referencing same database,but two tables @robertmryan

@Yuzeyang
Copy link
Author

Also, doing updates in the middle of a result set might cause problems. Though, if it's async as well, maybe not.

you mean if i updates two different tables' data, it may cause problems too?
@ccgus

@ccgus
Copy link
Owner

ccgus commented Aug 19, 2016

No, I mean you're doing updates in the middle of a result set. Pull out data from the db, while updating it at the same time.

@Yuzeyang
Copy link
Author

ok,i know~thank u very much,and i remove[database close]inside an inDatabase block.when the app enter the background,i call the [database close]

@robertmryan
Copy link
Collaborator

No, you never should call [database close] from within inDatabase or inTransaction block. If you want, release your strong references to the FMDatabaseQueue (which will release the FMDatabaseQueue, which in turn, will release its FMDatabase object and will close the database), but don't explicitly close the database when using FMDatabaseQueue. Let it manage its own FMDatabase object.

@Yuzeyang
Copy link
Author

ok,thanks for your suggestion!:-D

@Yuzeyang
Copy link
Author

Yuzeyang commented Aug 25, 2016

i see the other issues about crash in [FMDatabase executeUpdate:error:withArgumentsInArray:orDictionary:orVAList:] line:960 sqlite3_prepare_v2 exc_bad_access,and you suggest them to handle multithread in database: or in inTransaction,and i do it

this is my insert list code

- (void)insertList:(NSArray<FIMCacheMessage *> *)modelList
        inDatabase:(FMDatabaseQueue *)databaseQueue {
    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
        [databaseQueue inTransaction:^(FMDatabase *database, BOOL *rollback) {
            for (FIMCacheMessage *model in modelList) {
                NSString *sqlString =
                [NSString stringWithFormat:@"INSERT INTO %@ ("
                                           @"msg_id, msg_create_time, msg_operate_time, "
                                           @"msg_is_self, msg_status_code, kdt_id, "
                                           @"req_id, user_id, msg_type, "
                                           @"msg_content, conversation_id, msg_resource_path, "
                                           @"automate, isEvent"
                                           @") VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)",
                                           MESSAGE_TABLE_NAME];

                BOOL isSucceed = [database
                executeUpdate:sqlString, @(model.messageID), @(model.createTime),
                              @(model.opearteTime), @(model.isSelf), @(model.statusCode),
                              model.kdtID ?: [NSNull null], model.requestID ?: [NSNull null],
                              model.userID ?: [NSNull null], model.messageType ?: [NSNull null],
                              model.content ?: [NSNull null], model.conversationID ?: [NSNull null],
                              model.resourcePath ?: [NSNull null], @(model.automate), @(model.isEvent)];

                NSLog(@"MessageCRUD insertList %@ %@ errorMsg: %@", modelList,
                      isSucceed ? @"成功" : @"失败", [database lastErrorMessage]);

                if (!isSucceed) {
                    *rollback = YES;
                    return;
                }
            }
        }];
    });
}

the databaseQueue is a singleton's databasequeue,and i create it once,
but according to the fabric's statistics ,there are still some crashes
i cannot understand i put the insert handle in a async queue,and in Transaction still lead to crash Small probability

this is the crash log

0  libsqlite3.dylib               0x183069fbc (null) + 9096
1  libsqlite3.dylib               0x1830b3678 (null) + 86248
2  libsqlite3.dylib               0x1830b3678 (null) + 86248
3  libsqlite3.dylib               0x183026270 (null) + 16012
4  libsqlite3.dylib               0x18302459c (null) + 8632
5  libsqlite3.dylib               0x18302369c (null) + 4792
6  libsqlite3.dylib               0x183022f0c (null) + 2856
7  libsqlite3.dylib               0x183022bc4 (null) + 2016
8  xxx                     0x100468100 -[FMDatabase executeUpdate:error:withArgumentsInArray:orDictionary:orVAList:] (FMDatabase.m:960)
9  xxx                     0x100468a54 -[FMDatabase executeUpdate:] (FMDatabase.m:1158)
10 xxx                     0x10045ce04 __40-[FIMMessageCRUD insertList:inDatabase:]_block_invoke_2 (FIMMessageCRUD.m:106)
11 xxx                     0x10046bf20 __46-[FMDatabaseQueue beginTransaction:withBlock:]_block_invoke (FMDatabaseQueue.m:192)
12 libdispatch.dylib              0x18259d47c _dispatch_client_callout + 16
13 libdispatch.dylib              0x1825a8728 _dispatch_barrier_sync_f_invoke + 100
14 xxx                     0x10046be60 -[FMDatabaseQueue beginTransaction:withBlock:] (FMDatabaseQueue.m:203)
15 xxx                     0x10045c80c __40-[FIMMessageCRUD insertList:inDatabase:]_block_invoke (FIMMessageCRUD.m:125)
16 libdispatch.dylib              0x18259d4bc _dispatch_call_block_and_release + 24
17 libdispatch.dylib              0x18259d47c _dispatch_client_callout + 16
18 libdispatch.dylib              0x1825ab914 _dispatch_root_queue_drain + 2140
19 libdispatch.dylib              0x1825ab0b0 _dispatch_worker_thread3 + 112
20 libsystem_pthread.dylib        0x1827b5470 _pthread_wqthread + 1092
21 libsystem_pthread.dylib        0x1827b5020 start_wqthread + 4

and sometimes may crash in sqlite3_step

#13. Crashed: fmdb.<FMDatabaseQueue: 0x170453410>
0  libsqlite3.dylib               0x195033348 (null) + 8392
1  libsqlite3.dylib               0x195033238 (null) + 8120
2  libsqlite3.dylib               0x19504d8ac (null) + 7364
3  libsqlite3.dylib               0x19504bdf8 sqlite3_step + 528
4  Koudaitong                     0x1004e4674 -[FMDatabase executeUpdate:error:withArgumentsInArray:orDictionary:orVAList:] (FMDatabase.m:1073)
5  Koudaitong                     0x1004e4a54 -[FMDatabase executeUpdate:] (FMDatabase.m:1158)
6  Koudaitong                     0x1004e5084 -[FMDatabase beginTransaction] (FMDatabase.m:1290)
7  Koudaitong                     0x1004e7eec __46-[FMDatabaseQueue beginTransaction:withBlock:]_block_invoke (FMDatabaseQueue.m:189)
8  libdispatch.dylib              0x195339954 _dispatch_client_callout + 16
9  libdispatch.dylib              0x1953431e4 _dispatch_barrier_sync_f_invoke + 76
10 Koudaitong                     0x1004e7e60 -[FMDatabaseQueue beginTransaction:withBlock:] (FMDatabaseQueue.m:203)
11 Koudaitong                     0x1004d880c __40-[FIMMessageCRUD insertList:inDatabase:]_block_invoke (FIMMessageCRUD.m:125)
12 libdispatch.dylib              0x195339994 _dispatch_call_block_and_release + 24
13 libdispatch.dylib              0x195339954 _dispatch_client_callout + 16
14 libdispatch.dylib              0x195346780 _dispatch_root_queue_drain + 1848
15 libdispatch.dylib              0x195347c4c _dispatch_worker_thread3 + 108
16 libsystem_pthread.dylib        0x19551921c _pthread_wqthread + 816
17 libsystem_pthread.dylib        0x195518ee0 start_wqthread + 4

@ccgus
Copy link
Owner

ccgus commented Aug 25, 2016

Can you show all the thread back traces?

@Yuzeyang
Copy link
Author

Yuzeyang commented Aug 26, 2016

this crash log is crash in sqlite3_prepare_v2

#10. Crashed: fmdb.<FMDatabaseQueue: 0x160add3e0>
0  libsqlite3.dylib               0x183069fbc (null) + 9096
1  libsqlite3.dylib               0x1830b3678 (null) + 86248
2  libsqlite3.dylib               0x1830b3678 (null) + 86248
3  libsqlite3.dylib               0x183026270 (null) + 16012
4  libsqlite3.dylib               0x18302459c (null) + 8632
5  libsqlite3.dylib               0x18302369c (null) + 4792
6  libsqlite3.dylib               0x183022f0c (null) + 2856
7  libsqlite3.dylib               0x183022bc4 (null) + 2016
8  Koudaitong                     0x100468100 -[FMDatabase executeUpdate:error:withArgumentsInArray:orDictionary:orVAList:] (FMDatabase.m:960)
9  Koudaitong                     0x100468a54 -[FMDatabase executeUpdate:] (FMDatabase.m:1158)
10 Koudaitong                     0x10045ce04 __40-[FIMMessageCRUD insertList:inDatabase:]_block_invoke_2 (FIMMessageCRUD.m:106)
11 Koudaitong                     0x10046bf20 __46-[FMDatabaseQueue beginTransaction:withBlock:]_block_invoke (FMDatabaseQueue.m:192)
12 libdispatch.dylib              0x18259d47c _dispatch_client_callout + 16
13 libdispatch.dylib              0x1825a8728 _dispatch_barrier_sync_f_invoke + 100
14 Koudaitong                     0x10046be60 -[FMDatabaseQueue beginTransaction:withBlock:] (FMDatabaseQueue.m:203)
15 Koudaitong                     0x10045c80c __40-[FIMMessageCRUD insertList:inDatabase:]_block_invoke (FIMMessageCRUD.m:125)
16 libdispatch.dylib              0x18259d4bc _dispatch_call_block_and_release + 24
17 libdispatch.dylib              0x18259d47c _dispatch_client_callout + 16
18 libdispatch.dylib              0x1825ab914 _dispatch_root_queue_drain + 2140
19 libdispatch.dylib              0x1825ab0b0 _dispatch_worker_thread3 + 112
20 libsystem_pthread.dylib        0x1827b5470 _pthread_wqthread + 1092
21 libsystem_pthread.dylib        0x1827b5020 start_wqthread + 4

--

#0. com.apple.main-thread
0  libFontParser.dylib            0x185073470 TDataReference::TDataReference(TDataReference const&, int) + 68
1  libFontParser.dylib            0x1850461c0 TsfntTable::TsfntTable(TSFNTFont const&, unsigned int) + 92
2  libFontParser.dylib            0x185046de8 ThmtxTable::ThmtxTable(TSFNTFont const&) + 36
3  libFontParser.dylib            0x185061d8c TType1FontType2CIDCharStringHandler::GetAdvance(unsigned short, bool) const + 124
4  libFontParser.dylib            0x18508c4c0 FPFontGetGlyphIdealAdvanceAndSideBearing + 320
5  CoreGraphics                   0x183e00124 xt_font_get_glyph_advances + 376
6  CoreGraphics                   0x183de6628 CGFontGetGlyphAdvances + 212
7  CoreText                       0x1852615c0 bool GetGlyphAdvances<unsigned short, 128ul>(CGFont*, unsigned short const*, unsigned long, unsigned short*) + 224
8  CoreText                       0x1851b2628 TBaseFont::GetUnscaledAdvances(unsigned short const*, CGSize*, long) const + 492
9  CoreText                       0x1851c5a1c TBMPDataCachePage::TBMPDataCachePage(TBaseFont const&, unsigned short) + 156
10 CoreText                       0x1851c2438 TBMPDataCache::PageForCharacter(unsigned short) const + 108
11 CoreText                       0x1851c2370 TBMPDataCache::GetDataForCharacter(unsigned short) const + 24
12 CoreText                       0x1851c1fb4 TUnicodeEncoder::Encode(__CTFont const*, TCharStreamIterator&, CFRange, bool, unsigned short*, CGSize*, unsigned int*, double&) + 604
13 CoreText                       0x1851f79fc TGlyphEncoder::RunUnicodeEncoderRecursively(unsigned int, TCFRef<CTRun*>&&, __CTFont const*, CFRange, TGlyphList<TDeletedGlyphIndex>&, TGlyphList<TDeletedGlyphIndex>&, TFontCascade const*, TGlyphEncoder::ClusterMatching, bool) + 1404
14 CoreText                       0x1851f8134 TGlyphEncoder::AppendUnmappedCharRun(unsigned int, TCFRef<CTRun*>&, __CTFont const*, CFRange, CFRange, TGlyphList<TDeletedGlyphIndex>&, TGlyphList<TDeletedGlyphIndex>&, TFontCascade const&, TGlyphEncoder::ClusterMatching) + 1420
15 CoreText                       0x1851f78d8 TGlyphEncoder::RunUnicodeEncoderRecursively(unsigned int, TCFRef<CTRun*>&&, __CTFont const*, CFRange, TGlyphList<TDeletedGlyphIndex>&, TGlyphList<TDeletedGlyphIndex>&, TFontCascade const*, TGlyphEncoder::ClusterMatching, bool) + 1112
16 CoreText                       0x1851c1b3c TGlyphEncoder::RunUnicodeEncoder(TCFRef<CTRun*>&&, __CTFont const*, CFRange, TGlyphList<TDeletedGlyphIndex>&, TFontCascade const*) + 132
17 CoreText                       0x1851bf3a4 TGlyphEncoder::EncodeChars(CFRange, TAttributes const&, TGlyphList<TDeletedGlyphIndex>&, TGlyphEncoder::Fallbacks) + 1248
18 CoreText                       0x1851bea9c TTypesetterAttrString::Initialize(__CFAttributedString const*) + 248
19 CoreText                       0x1851be8bc TTypesetterAttrString::TTypesetterAttrString(__CFAttributedString const*) + 128
20 CoreText                       0x185200dd0 CTFramesetterCreateWithAttributedString + 80
21 Koudaitong                     0x10008cb10 -[CTView getContentHeight] (CTView.m:122)
22 Koudaitong                     0x10008c84c -[CTView setOriginString:] (CTView.m:104)
23 Koudaitong                     0x10008ca98 -[CTView setNomalColor:andUrlColor:andTouchColor:andOriginString:] (CTView.m:115)
24 Koudaitong                     0x1002120d0 +[KDBubbleCellModel instanceFromTextTypeMessage:] (KDBubbleCellModel.m:399)
25 Koudaitong                     0x10020f608 +[KDBubbleCellModel instanceFromMessage:] (KDBubbleCellModel.m:60)
26 Koudaitong                     0x1002126ac +[KDBubbleCellModel getBubbleArrayFromDialogList:putItemsArray:putImageArray:] (KDBubbleCellModel.m:452)
27 Koudaitong                     0x1000dd4d0 __35-[KDChatViewController loadMessgae]_block_invoke_2 (KDChatViewController.m:465)
28 libdispatch.dylib              0x18259d4bc _dispatch_call_block_and_release + 24
29 libdispatch.dylib              0x18259d47c _dispatch_client_callout + 16
30 libdispatch.dylib              0x1825a2b84 _dispatch_main_queue_callback_4CF + 1844
31 CoreFoundation                 0x182b08d50 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
32 CoreFoundation                 0x182b06bb8 __CFRunLoopRun + 1628
33 CoreFoundation                 0x182a30c50 CFRunLoopRunSpecific + 384
34 GraphicsServices               0x184318088 GSEventRunModal + 180
35 UIKit                          0x187d1a088 UIApplicationMain + 204
36 Koudaitong                     0x10007dde4 main (main.m:16)
37 libdispatch.dylib              0x1825ce8b8 (Missing)

#1. Thread
0  libsystem_kernel.dylib         0x1826ecb48 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1827b5530 _pthread_wqthread + 1284
2  libsystem_pthread.dylib        0x1827b5020 start_wqthread + 4

#2. com.apple.libdispatch-manager
0  libsystem_kernel.dylib         0x1826ed4d8 kevent_qos + 8
1  libdispatch.dylib              0x1825b07d8 _dispatch_mgr_invoke + 232
2  libdispatch.dylib              0x18259f648 _dispatch_source_invoke + 50

#3. Thread
0  libsystem_kernel.dylib         0x1826ecb48 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1827b5530 _pthread_wqthread + 1284
2  libsystem_pthread.dylib        0x1827b5020 start_wqthread + 4

#4. com.apple.NSURLConnectionLoader
0  libsystem_kernel.dylib         0x1826d0fd8 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x1826d0e54 mach_msg + 72
2  CoreFoundation                 0x182b08c60 __CFRunLoopServiceMachPort + 196
3  CoreFoundation                 0x182b06964 __CFRunLoopRun + 1032
4  CoreFoundation                 0x182a30c50 CFRunLoopRunSpecific + 384
5  CFNetwork                      0x1831b1c68 +[NSURLConnection(Loader) _resourceLoadLoop:] + 412
6  Foundation                     0x183527e4c __NSThread__start__ + 1000
7  libsystem_pthread.dylib        0x1827b7b28 _pthread_body + 156
8  libsystem_pthread.dylib        0x1827b7a8c _pthread_body + 154
9  libsystem_pthread.dylib        0x1827b5028 thread_start + 4

#5. com.apple.CFSocket.private
0  libsystem_kernel.dylib         0x1826ec344 __select + 8
1  CoreFoundation                 0x182b0f1c8 __CFSocketManager + 648
2  libsystem_pthread.dylib        0x1827b7b28 _pthread_body + 156
3  libsystem_pthread.dylib        0x1827b7a8c _pthread_body + 154
4  libsystem_pthread.dylib        0x1827b5028 thread_start + 4

#6. WebThread
0  libsystem_kernel.dylib         0x1826d0fd8 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x1826d0e54 mach_msg + 72
2  CoreFoundation                 0x182b08c60 __CFRunLoopServiceMachPort + 196
3  CoreFoundation                 0x182b06964 __CFRunLoopRun + 1032
4  CoreFoundation                 0x182a30c50 CFRunLoopRunSpecific + 384
5  WebCore                        0x186a1e61c RunWebThread(void*) + 456
6  libsystem_pthread.dylib        0x1827b7b28 _pthread_body + 156
7  libsystem_pthread.dylib        0x1827b7a8c _pthread_body + 154
8  libsystem_pthread.dylib        0x1827b5028 thread_start + 4

#7. JavaScriptCore::Marking
0  libsystem_kernel.dylib         0x1826ebf24 __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x1827b6ce8 _pthread_cond_wait + 648
2  libc++.1.dylib                 0x18214342c std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 56
3  JavaScriptCore                 0x1865052cc JSC::GCThread::waitForNextPhase() + 144
4  JavaScriptCore                 0x186505364 JSC::GCThread::gcThreadMain() + 84
5  JavaScriptCore                 0x1861daf14 WTF::threadEntryPoint(void*) + 212
6  JavaScriptCore                 0x1861dae24 WTF::wtfThreadEntryPoint(void*) + 24
7  libsystem_pthread.dylib        0x1827b7b28 _pthread_body + 156
8  libsystem_pthread.dylib        0x1827b7a8c _pthread_body + 154
9  libsystem_pthread.dylib        0x1827b5028 thread_start + 4

#8. com.twitter.crashlytics.ios.MachExceptionServer
0  Koudaitong                     0x1005fd844 CLSProcessRecordAllThreads + 4301805636
1  Koudaitong                     0x1005fd844 CLSProcessRecordAllThreads + 4301805636
2  Koudaitong                     0x1005fd700 CLSProcessRecordAllThreads + 4301805312
3  Koudaitong                     0x1005edec0 CLSHandler + 4301741760
4  Koudaitong                     0x1005e8e64 CLSMachExceptionServer + 4301721188
5  libsystem_pthread.dylib        0x1827b7b28 _pthread_body + 156
6  libsystem_pthread.dylib        0x1827b7a8c _pthread_body + 154
7  libsystem_pthread.dylib        0x1827b5028 thread_start + 4

#9. Thread
0  libsystem_kernel.dylib         0x1826ecb48 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1827b5530 _pthread_wqthread + 1284
2  libsystem_pthread.dylib        0x1827b5020 start_wqthread + 4

#10. Crashed: fmdb.<FMDatabaseQueue: 0x160add3e0>
0  libsqlite3.dylib               0x183069fbc (null) + 9096
1  libsqlite3.dylib               0x1830b3678 (null) + 86248
2  libsqlite3.dylib               0x1830b3678 (null) + 86248
3  libsqlite3.dylib               0x183026270 (null) + 16012
4  libsqlite3.dylib               0x18302459c (null) + 8632
5  libsqlite3.dylib               0x18302369c (null) + 4792
6  libsqlite3.dylib               0x183022f0c (null) + 2856
7  libsqlite3.dylib               0x183022bc4 (null) + 2016
8  Koudaitong                     0x100468100 -[FMDatabase executeUpdate:error:withArgumentsInArray:orDictionary:orVAList:] (FMDatabase.m:960)
9  Koudaitong                     0x100468a54 -[FMDatabase executeUpdate:] (FMDatabase.m:1158)
10 Koudaitong                     0x10045ce04 __40-[FIMMessageCRUD insertList:inDatabase:]_block_invoke_2 (FIMMessageCRUD.m:106)
11 Koudaitong                     0x10046bf20 __46-[FMDatabaseQueue beginTransaction:withBlock:]_block_invoke (FMDatabaseQueue.m:192)
12 libdispatch.dylib              0x18259d47c _dispatch_client_callout + 16
13 libdispatch.dylib              0x1825a8728 _dispatch_barrier_sync_f_invoke + 100
14 Koudaitong                     0x10046be60 -[FMDatabaseQueue beginTransaction:withBlock:] (FMDatabaseQueue.m:203)
15 Koudaitong                     0x10045c80c __40-[FIMMessageCRUD insertList:inDatabase:]_block_invoke (FIMMessageCRUD.m:125)
16 libdispatch.dylib              0x18259d4bc _dispatch_call_block_and_release + 24
17 libdispatch.dylib              0x18259d47c _dispatch_client_callout + 16
18 libdispatch.dylib              0x1825ab914 _dispatch_root_queue_drain + 2140
19 libdispatch.dylib              0x1825ab0b0 _dispatch_worker_thread3 + 112
20 libsystem_pthread.dylib        0x1827b5470 _pthread_wqthread + 1092
21 libsystem_pthread.dylib        0x1827b5020 start_wqthread + 4

#11. Thread
0  libsystem_kernel.dylib         0x1826ecb48 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1827b5530 _pthread_wqthread + 1284
2  libsystem_pthread.dylib        0x1827b5020 start_wqthread + 4

#12. GCDAsyncSocket-CFStream
0  libsystem_kernel.dylib         0x1826d0fd8 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x1826d0e54 mach_msg + 72
2  CoreFoundation                 0x182b08c60 __CFRunLoopServiceMachPort + 196
3  CoreFoundation                 0x182b06964 __CFRunLoopRun + 1032
4  CoreFoundation                 0x182a30c50 CFRunLoopRunSpecific + 384
5  Foundation                     0x183440cfc -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 308
6  Koudaitong                     0x1004304c8 +[GCDAsyncSocket cfstreamThread] (GCDAsyncSocket.m:6900)
7  Foundation                     0x183527e4c __NSThread__start__ + 1000
8  libsystem_pthread.dylib        0x1827b7b28 _pthread_body + 156
9  libsystem_pthread.dylib        0x1827b7a8c _pthread_body + 154
10 libsystem_pthread.dylib        0x1827b5028 thread_start + 4

#13. Thread
0  libsystem_kernel.dylib         0x1826ecb48 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1827b5530 _pthread_wqthread + 1284
2  libsystem_pthread.dylib        0x1827b5020 start_wqthread + 4

@Yuzeyang
Copy link
Author

Yuzeyang commented Aug 26, 2016

this crash log is crash in sqlite3_step

#13. Crashed: fmdb.<FMDatabaseQueue: 0x170453410>
0  libsqlite3.dylib               0x195033348 (null) + 8392
1  libsqlite3.dylib               0x195033238 (null) + 8120
2  libsqlite3.dylib               0x19504d8ac (null) + 7364
3  libsqlite3.dylib               0x19504bdf8 sqlite3_step + 528
4  Koudaitong                     0x1004e4674 -[FMDatabase executeUpdate:error:withArgumentsInArray:orDictionary:orVAList:] (FMDatabase.m:1073)
5  Koudaitong                     0x1004e4a54 -[FMDatabase executeUpdate:] (FMDatabase.m:1158)
6  Koudaitong                     0x1004e5084 -[FMDatabase beginTransaction] (FMDatabase.m:1290)
7  Koudaitong                     0x1004e7eec __46-[FMDatabaseQueue beginTransaction:withBlock:]_block_invoke (FMDatabaseQueue.m:189)
8  libdispatch.dylib              0x195339954 _dispatch_client_callout + 16
9  libdispatch.dylib              0x1953431e4 _dispatch_barrier_sync_f_invoke + 76
10 Koudaitong                     0x1004e7e60 -[FMDatabaseQueue beginTransaction:withBlock:] (FMDatabaseQueue.m:203)
11 Koudaitong                     0x1004d880c __40-[FIMMessageCRUD insertList:inDatabase:]_block_invoke (FIMMessageCRUD.m:125)
12 libdispatch.dylib              0x195339994 _dispatch_call_block_and_release + 24
13 libdispatch.dylib              0x195339954 _dispatch_client_callout + 16
14 libdispatch.dylib              0x195346780 _dispatch_root_queue_drain + 1848
15 libdispatch.dylib              0x195347c4c _dispatch_worker_thread3 + 108
16 libsystem_pthread.dylib        0x19551921c _pthread_wqthread + 816
17 libsystem_pthread.dylib        0x195518ee0 start_wqthread + 4

--

#0. com.apple.main-thread
0  CoreText                       0x1839fa55c TDescriptor::GetAttributes(__CFString const*) const + 50
1  CoreText                       0x1839fcf5c TDescriptor::Equal(TDescriptor const*) const + 32
2  CoreText                       0x1839fcf2c TCFBase<TDescriptor>::ClassEqual(void const*, void const*) + 20
3  CoreFoundation                 0x182ece474 CFEqual + 412
4  CoreText                       0x183a02c84 operator==(TCFRef<__CTFontDescriptor const*> const&, TCFRef<__CTFontDescriptor const*> const&) + 40
5  CoreText                       0x183a1e3a0 TFont::Compare(TFont const&) const + 44
6  CoreText                       0x183a1e35c TKerningEngineImplementation::RunsSimilar(TRun const&, TRun const&) + 60
7  CoreText                       0x1839fefa4 TKerningEngineImplementation::TKerningEngineImplementation(TRunGlue&) + 132
8  CoreText                       0x183a40968 TAATKerxEngine::TAATKerxEngine(TRunGlue&, __CFData const*) + 48
9  CoreText                       0x183a09b30 TKerningEngine::PositionGlyphs(TLine&, TCharStream const*) + 332
10 CoreText                       0x183a45eac TTypesetter::FinishLayout(std::__1::tuple<TLine const*, TCharStream const*, void const* (*)(__CTRun const*, __CFString const*, void*), void*, std::__1::shared_ptr<TBidiLevelsProvider>*, unsigned int, unsigned char> const&, TLine&, bool) + 40
11 CoreText                       0x183a0c3bc TTypesetterAttrString::Initialize(__CFAttributedString const*) + 556
12 CoreText                       0x183a0c0a8 TTypesetterAttrString::TTypesetterAttrString(__CFAttributedString const*) + 128
13 CoreText                       0x183a0beb8 CTLineCreateWithAttributedString + 72
14 UIFoundation                   0x19127d228 __NSStringDrawingEngine + 3496
15 UIFoundation                   0x19127c434 -[NSString(NSExtendedStringDrawing) boundingRectWithSize:options:attributes:context:] + 160
16 UIKit                          0x187a77008 -[UILabel _textRectForBounds:limitedToNumberOfLines:includingShadow:] + 564
17 UIKit                          0x187a76dcc -[UILabel textRectForBounds:limitedToNumberOfLines:] + 28
18 UIKit                          0x187a76d48 -[UILabel _intrinsicSizeWithinSize:] + 136
19 UIKit                          0x187b67f20 -[UILabel intrinsicContentSize] + 80
20 UIKit                          0x187b67d58 -[UIView(UIConstraintBasedLayout) _generateContentSizeConstraints] + 48
21 UIKit                          0x187b678a8 -[UIView(UIConstraintBasedLayout) _updateContentSizeConstraints] + 484
22 UIKit                          0x187b6355c -[UIView(AdditionalLayoutSupport) updateConstraints] + 200
23 UIKit                          0x187b676b4 -[UILabel updateConstraints] + 236
24 UIKit                          0x1881303a8 -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:] + 240
25 UIKit                          0x1881305b0 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:] + 136
26 CoreFoundation                 0x182ed097c CFArrayApplyFunction + 68
27 UIKit                          0x188130350 -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:] + 152
28 Foundation                     0x183e51308 -[NSISEngine withBehaviors:performModifications:] + 176
29 UIKit                          0x1881305b0 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:] + 136
30 CoreFoundation                 0x182ed097c CFArrayApplyFunction + 68
31 UIKit                          0x188130350 -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:] + 152
32 UIKit                          0x1881305b0 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:] + 136
33 CoreFoundation                 0x182ed097c CFArrayApplyFunction + 68
34 UIKit                          0x188130350 -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:] + 152
35 UIKit                          0x1881305b0 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:] + 136
36 CoreFoundation                 0x182ed097c CFArrayApplyFunction + 68
37 UIKit                          0x188130350 -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:] + 152
38 UIKit                          0x1881305b0 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:] + 136
39 CoreFoundation                 0x182ed097c CFArrayApplyFunction + 68
40 UIKit                          0x188130350 -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:] + 152
41 Foundation                     0x183e51308 -[NSISEngine withBehaviors:performModifications:] + 176
42 UIKit                          0x1881305b0 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:] + 136
43 UIKit                          0x187b6759c __60-[UIView(AdditionalLayoutSupport) updateConstraintsIfNeeded]_block_invoke + 104
44 Foundation                     0x183e51308 -[NSISEngine withBehaviors:performModifications:] + 176
45 UIKit                          0x187b672b8 -[UIView(AdditionalLayoutSupport) updateConstraintsIfNeeded] + 212
46 UIKit                          0x188130914 -[UIView(AdditionalLayoutSupport) _updateConstraintsAtEngineLevelIfNeeded] + 180
47 UIKit                          0x187d3b588 -[UIView(Hierarchy) _updateConstraintsAsNecessaryAndApplyLayoutFromEngine] + 148
48 UIKit                          0x187a69548 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 580
49 QuartzCore                     0x1873a5db8 -[CALayer layoutSublayers] + 152
50 QuartzCore                     0x1873a0820 CA::Layer::layout_if_needed(CA::Transaction*) + 320
51 QuartzCore                     0x1873a06c4 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 32
52 QuartzCore                     0x18739fe58 CA::Context::commit_transaction(CA::Transaction*) + 276
53 QuartzCore                     0x18739fbd8 CA::Transaction::commit() + 528
54 QuartzCore                     0x187399300 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 80
55 CoreFoundation                 0x182fa7ff0 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
56 CoreFoundation                 0x182fa4f7c __CFRunLoopDoObservers + 360
57 CoreFoundation                 0x182fa535c __CFRunLoopRun + 836
58 CoreFoundation                 0x182ed0f74 CFRunLoopRunSpecific + 396
59 GraphicsServices               0x18c92b6fc GSEventRunModal + 168
60 UIKit                          0x187ad2d94 UIApplicationMain + 1488
61 Koudaitong                     0x1000f9de4 main (main.m:16)
62 libdyld.dylib                  0x195366a08 start + 4

#1. com.apple.libdispatch-manager
0  libsystem_kernel.dylib         0x195464c24 kevent64 + 8
1  libdispatch.dylib              0x195349e70 _dispatch_mgr_invoke + 276
2  libdispatch.dylib              0x19533b99c _dispatch_source_invoke + 50

#2. com.apple.NSURLConnectionLoader
0  libsystem_kernel.dylib         0x195464e0c mach_msg_trap + 8
1  libsystem_kernel.dylib         0x195464c88 mach_msg + 72
2  CoreFoundation                 0x182fa7470 __CFRunLoopServiceMachPort + 200
3  CoreFoundation                 0x182fa53c4 __CFRunLoopRun + 940
4  CoreFoundation                 0x182ed0f74 CFRunLoopRunSpecific + 396
5  CFNetwork                      0x1829af098 +[NSURLConnection(Loader) _resourceLoadLoop:] + 440
6  Foundation                     0x183ef1db8 __NSThread__main__ + 1072
7  libsystem_pthread.dylib        0x19551bdb8 _pthread_body + 164
8  libsystem_pthread.dylib        0x19551bd14 _pthread_body + 158
9  libsystem_pthread.dylib        0x195518ee8 thread_start + 4

#3. com.apple.CFSocket.private
0  libsystem_kernel.dylib         0x19547f498 __select + 8
1  CoreFoundation                 0x182face74 __CFSocketManager + 672
2  libsystem_pthread.dylib        0x19551bdb8 _pthread_body + 164
3  libsystem_pthread.dylib        0x19551bd14 _pthread_body + 158
4  libsystem_pthread.dylib        0x195518ee8 thread_start + 4

#4. JavaScriptCore::BlockFree
0  libsystem_kernel.dylib         0x19547f078 __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x19551af1c _pthread_cond_wait + 624
2  libc++.1.dylib                 0x194438cb0 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 56
3  JavaScriptCore                 0x1844c9614 JSC::BlockAllocator::blockFreeingThreadMain() + 232
4  JavaScriptCore                 0x1844c4b90 WTF::wtfThreadEntryPoint(void*) + 24
5  libsystem_pthread.dylib        0x19551bdb8 _pthread_body + 164
6  libsystem_pthread.dylib        0x19551bd14 _pthread_body + 158
7  libsystem_pthread.dylib        0x195518ee8 thread_start + 4

#5. JavaScriptCore::Marking
0  libsystem_kernel.dylib         0x19547f078 __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x19551af1c _pthread_cond_wait + 624
2  libc++.1.dylib                 0x194438cb0 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 56
3  JavaScriptCore                 0x184772ed0 JSC::GCThread::waitForNextPhase() + 156
4  JavaScriptCore                 0x184772f74 JSC::GCThread::gcThreadMain() + 92
5  JavaScriptCore                 0x1844c4b90 WTF::wtfThreadEntryPoint(void*) + 24
6  libsystem_pthread.dylib        0x19551bdb8 _pthread_body + 164
7  libsystem_pthread.dylib        0x19551bd14 _pthread_body + 158
8  libsystem_pthread.dylib        0x195518ee8 thread_start + 4

#6. WebThread
0  libsystem_kernel.dylib         0x195464e0c mach_msg_trap + 8
1  libsystem_kernel.dylib         0x195464c88 mach_msg + 72
2  CoreFoundation                 0x182fa7470 __CFRunLoopServiceMachPort + 200
3  CoreFoundation                 0x182fa53c4 __CFRunLoopRun + 940
4  CoreFoundation                 0x182ed0f74 CFRunLoopRunSpecific + 396
5  WebCore                        0x191d4f28c RunWebThread(void*) + 468
6  libsystem_pthread.dylib        0x19551bdb8 _pthread_body + 164
7  libsystem_pthread.dylib        0x19551bd14 _pthread_body + 158
8  libsystem_pthread.dylib        0x195518ee8 thread_start + 4

#7. JavaScriptCore::BlockFree
0  libsystem_kernel.dylib         0x19547f078 __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x19551af1c _pthread_cond_wait + 624
2  libc++.1.dylib                 0x194438cb0 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 56
3  JavaScriptCore                 0x1844c9614 JSC::BlockAllocator::blockFreeingThreadMain() + 232
4  JavaScriptCore                 0x1844c4b90 WTF::wtfThreadEntryPoint(void*) + 24
5  libsystem_pthread.dylib        0x19551bdb8 _pthread_body + 164
6  libsystem_pthread.dylib        0x19551bd14 _pthread_body + 158
7  libsystem_pthread.dylib        0x195518ee8 thread_start + 4

#8. JavaScriptCore::Marking
0  libsystem_kernel.dylib         0x19547f078 __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x19551af1c _pthread_cond_wait + 624
2  libc++.1.dylib                 0x194438cb0 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 56
3  JavaScriptCore                 0x184772ed0 JSC::GCThread::waitForNextPhase() + 156
4  JavaScriptCore                 0x184772f74 JSC::GCThread::gcThreadMain() + 92
5  JavaScriptCore                 0x1844c4b90 WTF::wtfThreadEntryPoint(void*) + 24
6  libsystem_pthread.dylib        0x19551bdb8 _pthread_body + 164
7  libsystem_pthread.dylib        0x19551bd14 _pthread_body + 158
8  libsystem_pthread.dylib        0x195518ee8 thread_start + 4

#9. com.twitter.crashlytics.ios.MachExceptionServer
0  Koudaitong                     0x100679844 CLSProcessRecordAllThreads + 4300953668
1  Koudaitong                     0x100679844 CLSProcessRecordAllThreads + 4300953668
2  Koudaitong                     0x100679700 CLSProcessRecordAllThreads + 4300953344
3  Koudaitong                     0x100669ec0 CLSHandler + 4300889792
4  Koudaitong                     0x100664e64 CLSMachExceptionServer + 4300869220
5  libsystem_pthread.dylib        0x19551bdb8 _pthread_body + 164
6  libsystem_pthread.dylib        0x19551bd14 _pthread_body + 158
7  libsystem_pthread.dylib        0x195518ee8 thread_start + 4

#10. Thread
0  libsystem_kernel.dylib         0x19547fc78 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1955192cc _pthread_wqthread + 992
2  libsystem_pthread.dylib        0x195518ee0 start_wqthread + 4

#11. Thread
0  libsystem_kernel.dylib         0x19547fc78 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1955192cc _pthread_wqthread + 992
2  libsystem_pthread.dylib        0x195518ee0 start_wqthread + 4

#12. Thread
0  libsystem_kernel.dylib         0x19547fc78 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1955192cc _pthread_wqthread + 992
2  libsystem_pthread.dylib        0x195518ee0 start_wqthread + 4

#13. Crashed: fmdb.<FMDatabaseQueue: 0x170453410>
0  libsqlite3.dylib               0x195033348 (null) + 8392
1  libsqlite3.dylib               0x195033238 (null) + 8120
2  libsqlite3.dylib               0x19504d8ac (null) + 7364
3  libsqlite3.dylib               0x19504bdf8 sqlite3_step + 528
4  Koudaitong                     0x1004e4674 -[FMDatabase executeUpdate:error:withArgumentsInArray:orDictionary:orVAList:] (FMDatabase.m:1073)
5  Koudaitong                     0x1004e4a54 -[FMDatabase executeUpdate:] (FMDatabase.m:1158)
6  Koudaitong                     0x1004e5084 -[FMDatabase beginTransaction] (FMDatabase.m:1290)
7  Koudaitong                     0x1004e7eec __46-[FMDatabaseQueue beginTransaction:withBlock:]_block_invoke (FMDatabaseQueue.m:189)
8  libdispatch.dylib              0x195339954 _dispatch_client_callout + 16
9  libdispatch.dylib              0x1953431e4 _dispatch_barrier_sync_f_invoke + 76
10 Koudaitong                     0x1004e7e60 -[FMDatabaseQueue beginTransaction:withBlock:] (FMDatabaseQueue.m:203)
11 Koudaitong                     0x1004d880c __40-[FIMMessageCRUD insertList:inDatabase:]_block_invoke (FIMMessageCRUD.m:125)
12 libdispatch.dylib              0x195339994 _dispatch_call_block_and_release + 24
13 libdispatch.dylib              0x195339954 _dispatch_client_callout + 16
14 libdispatch.dylib              0x195346780 _dispatch_root_queue_drain + 1848
15 libdispatch.dylib              0x195347c4c _dispatch_worker_thread3 + 108
16 libsystem_pthread.dylib        0x19551921c _pthread_wqthread + 816
17 libsystem_pthread.dylib        0x195518ee0 start_wqthread + 4

#14. Thread
0  libsystem_kernel.dylib         0x19547fc78 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1955192cc _pthread_wqthread + 992
2  libsystem_pthread.dylib        0x195518ee0 start_wqthread + 4

#15. Thread
0  libsystem_kernel.dylib         0x19547fc78 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1955192cc _pthread_wqthread + 992
2  libsystem_pthread.dylib        0x195518ee0 start_wqthread + 4

#16. Thread
0  libsystem_kernel.dylib         0x19547fc78 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1955192cc _pthread_wqthread + 992
2  libsystem_pthread.dylib        0x195518ee0 start_wqthread + 4

#17. Thread
0  libsystem_kernel.dylib         0x19547fc78 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1955192cc _pthread_wqthread + 992
2  libsystem_pthread.dylib        0x195518ee0 start_wqthread + 4

#18. Thread
0  libsystem_kernel.dylib         0x19547fc78 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1955192cc _pthread_wqthread + 992
2  libsystem_pthread.dylib        0x195518ee0 start_wqthread + 4

#19. GCDAsyncSocket-CFStream
0  libsystem_kernel.dylib         0x195464e0c mach_msg_trap + 8
1  libsystem_kernel.dylib         0x195464c88 mach_msg + 72
2  CoreFoundation                 0x182fa7470 __CFRunLoopServiceMachPort + 200
3  CoreFoundation                 0x182fa53c4 __CFRunLoopRun + 940
4  CoreFoundation                 0x182ed0f74 CFRunLoopRunSpecific + 396
5  Foundation                     0x183e094c8 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 316
6  Koudaitong                     0x1004ac4c8 +[GCDAsyncSocket cfstreamThread] (GCDAsyncSocket.m:6900)
7  Foundation                     0x183ef1db8 __NSThread__main__ + 1072
8  libsystem_pthread.dylib        0x19551bdb8 _pthread_body + 164
9  libsystem_pthread.dylib        0x19551bd14 _pthread_body + 158
10 libsystem_pthread.dylib        0x195518ee8 thread_start + 4

@ccgus
Copy link
Owner

ccgus commented Aug 26, 2016

Nothing pops out at me, but I find it weird that both crashes happen when the main thread is doing glyph layout of some sort. Do more of your crashes have the main thread doing that, or was this a coincidence?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants