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

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.text.Layout.getHeight()' on a null object reference #1279

Open
khiemdnt opened this issue Jun 27, 2024 · 0 comments

Comments

@khiemdnt
Copy link

Describe the bug

Please add a clear description of what the bug is, and fill the list below.

  • CameraView version: 2.7.2
  • Camera engine used: camera2
  • Device / Android version: Pixel, API 30

Hello, thank you for helpful this repository.

I implement cameraview in fragment and then I found crash in firebase crashlytics.
So, I want how to fix it.
thank you

Bug:

      Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.text.Layout.getHeight()' on a null object reference
   at android.widget.TextView.getVerticalOffset(TextView.java:7722)
   at android.widget.TextView.onDraw(TextView.java:8358)
   at android.view.View.draw(View.java:23626)
   at android.view.View.updateDisplayListIfDirty(View.java:22422)
   at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4627)
   at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4600)
   at android.view.View.updateDisplayListIfDirty(View.java:22352)
   at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4627)
   at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4600)
   at android.view.View.updateDisplayListIfDirty(View.java:22352)
   at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4627)
   at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4600)
   at android.view.View.updateDisplayListIfDirty(View.java:22352)
   at android.view.View.draw(View.java:23325)
   at android.view.ViewGroup.drawChild(ViewGroup.java:4643)
   at com.otaliastudios.cameraview.overlay.OverlayLayout.doDrawChild(OverlayLayout.java:180)
   at com.otaliastudios.cameraview.overlay.OverlayLayout.drawChild(OverlayLayout.java:169)
   at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4401)
   at com.otaliastudios.cameraview.overlay.OverlayLayout.drawOn(OverlayLayout.java:151)
   at com.otaliastudios.cameraview.overlay.OverlayDrawer.draw(OverlayDrawer.java:74)
   at com.otaliastudios.cameraview.video.encoding.TextureMediaEncoder.onFrame(TextureMediaEncoder.java:218)
   at com.otaliastudios.cameraview.video.encoding.TextureMediaEncoder.onEvent(TextureMediaEncoder.java:146)
   at com.otaliastudios.cameraview.video.encoding.MediaEncoder$3.run(MediaEncoder.java:244)
   at android.os.Handler.handleCallback(Handler.java:942)
   at android.os.Handler.dispatchMessage(Handler.java:99)
   at android.os.Looper.loopOnce(Looper.java:211)
   at android.os.Looper.loop(Looper.java:300)
   at android.os.HandlerThread.run(HandlerThread.java:67)
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