Programs build but fail to launch
dacobi opened this issue · 2 comments
I've just downloaded the Vulkan tutorial and build in AS 3.4
I get this error when trying to run in emulator:
04/20 11:39:09: Launching app
$ adb push /home/klejs/AndroidStudioProjects/android-vulkan-tutorials-master/tutorial05_triangle/app/build/outputs/apk/debug/app-debug.apk /data/local/tmp/com.google.vulkan.tutorials.five
$ adb shell pm install -t -r "/data/local/tmp/com.google.vulkan.tutorials.five"
Success
APK installed in 286 ms
$ adb shell am start -n "com.google.vulkan.tutorials.five/android.app.NativeActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Client not ready yet..Waiting for process to come online
Connected to process 6446 on device emulator-5554
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
W/zygote: Unexpected CPU variant for X86 using defaults: x86
W/System: ClassLoader referenced unknown path:
V/threaded_app: Creating: 0xa47be980
V/threaded_app: Config: mcc=310 mnc=260 lang=en cnt=US orien=1 touch=3 dens=420 keys=2 nav=1 keysHid=1 navHid=0 sdk=26 size=2 long=1 modetype=1 modenight=1
V/threaded_app: Start: 0xa47be980
V/threaded_app: activityState=10
I/Vulkan Tutorials: event not handled: 10
V/threaded_app: Resume: 0xa47be980
V/threaded_app: activityState=11
I/Vulkan Tutorials: event not handled: 11
V/threaded_app: InputQueueCreated: 0xa47be980 -- 0xa47beac0
V/threaded_app: APP_CMD_INPUT_CHANGED
V/threaded_app: Attaching input queue to looper
I/Vulkan Tutorials: event not handled: 0
V/threaded_app: NativeWindowCreated: 0xa47be980 -- 0xa22d6008
V/threaded_app: APP_CMD_INIT_WINDOW
V/threaded_app: WindowFocusChanged: 0xa47be980 -- 1
D/vulkan: searching for layers in '/data/app/com.google.vulkan.tutorials.five-q8wlURwyAqruqeZxkPEOQg==/lib/x86'
D/vulkan: searching for layers in '/data/app/com.google.vulkan.tutorials.five-q8wlURwyAqruqeZxkPEOQg==/base.apk!/lib/x86'
A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 6461 (.tutorials.five)
Application terminated.
Turns out it runs fine on an actual phone.
Probably emulator still does not support Vulkan yet ( this was never tested on emulator before as no Vulkan on emulator ), you might check on that.
you might also trace the code to see if there is instance created in
CALL_VK(vkCreateInstance(&instanceCreateInfo, nullptr, &device.instance_));
in source file
if instance is really created, vulkan is supported; otherwise no.
Note that: could load vulkan lib only means vulkan lib is inside Android OS, does NOT mean underneath hardware supporting Vulkan. Only after creating instance, you know that vulkan is supported. Probably should add a small app to check Vulkan supportability.
When developing applications for Audio, Camera, Video, Graphics ( involves real-time processing), probably not compare real devices with emulator; also cpu archtectures are different: emulator is with x86, your device most likely to be arm64-v8a: just too much apart, could not compare.