-
Notifications
You must be signed in to change notification settings - Fork 118
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
Camera activity crashes after screen unlock #11
Comments
Hi! I've tried, on a Nexus 4, the AllFiltersExample bundled with this framework and this bug occurs when i lock and then unlock the screen or i receive a phone call. This is the logcat then, i've tried to switch "super.onPause();" with "((CameraPreviewInput) input).onPause();" in the onPause method and it crashes with this logcat
03-17 15:43:50.190: E/AndroidRuntime(15513): FATAL EXCEPTION: main
03-17 15:43:50.190: E/AndroidRuntime(15513): Process: project.android.allfiltersexample, PID: 15513
03-17 15:43:50.190: E/AndroidRuntime(15513): java.lang.RuntimeException: Unable to start activity ComponentInfo{project.android.allfiltersexample/project.android.allfiltersexample.ImageProcessingActivity}: java.lang.RuntimeException: Fail to connect to camera service
03-17 15:43:50.190: E/AndroidRuntime(15513): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
03-17 15:43:50.190: E/AndroidRuntime(15513): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
03-17 15:43:50.190: E/AndroidRuntime(15513): at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3738)
03-17 15:43:50.190: E/AndroidRuntime(15513): at android.app.ActivityThread.access$900(ActivityThread.java:135)
03-17 15:43:50.190: E/AndroidRuntime(15513): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1202)
03-17 15:43:50.190: E/AndroidRuntime(15513): at android.os.Handler.dispatchMessage(Handler.java:102)
03-17 15:43:50.190: E/AndroidRuntime(15513): at android.os.Looper.loop(Looper.java:136)
03-17 15:43:50.190: E/AndroidRuntime(15513): at android.app.ActivityThread.main(ActivityThread.java:5017)
03-17 15:43:50.190: E/AndroidRuntime(15513): at java.lang.reflect.Method.invokeNative(Native Method)
03-17 15:43:50.190: E/AndroidRuntime(15513): at java.lang.reflect.Method.invoke(Method.java:515)
03-17 15:43:50.190: E/AndroidRuntime(15513): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
03-17 15:43:50.190: E/AndroidRuntime(15513): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
03-17 15:43:50.190: E/AndroidRuntime(15513): at dalvik.system.NativeStart.main(Native Method)
03-17 15:43:50.190: E/AndroidRuntime(15513): Caused by: java.lang.RuntimeException: Fail to connect to camera service
03-17 15:43:50.190: E/AndroidRuntime(15513): at android.hardware.Camera.native_setup(Native Method)
03-17 15:43:50.190: E/AndroidRuntime(15513): at android.hardware.Camera.(Camera.java:350)
03-17 15:43:50.190: E/AndroidRuntime(15513): at android.hardware.Camera.open(Camera.java:324)
03-17 15:43:50.190: E/AndroidRuntime(15513): at project.android.imageprocessing.input.CameraPreviewInput.createCamera(CameraPreviewInput.java:54)
03-17 15:43:50.190: E/AndroidRuntime(15513): at project.android.imageprocessing.input.CameraPreviewInput.(CameraPreviewInput.java:43)
03-17 15:43:50.190: E/AndroidRuntime(15513): at project.android.allfiltersexample.ImageProcessingActivity.onCreate(ImageProcessingActivity.java:54)
03-17 15:43:50.190: E/AndroidRuntime(15513): at android.app.Activity.performCreate(Activity.java:5231)
03-17 15:43:50.190: E/AndroidRuntime(15513): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
03-17 15:43:50.190: E/AndroidRuntime(15513): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
03-17 15:43:50.190: E/AndroidRuntime(15513): ... 12 more
Could you give me some hints to solve this issue? Thanks in advance! ;) |
I've noticed that the app crashes (i've tried also the TwoInputFilterExample) everytime i lock the screen with the camera activity on focus and then i unlock the screen.
I've tried to manage this with onStop/onRestart but this solve the issue only on some devices (Asus TF201, Galaxy S4) but not in others (Galaxy S, S2).
The text was updated successfully, but these errors were encountered: