Hi, I get this message on the logCat when I push Start button of the FastCVSample application running on a Google Nexus S:
11-11 13:27:20.183: D/dalvikvm(1321): GC_EXTERNAL_ALLOC freed 43K, 50% free 2710K/5379K, external 1625K/2137K, paused 41ms
11-11 13:27:20.257: D/dalvikvm(1321): GC_EXTERNAL_ALLOC freed 1K, 50% free 2710K/5379K, external 3125K/3903K, paused 23ms
11-11 13:27:22.035: W/KeyCharacterMap(1321): Can't open keycharmap file
11-11 13:27:22.039: W/KeyCharacterMap(1321): Error loading keycharmap file '/system/usr/keychars/herring-keypad.kcm.bin'. hw.keyboards.0.devname='herring-keypad'
11-11 13:27:22.039: W/KeyCharacterMap(1321): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
11-11 13:27:23.167: D/dalvikvm(1321): Trying to load lib /data/data/com.qualcomm.fastcorner/lib/libfastcvsample.so 0x40513c98
11-11 13:27:23.167: D/dalvikvm(1321): Added shared lib /data/data/com.qualcomm.fastcorner/lib/libfastcvsample.so 0x40513c98
11-11 13:27:23.167: D/dalvikvm(1321): No JNI_OnLoad found in /data/data/com.qualcomm.fastcorner/lib/libfastcvsample.so 0x40513c98, skipping init
11-11 13:27:23.179: E/qcvaq6(1321): Could not open /dev/pmem_adsp
11-11 13:27:23.179: E/qcvaq6(1321): Could not init Q6. Q6 QCVA functions are disabled.
11-11 13:27:23.179: I/qcvaq6(1321): FIT:(FeatureName=>QCVAQ6, Initialized=>0)
11-11 13:27:23.187: E/FastCVSample(1321): Configured FastThreshold: 3
11-11 13:27:23.187: E/FastCVSample(1321): Configured Threshold: 40
11-11 13:27:23.187: E/FastCVSample(1321): Configured Scaling: 0
11-11 13:27:23.187: E/FastCVSample(1321): Configured Scale: 1
11-11 13:27:23.187: E/FastCVSample(1321): Configured Pixel Overlay: 1
11-11 13:27:23.187: E/FastCVSample(1321): Configured Scale: 1
11-11 13:27:23.187: E/FastCVSample(1321): Configured Viewfinder: 0
11-11 13:27:23.187: E/FastCVSample(1321): Configured viewfinder: 0
11-11 13:27:23.187: E/FastCVSample(1321): Configured Scaling: 1
11-11 13:27:23.187: E/FastCVSample(1321): Configured Scale: 1
11-11 13:27:23.210: D/dalvikvm(1321): GC_EXPLICIT freed 33K, 49% free 2795K/5379K, external 3382K/4813K, paused 19ms
11-11 13:27:23.238: D/AndroidRuntime(1321): Shutting down VM
11-11 13:27:23.238: W/dalvikvm(1321): threadid=1: thread exiting with uncaught exception (group=0x40015560)
11-11 13:27:23.242: E/AndroidRuntime(1321): FATAL EXCEPTION: main
11-11 13:27:23.242: E/AndroidRuntime(1321): java.lang.RuntimeException: Unable to resume activity {com.qualcomm.fastcorner/com.qualcomm.fastcorner.FastCVSample}: java.lang.RuntimeException: setParameters failed
11-11 13:27:23.242: E/AndroidRuntime(1321): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2120)
11-11 13:27:23.242: E/AndroidRuntime(1321): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2135)
11-11 13:27:23.242: E/AndroidRuntime(1321): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1668)
11-11 13:27:23.242: E/AndroidRuntime(1321): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
11-11 13:27:23.242: E/AndroidRuntime(1321): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
11-11 13:27:23.242: E/AndroidRuntime(1321): at android.os.Handler.dispatchMessage(Handler.java:99)
11-11 13:27:23.242: E/AndroidRuntime(1321): at android.os.Looper.loop(Looper.java:130)
11-11 13:27:23.242: E/AndroidRuntime(1321): at android.app.ActivityThread.main(ActivityThread.java:3683)
11-11 13:27:23.242: E/AndroidRuntime(1321): at java.lang.reflect.Method.invokeNative(Native Method)
11-11 13:27:23.242: E/AndroidRuntime(1321): at java.lang.reflect.Method.invoke(Method.java:507)
11-11 13:27:23.242: E/AndroidRuntime(1321): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
11-11 13:27:23.242: E/AndroidRuntime(1321): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
11-11 13:27:23.242: E/AndroidRuntime(1321): at dalvik.system.NativeStart.main(Native Method)
11-11 13:27:23.242: E/AndroidRuntime(1321): Caused by: java.lang.RuntimeException: setParameters failed
11-11 13:27:23.242: E/AndroidRuntime(1321): at android.hardware.Camera.native_setParameters(Native Method)
11-11 13:27:23.242: E/AndroidRuntime(1321): at android.hardware.Camera.setParameters(Camera.java:914)
11-11 13:27:23.242: E/AndroidRuntime(1321): at com.qualcomm.fastcorner.FastCVSample.setupCamera(FastCVSample.java:487)
11-11 13:27:23.242: E/AndroidRuntime(1321): at com.qualcomm.fastcorner.FastCVSample.startPreview(FastCVSample.java:522)
11-11 13:27:23.242: E/AndroidRuntime(1321): at com.qualcomm.fastcorner.FastCVSample.onResume(FastCVSample.java:323)
11-11 13:27:23.242: E/AndroidRuntime(1321): at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1150)
11-11 13:27:23.242: E/AndroidRuntime(1321): at android.app.Activity.performResume(Activity.java:3832)
11-11 13:27:23.242: E/AndroidRuntime(1321): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2110)
11-11 13:27:23.242: E/AndroidRuntime(1321): ... 12 more
11-11 13:27:25.589: I/Process(1321): Sending signal. PID: 1321 SIG: 9
Any idea about what's failing?
Hi Eduardo,
i had the same problem and was kinda lucky to find out what the problem was. The stacktrace mentions something like:
java.lang.RuntimeException: setParameters failed
So i had a look at the parameters that are uses to setup the camera. --> FastCVExample:setupCamera()
It turns out, that the sample project uses a resolution of 800x480 which is not supported by the camera. The highest resolution of Nexus S is 720x480 as far as i know.
So to solve the problem just look for all references of the variables "mDesiredWidth" and "mDesiredHeight" from the class FastCVExample.java and make sure that always proper values are used.