java.lang.RuntimeException

Error during attachToGLContext (see logcat for details)


Samebug tips2

Android has some problem with big images, so, probably, the image you're trying to use is too big for Canvas. You can either use Picasso or compress your image to reduce it's size (both pixel wise and filesize wise)

Picasso or Glide takes more time for to load big image,ya its true you can resize image in Picasso or Glide,but its resolution will not be good at all,you can compress image before load into Picasso or Glide.or same for upload to server for reduce time.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.


Solutions on the web23046

Solution icon of stackoverflow
Error during attachToGLContext (see logcat for details)

Solution icon of github
via GitHub by huashigen
, 6 months ago
Error during attachToGLContext (see logcat for details)

Solution icon of stackoverflow
Error during attachToGLContext (see logcat for details)

Solution icon of github
via GitHub by yuxinLi
, 3 months ago
Error during detachFromGLContext (see logcat for details)

Solution icon of github
Error during detachFromGLContext (see logcat for details)

Solution icon of github
via GitHub by marekhalmo
, 1 year ago
Error during updateTexImage (see logcat for details)

Solution icon of github
via GitHub by silverscania
, 1 year ago
Error during updateTexImage (see logcat for details)

Solution icon of stackoverflow
Error during detachFromGLContext (see logcat for details)

Solution icon of stackoverflow
Error during detachFromGLContext (see logcat for details)

Solution icon of stackoverflow
via Stack Overflow by jony
, 5 months ago
Error during updateTexImage (see logcat for details)

Stack trace

  • java.lang.RuntimeException: Error during attachToGLContext (see logcat for details) at android.graphics.SurfaceTexture.attachToGLContext(SurfaceTexture.java:215) at android.view.GLES20TextureLayer.setSurfaceTexture(GLES20TextureLayer.java:86) at android.view.HardwareRenderer$Gl20Renderer.setSurfaceTexture(HardwareRenderer.java:2221) at android.view.TextureView.getHardwareLayer(TextureView.java:401) at android.view.View.getDisplayList(View.java:13328) at android.view.View.getDisplayList(View.java:13404) at android.view.View.draw(View.java:14182) at android.view.ViewGroup.drawChild(ViewGroup.java:3103) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940) at android.view.View.getDisplayList(View.java:13357) at android.view.View.getDisplayList(View.java:13404) at android.view.View.draw(View.java:14182) at android.view.ViewGroup.drawChild(ViewGroup.java:3103) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940) at android.view.View.draw(View.java:14468) at android.view.View.getDisplayList(View.java:13362) at android.view.View.getDisplayList(View.java:13404) at android.view.View.draw(View.java:14182) at android.view.ViewGroup.drawChild(ViewGroup.java:3103) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940) at android.view.View.getDisplayList(View.java:13357) at android.view.View.getDisplayList(View.java:13404) at android.view.View.draw(View.java:14182) at android.view.ViewGroup.drawChild(ViewGroup.java:3103) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940) at android.view.View.getDisplayList(View.java:13357) at android.view.View.getDisplayList(View.java:13404) at android.view.View.draw(View.java:14182) at android.view.ViewGroup.drawChild(ViewGroup.java:3103) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940) at android.view.View.draw(View.java:14468) at android.widget.FrameLayout.draw(FrameLayout.java:472) at android.widget.ScrollView.draw(ScrollView.java:1603) at android.view.View.getDisplayList(View.java:13362) at android.view.View.getDisplayList(View.java:13404) at android.view.View.draw(View.java:14182) at android.view.ViewGroup.drawChild(ViewGroup.java:3103) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940) at android.view.View.getDisplayList(View.java:13357) at android.view.View.getDisplayList(View.java:13404) at android.view.View.draw(View.java:14182) at android.view.ViewGroup.drawChild(ViewGroup.java:3103) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940) at android.view.View.draw(View.java:14468) at android.widget.FrameLayout.draw(FrameLayout.java:472) at android.view.View.getDisplayList(View.java:13362) at android.view.View.getDisplayList(View.java:13404) at android.view.View.draw(View.java:14182) at android.view.ViewGroup.drawChild(ViewGroup.java:3103) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940) at android.view.View.draw(View.java:14468) at android.support.v7.widget.ActionBarOverlayLayout.draw(ActionBarOverlayLayout.java:444) at android.view.View.getDisplayList(View.java:13362) at android.view.View.getDisplayList(View.java:13404) at android.view.View.draw(View.java:14182) at android.view.ViewGroup.drawChild(ViewGroup.java:3103) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940) at android.view.View.getDisplayList(View.java:13357) at android.view.View.getDisplayList(View.java:13404) at android.view.View.draw(View.java:14182) at android.view.ViewGroup.drawChild(ViewGroup.java:3103) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940) at android.view.View.getDisplayList(View.java:13357) at android.view.View.getDisplayList(View.java:13404) at android.view.View.draw(View.java:14182) at android.view.ViewGroup.drawChild(ViewGroup.java:3103) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940) at android.view.View.draw(View.java:14468) at android.widget.FrameLayout.draw(FrameLayout.java:472)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Once, 2 months ago
Once, 2 months ago
12 times, 3 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago