wcdb
wcdb copied to clipboard
BUS_ADRALN walIndexTryHdr (wal.c:) 后台crash
最近使用wcdb,目前在bugly上搜集不少同样的后台crash问题,请指教一下: 日志大概如下:
0 | walIndexTryHdr (wal.c:2033) 1 | walIndexReadHdr (wal.c:2092) 2 | walIndexReadHdr (wal.c:2092) 3 | sqlite3WalCheckpoint (wal.c:3285) 4 | sqlite3WalClose (wal.c:1961) 5 | sqlite3PagerClose (pager.c:4045) 6 | sqlite3BtreeClose (btree.c:2541) 7 | sqlite3LeaveMutexAndCloseZombie (main.c:1135) 8 | sqlite3Close (main.c:0) 9 | WCDB::Handle::close() (handle.cpp:87) 10 | WCDB::Handle::~Handle() (__tree:1504) 11 | std::__1::__shared_ptr_pointer<WCDB::Handle*, std::__1::default_deleteWCDB::Handle, std::__1::allocatorWCDB::Handle >::__on_zero_shared() (memory:2335) 12 | std::__1::shared_ptrfacebook::react::RCTMessageThread::~shared_ptr() (memory:3583) 13 | std::__1::__shared_ptr_pointer<WCDB::HandleWrap*, std::__1::default_deleteWCDB::HandleWrap, std::__1::allocatorWCDB::HandleWrap >::__on_zero_shared() (memory:2335) 14 | std::__1::shared_ptrfacebook::react::RCTMessageThread::~shared_ptr() (memory:3583) 15 | std::__1::__list_imp<std::__1::shared_ptrWCDB::HandleWrap, std::__1::allocator<std::__1::shared_ptrWCDB::HandleWrap > >::clear() (new:272) 16 | WCDB::ConcurrentListWCDB::HandleWrap::clear() (spin.hpp:41) 17 | WCDB::HandlePool::purgeFreeHandles() (atomic:1026) 18 | WCDB::HandlePool::PurgeFreeHandlesInAllPool() (handle_pool.cpp:0) 19 libdispatch.dylib | __dispatch_call_block_and_release + 32 20 libdispatch.dylib | 0x00000001eba7c000 + 7554744394466060 21 libdispatch.dylib | 0x00000001eba7c000 + 14222182905329404 22 libdispatch.dylib | 0x00000001eba7c000 + 5266110941282884 23 libdispatch.dylib | 0x00000001eba7c000 + 35777008856286500 24 libsystem_pthread.dylib | _pthread_wqthread + 28054039182704956
急需要帮助。please!
有没有遇到同样问题的同学呢??
这个库,还有人维护吗?
@LiLejia @hzlzh @qiaohaijun @zhangyanrui 有人在?
每天过来看一看...
Is anyone there?
@John-He-928
walIndexTryHdr
is accessing a mmap
ed memory.
It usually indicate an incorrect file protection of your database files, which may be solved by upgrading WCDB or change the file protection of the database files(including -wal
and -shm
).
I have no more idea without full crash stack.
@RingoD 是否与xcode-capabilities中开启Data protection有关系呢?
I have no idea.
@RingoD 如何修复呀,一进入后台,数据库操作就是crash
@RingoD 果然和文件保护策略有关,数据库设置NSFileProtectionCompleteUntilFirstUserAuthentication这个策略就解决了
@RingoD 果然和文件保护策略有关,数据库设置NSFileProtectionCompleteUntilFirstUserAuthentication这个策略就解决了
请问你原来的策略是什么,是 NSFileProtectionCompleteUnlessOpen么?