Description
Unclear what circumstances cause this but it happened in this case during the TestBlobAccessInFilter in the .NET automated testing. A seemingly innocuous call generated a SQLITE_MISUSE error several times in many runs. Here is the stack trace
LiteCore.dll!SQLite::Statement::check(const int aRet) Line 592 LiteCore.dll!SQLite::Statement::bindNoCopy(const int aIndex, const char * apValue, const int aSize) Line 145
LiteCore.dll!litecore::SQLiteKeyStore::read(litecore::Record & rec, litecore::ContentOption content) Line 217
LiteCore.dll!litecore::KeyStore::get(fleece::slice key, litecore::ContentOption option) Line 40
LiteCore.dll!litecore::DocumentKeys::read() Line 39
LiteCore.dll!fleece::impl::PersistentSharedKeys::refresh() Line 199
LiteCore.dll!fleece::impl::SharedKeys::decodeUnknown(int key) Line 131
LiteCore.dll!fleece::impl::SharedKeys::decode(int key) Line 93
LiteCore.dll!fleece::impl::Dict::iterator::keyString() Line 428
LiteCore.dll!fleece::impl::JSONEncoder::writeDict(const fleece::impl::Dict * dict) Line 118
LiteCore.dll!fleece::impl::JSONEncoder::writeValue(const fleece::impl::Value * v) Line 175
LiteCore.dll!FLEncoder_WriteValue(fleece::impl::FLEncoderImpl * e, const fleece::impl::Value * v) Line 573
LiteCore.dll!fleece::Encoder::writeValue(fleece::Value v) Line 652
LiteCore.dll!litecore::repl::Pusher::sendRevision(litecore::repl::RevToSend * request, std::function<void __cdecl(litecore::blip::MessageProgress const &)> onProgress) Line 288
LiteCore.dll!litecore::repl::Pusher::sendRevision(fleece::Retained<litecore::repl::RevToSend> rev) Line 389
LiteCore.dll!litecore::repl::Pusher::maybeSendMoreRevs() Line 373
LiteCore.dll!litecore::repl::Pusher::sendChanges::__l2::<lambda>(litecore::blip::MessageProgress progress) Line 358
LiteCore.dll!litecore::repl::Worker::sendRequest::__l5::<lambda>(litecore::blip::MessageProgress progress) Line 125
LiteCore.dll!litecore::actor::ThreadedMailbox::safelyCall(const std::function<void __cdecl(void)> & f) Line 176
LiteCore.dll!litecore::actor::ThreadedMailbox::enqueue::__l2::<lambda>() Line 140
LiteCore.dll!litecore::actor::ThreadedMailbox::performNextMessage() Line 207
LiteCore.dll!litecore::actor::Scheduler::task(unsigned int taskID) Line 103
LiteCore.dll!litecore::actor::Scheduler::start::__l14::<lambda>() Line 70