Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not hand tracking #1

Closed
SevenAntares opened this issue Oct 16, 2019 · 11 comments
Closed

Not hand tracking #1

SevenAntares opened this issue Oct 16, 2019 · 11 comments
Assignees

Comments

@SevenAntares
Copy link

First of all thank you for your great effort. I don't get the hand tracking.
Unity 2019.3.0b5
JDK 1.8.0_152
Google Pixel XL 8.1.0
I hope you can help me.
This is the message captured in the debug console:

(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
2019-10-16 08:43:20.339 7519-7535/? E/Unity: AndroidJavaException: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.tensorflow.lite.Interpreter.runForMultipleInputsOutputs(java.lang.Object[], java.util.Map)' on a null object reference
java.lang.NullPointerException: Attempt to invoke virtual method 'void org.tensorflow.lite.Interpreter.runForMultipleInputsOutputs(java.lang.Object[], java.util.Map)' on a null object reference
at com.bora.tflitehandtracking.HandTrackingInference.RunInference(HandTrackingInference.java:113)
at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
at com.unity3d.player.UnityPlayer.access$300(Unknown Source:0)
at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:88)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:164)
at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20)
at UnityEngine.AndroidJNISafe.CheckException () [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.AndroidJNISafe.CallObjectMethod (Sys

@bkunters
Copy link
Owner

Hi, thanks for the notification.

On which branch are you working actually ? I could help further then.

@SevenAntares
Copy link
Author

Thank you very much for answering. I am using master branch

@bkunters
Copy link
Owner

Ah ok I forgot to merge with the develop branch. Can you try out with the develop branch ?

@SevenAntares
Copy link
Author

OK, I have switched to the develop branch. The same result.
I don't know if this can help, it appears when the build begins;
Anotación 2019-10-16 124911

@bkunters
Copy link
Owner

Ok I tried with my own setup. I am working with Unity 2019.2.The rest is the same as yours. I am somehow not getting the same error with my version of the engine. A friend of mine also built with the Unity 2019.2 and there were no problems yet.

The gradle file format might be also changed for your Unity version.

I will try with the 2019.3 and report the results here.

Thanks again for the report !

@bkunters
Copy link
Owner

@SevenAntares allright, I have just tried it out with 2019.3 and got the same problem. There are probably some changes which cause this problem during the communication between the Unity Runtime & JNI. I would encourage you to test again with 2019.2 to ensure that this problem happens because of the Unity version. I can note this as a known issue then.

In case the same problem occurs again, could you check the followings:

  1. AR Foundations version must be 2.1
  2. Check if any game object references are missing in the scene.

@bkunters bkunters self-assigned this Oct 16, 2019
@SevenAntares
Copy link
Author

I have tried Unity 2019.2 with ARFoundation 2.1 and I have the same result. So I think I'm doing something wrong.
I open the "TFARInterface" project in Unity
Should I do something with the "TFLitePlugin" folder?
Forgive me for my innocence

@bkunters
Copy link
Owner

Hi @SevenAntares
We checked out everything and built it multiple times with the current configurations but everything worked fine. You don't have to do anything with the TFLitePlugin. It is rather the android side and thought for the custom model inference implementations. The Android plugin is always built as a .aar library and put into the Plugin folder on the Unity side.

Is your device running the AndroidX ? Maybe it causes a problem currently...
Our setup consists of devices with Android 8.1 & 9 and so far they did not cause any problems.

If you have any older device I would also try with it cause I do not personally have any Android X devices right now. If you would ever try, could you report the results here ?

@bkunters
Copy link
Owner

@SevenAntares Could you also check your NDK version please ?

@SevenAntares
Copy link
Author

Ok, sorry I only have this Android device. Here I leave the concrete versions.

2019.2.0f1\AndroidPlayer

/NDK
Pkg.Desc = Android NDK
Pkg.Revision = 16.1.4479499

/OpenJDK
JAVA_VERSION="1.8.0"
OS_NAME="Windows"
OS_VERSION="5.2"
OS_ARCH="amd64"
SOURCE=""

@bkunters
Copy link
Owner

Duplicate of #2

You can track your problem in the mentioned issue further.

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

No branches or pull requests

2 participants