Tencent / wcdb

WCDB is a cross-platform database framework developed by WeChat.
Other
10.86k stars 1.42k forks source link

sqlite3VdbeExec only crash on iOS10.3.x #623

Closed cheneycxc closed 8 months ago

cheneycxc commented 5 years ago

The language of WCDB

e.g. Objective-C

The version of WCDB

e.g. v1.0.5

The platform of WCDB

e.g. iOS

The installation of WCDB

e.g. Cocoapods

What's the issue?

What kind of reasons will lead to this crash? This problem was found only on iOS 10.3.x.

0 libsystem_platform.dylib _platform_memmove + 320
1 TouchManga sqlite3VdbeExec (vdbe.c:2945)
2 TouchManga sqlite3VdbeExec (vdbe.c:2945)
3 TouchManga sqlite3_step (vdbeapi.c:602)
4 TouchManga WCDB::StatementHandle::step() (handle_statement.cpp:47)
5 TouchManga -[TPDBSelect next] (TPDBSelect.mm:327)
6 TouchManga -[TPDBSelect allObjects] (TPDBSelect.mm:101)
7 TouchManga -[WCTInterface(TPDBConvenient) getAllObjectsOfClass:sql:] (WCTInterface+TPDBConvenient.mm:0)
8 TouchManga -[TPDBBaseDAO loadEntityWithWhere:order:offset:count:] (TPDBBaseDAO.mm:0)
9 TouchManga -[TPDBBaseDAO loadEntityWithWhere:order:] (TPDBBaseDAO.mm:0)
10 TouchManga -[TPDataDBManager(Draft) loadAllComicDraftWithGroupID:] (TPDataDBManager+Draft.mm:0)
11 TouchManga -[TPComicSerialEditViewController showDraftCell] (TPComicSerialEditViewController.m:480)
12 TouchManga -[TPComicSerialEditView tableView:numberOfRowsInSection:] (TPComicSerialEditView.m:278)
13 UIKit -[UITableView _numberOfRowsInSection:] + 64
14 UIKit -[UISectionRowData refreshWithSection:tableView:tableViewRowData:] + 1852
15 UIKit -[UITableViewRowData _ensureSectionOffsetIsValidForSection:] + 344
16 UIKit -[UITableViewRowData numberOfRows] + 144
17 UIKit -[UITableView noteNumberOfRowsChanged] + 136
18 UIKit -[UITableView reloadData] + 1728
19 TouchManga -[TPComicSerialEditView reloadData] (TPComicSerialEditView.m:504)
20 TouchManga __49-[TPComicSerialEditViewController loadComicsList]_block_invoke (TPComicSerialEditViewController.m:754)
21 TouchManga __93+[TPAPIComic getComicSerialComicListWithGroupId:page:pagesize:isOutside:sortType:completion:]_block_invoke (TPAPIComic.m:593)
22 TouchManga __69-[TPAPINetworking callAPI:baseURL:params:keys:method:start:complete:]_block_invoke (TPAPINetworking.m:0)
23 TouchManga __72-[AFURLSessionManagerTaskDelegate URLSession:task:didCompleteWithError:]_block_invoke_2.104 (AFURLSessionManager.m:248)
24 libdispatch.dylib __dispatch_call_block_and_release + 24
25 libdispatch.dylib __dispatch_client_callout + 16
26 libdispatch.dylib _dispatch_main_queue_callback_4CF + 444
27 CoreFoundation _CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 12
28 CoreFoundation ___CFRunLoopRun + 1572
29 CoreFoundation CFRunLoopRunSpecific + 424
30 GraphicsServices GSEventRunModal + 100
31 UIKit UIApplicationMain + 208
32 TouchManga main (main.m:14)
33 libdyld.dylib _start + 4
RingoD commented 5 years ago

It's crashed at _platform_memmove, which usually indicates the mmaped memory(on disk) is broken.

cheneycxc commented 4 years ago

so what should i do? Backup the database, when broken i recover it?