Skip to content
This repository has been archived by the owner on Mar 2, 2018. It is now read-only.

JNI DETECTED ERROR IN APPLICATION: input is not valid Modified UTF-8: illegal start byte 0xb4 #84

Open
DiAvisoo opened this issue Nov 11, 2016 · 5 comments

Comments

@DiAvisoo
Copy link

Project "java_floor_plan_example" crashes when saving ADF with the following:

E/tango_client_api: TangoErrorType TangoService_saveAreaDescription(char (*)[37]): Internal Error: Could not save an area description. Is learning mode enabled?
A/art: art/runtime/check_jni.cc:64] JNI DETECTED ERROR IN APPLICATION: input is not valid Modified UTF-8: illegal start byte 0xb4
A/art: art/runtime/check_jni.cc:64]     string: ' ͏dp��d�'
A/art: art/runtime/check_jni.cc:64]     in call to NewStringUTF
A/art: art/runtime/check_jni.cc:64]     from int com.google.atap.tango.TangoJNINative.SaveAreaDescription(java.lang.String[])
A/art: art/runtime/check_jni.cc:64] "AsyncTask #1" prio=5 tid=19 Runnable

The project is unmodified so it has learning mode enabled, the correct load/save permissions etc.

First experienced this with my own project and been debugging this the whole day without much progress. Finally found out that the problem exists in the sample project as well so I'm posting this here.

It would seem that the encoding between Java and the C/C++ JNI of Tango lib is getting jumbled up. Check this: http://stackoverflow.com/questions/12127817/android-ics-4-0-ndk-newstringutf-is-crashing-down-the-app

I am completely lost as to how proceed..

@cjanietz
Copy link

cjanietz commented Mar 6, 2017

I have had the exact same issue, turned out to be related to compiling for 64bit ARM.
Compiling for armv7 works flawless.

@jfinken
Copy link

jfinken commented Apr 18, 2017

@cjanietz Can you expand on how you compiled the app for ARMv7 and/or worked around this issue? Did you create an Application.mk file with something like APP_ABI := armeabi-v7a, or an addition to build.gradle? hello_area_description faces this exact issue. The above exception is thrown at mTango.saveAreaDescription();

@cjanietz
Copy link

cjanietz commented Apr 23, 2017

@jfinken I have setup a product flavor of armv7 and when targeting the Phab2 pro which is a 64bit device, it runs the application in 32bit compatibility mode.

 productFlavors {
        armv7 {
            versionCode defaultConfig.versionCode + 2
            ndk {
                abiFilters "armeabi-v7a", ""
            }
        }
}

@SF85
Copy link

SF85 commented Apr 26, 2017

@cjanietz Sadly, this approach is not solving the problem for the 'Yellowstone' dev kits.

@SF85
Copy link

SF85 commented Jun 7, 2017

I have found a solution, a factory reset of the device solved the issue for me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants