tomthecarrot / arcore-for-all

Google ARCore (dev preview 1) for "unsupported" Android devices
GNU General Public License v3.0
1.04k stars 145 forks source link

Fails on NVIDIA Shield K1. #5

Open Horsetopus opened 7 years ago

Horsetopus commented 7 years ago

Hi,

I have a NVIDIA Shield K1 tablet with Android 7.0. It's a bit of an old tablet (2 years, an eternity), and the camera's not great but it packs enough power that I thought to give a try.

I followed these instructions: https://developers.google.com/ar/develop/java/getting-started And I replaced the arcore_client.aad with yours.

The application launched but all I get is a black screen with "searching for surfaces" and a notice that "Tango Core has stopped".

I get the logs:

08-30 16:13:52.107 15903-15903/? I/art: Late-enabling -Xcheck:jni
08-30 16:13:52.132 15903-15910/? I/art: Debugger is no longer active
08-30 16:13:52.133 15903-15910/? I/art: Starting a blocking GC Instrumentation
08-30 16:13:52.299 15903-15903/? W/System: ClassLoader referenced unknown path: /data/app/com.google.ar.core.examples.java.helloar-1/lib/arm
08-30 16:13:52.309 15903-15903/? I/InstantRun: starting instant run server: is main process
08-30 16:13:52.367 15903-15903/? W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
08-30 16:13:52.419 15903-15903/? E/SupportedDevices: Device calibration unavailable. Just kidding! ;)
08-30 16:13:52.442 15903-15903/? E/SupportedDevices: Device calibration unavailable. Just kidding! ;)
08-30 16:13:52.448 15903-15903/? I/TangoClientLibLoader: Pure Java path, not loading libtango_client_api.so at all.
08-30 16:13:52.459 15903-15903/? I/ndk_camera: Starting native camera system initialization.
08-30 16:13:52.461 15903-15903/? D/ndk_camera: Camera 0 has 87 metadata tags
08-30 16:13:52.461 15903-15903/? E/ACameraMetadata: getConstEntry: cannot find metadata tag 589825
08-30 16:13:52.461 15903-15903/? W/ndk_camera: Failed to get metadata tag 589825 for camera 0 with error code -10004
08-30 16:13:52.461 15903-15903/? E/ACameraMetadata: getConstEntry: cannot find metadata tag -2147155968
08-30 16:13:52.461 15903-15903/? W/ndk_camera: Failed to get metadata tag -2147155968 for camera 0 with error code -10004
08-30 16:13:52.461 15903-15903/? E/ACameraMetadata: getConstEntry: cannot find metadata tag 1638401
08-30 16:13:52.462 15903-15903/? W/ndk_camera: Failed to get metadata tag 1638401 for camera 0 with error code -10004
08-30 16:13:52.462 15903-15903/? D/ndk_camera: Camera 1 has 87 metadata tags
08-30 16:13:52.462 15903-15903/? E/ACameraMetadata: getConstEntry: cannot find metadata tag 589825
08-30 16:13:52.462 15903-15903/? W/ndk_camera: Failed to get metadata tag 589825 for camera 1 with error code -10004
08-30 16:13:52.463 15903-15903/? E/ACameraMetadata: getConstEntry: cannot find metadata tag -2147155968
08-30 16:13:52.463 15903-15903/? W/ndk_camera: Failed to get metadata tag -2147155968 for camera 1 with error code -10004
08-30 16:13:52.463 15903-15903/? E/ACameraMetadata: getConstEntry: cannot find metadata tag 1638401
08-30 16:13:52.463 15903-15903/? W/ndk_camera: Failed to get metadata tag 1638401 for camera 1 with error code -10004
08-30 16:13:52.463 15903-15903/? I/ndk_camera: Camera system initialized successfully with 2 cameras.
08-30 16:13:52.463 15903-15903/? W/tango_camera_native_jni: Camera system initilized.
08-30 16:13:52.463 15903-15903/? E/tango_camera_native: 2 is not a valid camera index.
08-30 16:13:52.463 15903-15903/? E/tango_camera_native: 3 is not a valid camera index.
08-30 16:13:52.469 15903-15903/? I/tango_camera_native_jni: Attaching texture_window 0xaa339008
08-30 16:13:52.469 15903-15903/? D/TangoVhs: about to bind as vhs
08-30 16:13:52.482 15903-15903/? D/TangoVhs: finished bind as vhs
08-30 16:13:52.518 15903-15903/? D/phs:ipc-binder-client: phs: RegisterClient(): transact returned 0, NO_ERROR=0
08-30 16:13:52.518 15903-15903/? D/phs:ipc-binder-client: phs: RegisterClient() timeout is 5000
08-30 16:13:52.575 15903-15935/? I/OpenGLRenderer: Initialized EGL, version 1.4
08-30 16:13:52.575 15903-15935/? D/OpenGLRenderer: Swap behavior 2
08-30 16:13:53.255 15903-15903/com.google.ar.core.examples.java.helloar I/Choreographer: Skipped 43 frames!  The application may be doing too much work on its main thread.

I don't know what are the tags it's not finding for the cameras, but it does end up saying: [...] I/ndk_camera: Camera system initialized successfully with 2 cameras. [...] W/tango_camera_native_jni: Camera system initialized. And no crashing error seams to be caught.

Any idea? Is this just impossible?

tomthecarrot commented 7 years ago

Does the sample.apk from this repo work?

Horsetopus commented 7 years ago

Nope, it doesn't. First I get a "Tango core has stopped", then the unity splash screen and finally "Hello AR has stopped". Don't know about the logs, I don't have a USB cable right now, but I would guess it's the same issue.

tomthecarrot commented 7 years ago

Strange. That sample build works fine on my Samsung GS8+. The logs should give more insight into why Tango Core is crashing.

Horsetopus commented 7 years ago

Maybe it has to do with the processor support or texture compression. I know my tablet supports vulkan, so it's not that.

Well maybe when more device who can and can't run the demos are listed we can figure this out. I was juste trying to play a bit anyway, I am in no hurry.

tomthecarrot commented 7 years ago

If the OS is forcing multithreaded rendering, that could be it. ARCore does not seem to support multithreaded rendering at this time.

tomthecarrot commented 7 years ago

Added the known devices to a research document to try to isolate the issue. Nvidia Shield K1 is the only device on the list with an Nvidia GPU, so it's possible that its architecture is currently unsupported. Let's try to fix that :)