Skip to content Skip to sidebar Skip to footer

Fatal Signal 11 (sigsegv) When Use Rxjava And Play Services Vision

In my application I use the definition of the person position in the picture. After that, using RxJava I process the resulting image and output the result. After complete re-run th

Solution 1:

The error is not caused by RxJava. It is caused by native code, probably by the library libmobile_vision_face.so.

If you can't change the native code you can workaround the error by avoid calling FaceDetector.release() and initialising it only once (in your Application class for example).

UPD: for the singleton approach I had in mind to use it as follows:

publicstatic FaceDetector getDetector() {
    if (sFaceDetector != null) {
        return sFaceDetector;
    } else {
        return sFaceDetector = new FaceDetector.Builder(mContext.get())
            .setTrackingEnabled(false)
            .setLandmarkType(FaceDetector.ALL_LANDMARKS)
            .setMode(FaceDetector.FAST_MODE)
            .build();
    }
}

Also you could just try to add the synchronisation to your method first, in case if you try to call it in parallel (what could lead to the error):

publicstaticsynchronized FaceDetector getDetector(){
    ...

Post a Comment for "Fatal Signal 11 (sigsegv) When Use Rxjava And Play Services Vision"