question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GLES 2.0 fails to initialise on old Android devices

See original GitHub issue

Describe the crash:

the game is unable to launch for me because of this error. this crash is quite old for me, but it took me a while to find out how to get the logs for it to not end up finding that it could be a mistake in my part.

reproduction is as easy as install›launch›stuck in a (black|splash) screen›crash

osu!lazer version:

2020.717.0

downloaded on 21 of July, if that is relevant. (the application reports 0.1)

Logs:

Matlog report:

07-25 11:39:38.169 E/AndroidRuntime(15735): FATAL EXCEPTION: main
07-25 11:39:38.169 E/AndroidRuntime(15735): Process: sh.ppy.osulazer, PID: 15735
07-25 11:39:38.169 E/AndroidRuntime(15735): android.runtime.JavaProxyThrowable: System.InvalidOperationException: Can't load egl, aborting ---> osuTK.Graphics.GraphicsModeException: Failed to retrieve GraphicsMode, error BAD_ATTRIBUTE
07-25 11:39:38.169 E/AndroidRuntime(15735):   at osuTK.Platform.Egl.EglGraphicsMode.SelectGraphicsMode (osuTK.Platform.Egl.SurfaceType surfaceType, System.IntPtr display, osuTK.Graphics.ColorFormat color, System.Int32 depth, System.Int32 stencil, System.Int32 samples, osuTK.Graphics.ColorFormat accum, System.Int32 buffers, System.Boolean stereo, osuTK.Platform.Egl.RenderableFlags renderableFlags) [0x000af] in <cd31b71df0db484cb4a42e7f57136b74>:0 
07-25 11:39:38.169 E/AndroidRuntime(15735):   at osuTK.Platform.Egl.EglContext..ctor (osuTK.Graphics.GraphicsMode mode, osuTK.Platform.Egl.EglWindowInfo window, osuTK.Graphics.IGraphicsContext sharedContext, System.Int32 major, System.Int32 minor, osuTK.Graphics.GraphicsContextFlags flags) [0x000cc] in <cd31b71df0db484cb4a42e7f57136b74>:0 
07-25 11:39:38.169 E/AndroidRuntime(15735):   at osuTK.Android.AndroidGraphicsContext..ctor (osuTK.Graphics.GraphicsMode mode, osuTK.Platform.Egl.EglWindowInfo window, osuTK.Graphics.IGraphicsContext sharedContext, System.Int32 major, System.Int32 minor, osuTK.Graphics.GraphicsContextFlags flags) [0x00000] in <7484b4753167456b82f11e78c0669d25>:0 
07-25 11:39:38.169 E/AndroidRuntime(15735):   at osuTK.Android.AndroidFactory.CreateGLContext (osuTK.Graphics.GraphicsMode mode, osuTK.Platform.IWindowInfo window, osuTK.Graphics.IGraphicsContext shareContext, System.Boolean directRendering, System.Int32 major, System.Int32 minor, osuTK.Graphics.GraphicsContextFlags flags) [0x0000e] in <7484b4753167456b82f11e78c0669d25>:0 
07-25 11:39:38.169 E/AndroidRuntime(15735):   at osuTK.Graphics.GraphicsContext..ctor (osuTK.Graphics.GraphicsMode mode, osuTK.Platform.IWindowInfo window, osuTK.Graphics.IGraphicsContext shareContext, System.Int32 major, System.Int32 minor, osuTK.Graphics.GraphicsContextFlags flags) [0x000c8] in <cd31b71df0db484cb4a42e7f57136b74>:0 
07-25 11:39:38.169 E/AndroidRuntime(15735):   at osuTK.Graphics.GraphicsContext..ctor (osuTK.Graphics.GraphicsMode mode, osuTK.Platform.IWindowInfo window, System.Int32 major, System.Int32 minor, osuTK.Graphics.GraphicsContextFlags flags) [0x00008] in <cd31b71df0db484cb4a42e7f57136b74>:0 
07-25 11:39:38.169 E/AndroidRuntime(15735):   at osuTK.Android.AndroidGameView.CreateFrameBuffer () [0x0006c] in <7484b4753167456b82f11e78c0669d25>:0 
07-25 11:39:38.169 E/AndroidRuntime(15735):   at osu.Framework.Android.AndroidGameView.CreateFrameBuffer () [0x00000] in <c10a8416032e449aa5c124500ee45ff2>:0 
07-25 11:39:38.169 E/AndroidRuntime(15735):    --- End of inner exception stack trace ---
07-25 11:39:38.169 E/AndroidRuntime(15735):   at osu.Framework.Android.AndroidGameView.CreateFrameBuffer () [0x0003e] in <c10a8416032e449aa5c124500ee45ff2>:0 
07-25 11:39:38.169 E/AndroidRuntime(15735):   at osuTK.Android.AndroidGameView.CreateSurface () [0x00008] in <7484b4753167456b82f11e78c0669d25>:0 
07-25 11:39:38.169 E/AndroidRuntime(15735):   at osuTK.Android.AndroidGameView.SurfaceCreated (Android.Views.ISurfaceHolder holder) [0x00007] in <7484b4753167456b82f11e78c0669d25>:0 
07-25 11:39:38.169 E/AndroidRuntime(15735):   at Android.Views.ISurfaceHolderCallbackInvoker.n_SurfaceCreated_Landroid_view_SurfaceHolder_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_holder) [0x0000f] in <ff51a6c4f87e4df7b2a2c5bf69921807>:0 
07-25 11:39:38.169 E/AndroidRuntime(15735):   at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.11(intptr,intptr,intptr)
07-25 11:39:38.169 E/AndroidRuntime(15735): 	at osutk.android.AndroidGameView.n_surfaceCreated(Native Method)
07-25 11:39:38.169 E/AndroidRuntime(15735): 	at osutk.android.AndroidGameView.surfaceCreated()
07-25 11:39:38.169 E/AndroidRuntime(15735): 	at android.view.SurfaceView.updateWindow(SurfaceView.java:714)
07-25 11:39:38.169 E/AndroidRuntime(15735): 	at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:208)
07-25 11:39:38.169 E/AndroidRuntime(15735): 	at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:1018)
07-25 11:39:38.169 E/AndroidRuntime(15735): 	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2327)
07-25 11:39:38.169 E/AndroidRuntime(15735): 	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1314)
07-25 11:39:38.169 E/AndroidRuntime(15735): 	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7057)
07-25 11:39:38.169 E/AndroidRuntime(15735): 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:829)
07-25 11:39:38.169 E/AndroidRuntime(15735): 	at android.view.Choreographer.doCallbacks(Choreographer.java:606)
07-25 11:39:38.169 E/AndroidRuntime(15735): 	at android.view.Choreographer.doFrame(Choreographer.java:576)
07-25 11:39:38.169 E/AndroidRuntime(15735): 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:815)
07-25 11:39:38.169 E/AndroidRuntime(15735): 	at android.os.Handler.handleCallback(Handler.java:739)
07-25 11:39:38.169 E/AndroidRuntime(15735): 	at android.os.Handler.dispatchMessage(Handler.java:95)
07-25 11:39:38.169 E/AndroidRuntime(15735): 	at android.os.Looper.loop(Looper.java:145)
07-25 11:39:38.179 W/ActivityManager(780):   Force finishing activity 1 sh.ppy.osulazer/crc64f3e94a995e5d9e96.OsuGameActivity
no log files were generated by the application itself.

Computer Specifications:

    "#ARCH=": {
        "uname-m": "ERROR: Error running exec(). Command: [uname, -m] Working Directory: null Environment: null",
        "armv7l": {
            "SUPPORTED_ABIS": [
                "armeabi-v7a",
                "armeabi"
            ],
            "SUPPORTED_32_BIT_ABIS": [
                "armeabi-v7a",
                "armeabi"
            ],
            "SUPPORTED_64_BIT_ABIS": [],
            "BinderArmProtocol": "v7"
        }
    },
    "#ANDROID": {
        "RELEASE": "5.1.1",
        "KERNEL": "3.10.65-6626801",
        "SDK_INT": 22,
        "TAGS": "release-keys",
        "systemName": "root",
        "osName": "Linux",
        "JAVA": "The Android Project",
        "JAVA_url": "http://www.android.com/",
        "JAVA_vm_version": "2.1.0",
        "JAVA_home": "/system",
        "JAVA_path": ".",
        "JAVA_version": "0",
        "JAVA_runtime": "0.9",
        "ro.build.flavor": "j1x3gxx-user",
        "ro.build.characteristics": "default",
        "ro.crypto.type": "",
        "dpmStorageEncryption": "INACTIVE",
        "ALLOWED_GEOLOCATION_ORIGINS": "http://www.google.com http://www.google.co.uk",
        "ro.build.system_root_image": "",
        "/Vendor": " /vendor                   2.1G     1.9G   247.0M   263.0M   4096",
        "/System": " /system                   2.1G     1.9G   247.0M   263.0M   4096"
    },
    "#SYSTEM=": {
        "Cpu": "sc8830",
        "BOARD": "sc8830",
        "HARDWARE": "sc8830",
        "nbrCamsAPI1": 2,
        "CamVendorHAL3": "null(<java.lang.reflect.InvocationTargetException>)",
        "CamVendorAux": "",
        "CamAux": "",
        "KernelFull": "ERROR: Error running exec(). Command: [uname, -a] Working Directory: null Environment: null",
        "CODENAME": "REL",
        "BOOTLOADER": "J120HXXU0ARB2",
        "ro.boot.bootdevice": "",
        "BRAND": "samsung",
        "MODEL": "SM-J120H",
        "MANUFACTURER": "samsung",
        "DEVICE": "j1x3g",
        "ID": "LMY47V",
        "HOST": "SWDD6507",
        "PRODUCT": "j1x3gxx",
        "TYPE": "user",
        "USER": "dpi",
        "DISPLAY": "LMY47V.J120HXXU0APA8",
        "INCREMENTAL": "J120HXXU0APA8",
        "RadioVersion": "J120HXXU0APA8",
        "sku": "",
        "ro.boot.flash.locked": "",
        "ro.boot.verifiedbootstate": "",
        "ro.boot.veritymode": "",
        "ro.boot.dynamic_partitions": "",
        "ro.boot.dynamic_partitions_retrofit": "null(<java.lang.reflect.InvocationTargetException>)",
        "ro.boot.avb_version": "",
        "ro.boot.super_partition": "",
        "ro.boot.slot_suffix": "",
        "glEsVersion": "2.0",
        "reqGlEsVersion": "131072"
    },
    "#DISPLAY=": {
        "Built-inScreen": {
            "Name": "Built-in Screen",
            "State": "ON",
            "ro.sf.lcd_density": "240",
            "RefreshRate": 60.000999450683594,
            "ScreenSpecs": "480 x 800",
            "ViewingMetrics": "DisplayMetrics{density=1.5, width=480, height=800, scaledDensity=1.5, xdpi=217.714, ydpi=216.17}",
            "AllMetrics": "480 x 800, largest app 800 x 762, smallest app 480 x 442, 60.001 fps, supportedRefreshRates [60.001], rotation 0, density 240 (217.714 x 216.17) dpi, layerStack 0, appVsyncOff 0, presDeadline 17666389, type BUILT_IN, state ON, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS}",
            "RefreshRates21": "60.001"
        }
    },

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
smoogipoocommented, Jul 28, 2020

I think we’ll eventually get to a point where we can support GLES 2.0, but this is dependent on further abstraction in o!f and is quite a long while off. Marking as low priority for now.

1reaction
bdachcommented, Jul 25, 2020

I totally glossed over the fact the GL ES version was right there in the dump you posted. On looking at it some more it seems the issue actually originates from EGL (which is also a graphics API but a slightly different one). There are traces on the web of similar issues but none that seem very relevant here. Also some hints that Samsung might be doing weird things on some devices, but I can’t confirm or deny without actually debugging myself.

Seeing that this is device-specific I wouldn’t hold my breath that we will have a fix for you anytime soon, unfortunately. This might get better eventually as we’re looking to add alternatives to OpenGL across the board (by leveraging DirectX/Vulkan) but that is a long way ahead.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not initialize OpenglES emulation, use '-gpu off' to ...
If step 1 fails, Go to AVD Manager. Edit your AVD. Uncheck 'Use Host GPU' option. Click Finish (Save). Start AVD again.
Read more >
OpenGL ES
Android includes support for high performance 2D and 3D graphics with the Open Graphics Library (OpenGL®), specifically, the OpenGL ES API.
Read more >
Configure hardware acceleration for the Android Emulator
Graphics acceleration uses your computer's hardware (typically the GPU) to make screen rendering faster. Android devices use OpenGL for Embedded ...
Read more >
Device compatibility overview
Google Play Store compares the features your app requires to the features available on each user's device to determine whether your app is...
Read more >
MediaCodec
Quickly bring your app to life with less code, using a modern declarative approach to UI, and the simplicity of Kotlin. ... Start...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found