(안드) Camera: app passed NULL surface 오류 해결 어떻게 해야할까요ㅠ

조회수 965회

유튜브 튜토리얼 보고 고대로 따라 만든 firebase kit 사용한 face detection 앱입니다ㅠ 근데 실행하자마자 강제중지먹어서ㅠ 뭐가 문제인 걸까요ㅠ

logCat 입니다 ㅠ

2019-03-07 20:39:59.001 19230-19261/podo.example.facedetectmlkit D/OpenGLRenderer: HWUI GL Pipeline 2019-03-07 20:39:59.010 19230-19230/podo.example.facedetectmlkit D/ViewRootImpl@6337b7e[MainActivity]: setView = DecorView@4a0fff5[MainActivity] TM=true MM=false 2019-03-07 20:39:59.021 19230-19251/podo.example.facedetectmlkit V/FA: Connection attempt already in progress 2019-03-07 20:39:59.022 19230-19251/podo.example.facedetectmlkit V/FA: Connection attempt already in progress 2019-03-07 20:39:59.023 19230-19251/podo.example.facedetectmlkit V/FA: Activity resumed, time: 187025960 2019-03-07 20:39:59.030 19230-19230/podo.example.facedetectmlkit D/SensorManager: registerListener :: 1, LSM6DSL Acceleration Sensor, 200000, 0,
2019-03-07 20:39:59.031 19230-19230/podo.example.facedetectmlkit D/ViewRootImpl@6337b7e[MainActivity]: dispatchAttachedToWindow 2019-03-07 20:39:59.042 19230-19230/podo.example.facedetectmlkit V/Surface: sf_framedrop debug : 0x4f4c, game : false, logging : 0 2019-03-07 20:39:59.043 19230-19230/podo.example.facedetectmlkit D/ViewRootImpl@6337b7e[MainActivity]: Relayout returned: old=[0,0][0,0] new=[0,0][1080,2220] result=0x7 surface={valid=true 538177720320} changed=true 2019-03-07 20:39:59.047 19230-19261/podo.example.facedetectmlkit I/OpenGLRenderer: Initialized EGL, version 1.4 2019-03-07 20:39:59.047 19230-19261/podo.example.facedetectmlkit D/OpenGLRenderer: Swap behavior 2 2019-03-07 20:39:59.047 19230-19230/podo.example.facedetectmlkit D/AndroidRuntime: Shutting down VM 2019-03-07 20:39:59.049 19230-19261/podo.example.facedetectmlkit D/libGLESv1: STS_GLApi : DTS, ODTC are not allowed for Package : podo.example.facedetectmlkit 2019-03-07 20:39:59.049 19230-19230/podo.example.facedetectmlkit E/AndroidRuntime: FATAL EXCEPTION: main Process: podo.example.facedetectmlkit, PID: 19230 java.lang.ArithmeticException: divide by zero at com.wonderkiln.camerakit.SurfaceViewContainer.layoutChild(SurfaceViewContainer.java:55) at com.wonderkiln.camerakit.SurfaceViewContainer.onLayout(SurfaceViewContainer.java:37) at android.view.View.layout(View.java:20822) at android.view.ViewGroup.layout(ViewGroup.java:6401) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:20822) at android.view.ViewGroup.layout(ViewGroup.java:6401) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1080) at android.view.View.layout(View.java:20822) at android.view.ViewGroup.layout(ViewGroup.java:6401) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:20822) at android.view.ViewGroup.layout(ViewGroup.java:6401) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1791) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1635) at android.widget.LinearLayout.onLayout(LinearLayout.java:1544) at android.view.View.layout(View.java:20822) at android.view.ViewGroup.layout(ViewGroup.java:6401) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:20822) at android.view.ViewGroup.layout(ViewGroup.java:6401) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1791) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1635) at android.widget.LinearLayout.onLayout(LinearLayout.java:1544) at android.view.View.layout(View.java:20822) at android.view.ViewGroup.layout(ViewGroup.java:6401) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at com.android.internal.policy.DecorView.onLayout(DecorView.java:944) at android.view.View.layout(View.java:20822) at android.view.ViewGroup.layout(ViewGroup.java:6401) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2948) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2635) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1779) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7810) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911) at android.view.Choreographer.doCallbacks(Choreographer.java:723) at android.view.Choreographer.doFrame(Choreographer.java:658) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897) at android.os.Handler.handleCallback(Handler.java:789) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6938) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374) 2019-03-07 20:39:59.051 19230-19261/podo.example.facedetectmlkit D/mali_winsys: EGLint new_window_surface(egl_winsys_display , void *, EGLSurface, EGLConfig, egl_winsys_surface *, egl_color_buffer_format *, EGLBoolean) returns 0x3000, [1080x2220]-format:1 2019-03-07 20:39:59.051 19230-19261/podo.example.facedetectmlkit D/OpenGLRenderer: eglCreateWindowSurface = 0x7d5bc18400 2019-03-07 20:39:59.162 19230-19260/podo.example.facedetectmlkit D/Camera: app passed NULL surface

  • (•́ ✖ •̀)
    알 수 없는 사용자

1 답변

  • 해당 튜토리얼을 해보지 않아서 정확히 어떤 문제인지는 코드를 첨부 더 하셔야할것같습니다.

    켜자마자 종료가 된다면 첫 시작 액티비티의 onCreate 메서드 부분부터 디버깅을 시작해보세요

    일단 로그캣만 가지고 보자면

    2019-03-07 20:39:59.049 19230-19230/podo.example.facedetectmlkit E/AndroidRuntime: FATAL EXCEPTION: main Process: podo.example.facedetectmlkit, PID: 19230 java.lang.ArithmeticException: divide by zero at com.wonderkiln.camerakit.SurfaceViewContainer.layoutChild(SurfaceViewContainer.java:55)

    이 부분에 divide by zero 0으로 나누는 부분부터 살펴보시면 될 것 같습니다.

    • (•́ ✖ •̀)
      알 수 없는 사용자

답변을 하려면 로그인이 필요합니다.

프로그래머스 커뮤니티는 개발자들을 위한 Q&A 서비스입니다. 로그인해야 답변을 작성하실 수 있습니다.

(ಠ_ಠ)
(ಠ‿ಠ)