Input is not valid modified UTF-8


#1

In my document I am having key:value
“searchStr”=“alphonse locke 0940489443”

but I am getting following error

07-28 12:52:11.144 31425-31503/com.diro E/art: JNI DETECTED ERROR IN APPLICATION: input is not valid Modified UTF-8: illegal start byte 0x80
string: ‘alphonse loc�’
in call to NewStringUTF
from java.lang.String com.couchbase.litecore.fleece.FLValue.asString(long)
“pool-1-thread-6” prio=5 tid=51 Runnable
| group=“main” sCount=0 dsCount=0 obj=0x12f458e0 self=0x7f7b2b7e00
| sysTid=31503 nice=0 cgrp=default sched=0/0 handle=0x7f76a0b440
| state=R schedstat=( 7716148 909769 39 ) utm=0 stm=0 core=2 HZ=100
| stack=0x7f76909000-0x7f7690b000 stackSize=1037KB
| held mutexes= “mutator lock”(shared held)
at com.couchbase.litecore.fleece.FLValue.asString(Native method)
at com.couchbase.litecore.fleece.FLValue.asString(FLValue.java:101)
at com.couchbase.litecore.fleece.FLValue.toObject(FLValue.java:192)
at com.couchbase.lite.MValueDelegate.toNative(MValueDelegate.java:49)
at com.couchbase.litecore.fleece.MValue.toNative(MValue.java:117)
at com.couchbase.litecore.fleece.MValue.asNative(MValue.java:96)
at com.couchbase.litecore.fleece.MRoot.asNative(MRoot.java:62)
at com.couchbase.lite.Result.fleeceValueToObject(Result.java:480)
- locked <0x0cb76686> (a java.lang.Object)
at com.couchbase.lite.Result.getString(Result.java:101)
at com.couchbase.lite.Result.getString(Result.java:284)
at com.diro.linking.view.contactlistview.ContactListActivity.changed(ContactListActivity.java:1210)
at com.couchbase.lite.QueryChangeListenerToken$1.run(QueryChangeListenerToken.java:37)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)

I have attached .zip file of thread dump error_logs.zip (13.3 KB)


#2

The input at the end of the string is probably emoji or some other form of high codepoint Unicode. This is a known issue that will be fixed in 2.1