wcdb icon indicating copy to clipboard operation
wcdb copied to clipboard

BUS_ADRALN walIndexTryHdr (wal.c:) 后台crash

Open OneTaoist opened this issue 5 years ago • 12 comments

最近使用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!

OneTaoist avatar Feb 24 '20 07:02 OneTaoist

有没有遇到同样问题的同学呢??

OneTaoist avatar Mar 02 '20 03:03 OneTaoist

这个库,还有人维护吗?

OneTaoist avatar Mar 02 '20 03:03 OneTaoist

@LiLejia @hzlzh @qiaohaijun @zhangyanrui 有人在?

OneTaoist avatar Mar 04 '20 03:03 OneTaoist

每天过来看一看...

OneTaoist avatar Mar 09 '20 01:03 OneTaoist

Is anyone there?

OneTaoist avatar Mar 11 '20 02:03 OneTaoist

@John-He-928

OneTaoist avatar Mar 11 '20 02:03 OneTaoist

walIndexTryHdr is accessing a mmaped 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 avatar Mar 12 '20 03:03 RingoD

@RingoD 是否与xcode-capabilities中开启Data protection有关系呢?

OneTaoist avatar Mar 12 '20 08:03 OneTaoist

I have no idea.

RingoD avatar Mar 15 '20 02:03 RingoD

@RingoD 如何修复呀,一进入后台,数据库操作就是crash

lifenglin123 avatar Jan 10 '21 03:01 lifenglin123

@RingoD 果然和文件保护策略有关,数据库设置NSFileProtectionCompleteUntilFirstUserAuthentication这个策略就解决了

lifenglin123 avatar Jan 13 '21 02:01 lifenglin123

@RingoD 果然和文件保护策略有关,数据库设置NSFileProtectionCompleteUntilFirstUserAuthentication这个策略就解决了

请问你原来的策略是什么,是 NSFileProtectionCompleteUnlessOpen么?

coooliang avatar Oct 24 '23 06:10 coooliang