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

onActivityResult()回调中崩溃(Nexus 6-api24) #48

Closed
xiong-it opened this issue Nov 14, 2016 · 1 comment
Closed

onActivityResult()回调中崩溃(Nexus 6-api24) #48

xiong-it opened this issue Nov 14, 2016 · 1 comment

Comments

@xiong-it
Copy link

E/AndroidRuntime: FATAL EXCEPTION: main
Process: cn.hongjitech.onroad, PID: 2334
java.lang.RuntimeException: Camera is being used after Camera.release() was called
at android.hardware.Camera._stopPreview(Native Method)
at android.hardware.Camera.stopPreview(Camera.java:730)
at com.uuzuche.lib_zxing.activity.CaptureFragment.surfaceDestroyed(CaptureFragment.java:183)
at android.view.SurfaceView.updateWindow(SurfaceView.java:592)
at android.view.SurfaceView.onWindowVisibilityChanged(SurfaceView.java:251)
at android.view.View.dispatchWindowVisibilityChanged(View.java:10276)
at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1289)
at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1289)
at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1289)
at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1289)
at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1289)
at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1289)
at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1289)
at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1289)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1534)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1246)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6301)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:871)
at android.view.Choreographer.doCallbacks(Choreographer.java:683)
at android.view.Choreographer.doFrame(Choreographer.java:619)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:857)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)

@xiong-it
Copy link
Author

将CameraManager.get().closeDriver();从Fragment的onPause中移至onDestroy中即可。

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

1 participant