ppy / osu

rhythm is just a *click* away!
https://osu.ppy.sh
MIT License
15.05k stars 2.22k forks source link

GLES 2.0 fails to initialise on old Android devices #9673

Open Wilker-uwu opened 4 years ago

Wilker-uwu commented 4 years ago

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"
        }
    },
bdach commented 4 years ago

This will be specific to the device itself as it seems some opengl calls are failing. Unsure whether that's a fundamental incompatibility of the device with what we're doing or some other issue. Google tells me this particular device should support GL ES 3.0/3.1.

Wilker-uwu commented 4 years ago

the device info is showing me that i currently have 2.0 installed, so if this is an issue of the firmware version of my device and i don't find means to upgrade it because of DRMs or something, then i'm kinda screwed, because all of the updates after the version of when this phone was manufactured are broken (several programs including Contacts Storage were breaking specially after the update in October of 2018), and i even had to reset the image of it to a prior version because a factory reset woudn't do it.

i was suspecting that something like that would be the problem, but i've had the same behavior before the reset. perhaps the Open(?)GL software was broken in my device too?

bdach commented 4 years ago

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.

Wilker-uwu commented 4 years ago

it's okay then. \^\^ because tbh i would rather wait until i get a new desktop pc and play there for me to personally avoid using DirectX, \^\^' and (going a bit off-topic here) i wonder if i'll be able to run the game in an FSDG-compliant OS (because i've had some bad experiences with my older pc, and i want to avoid some of the stuff in the new one...)

Wilker-uwu commented 4 years ago

by the way thank you for the attention, i appreciate it ^-^

smoogipoo commented 4 years ago

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.

dragonGod97677 commented 3 years ago

I know this is low priority for now.... just mentioning my issue https://github.com/ppy/osu-framework/issues/2862 because it's same and also happens on oppo neo 5, same specs on my old phone MyPhone Rio 2 issue but OS and storage size and screen size is only difference. (ColorOS 2.1.0i based on Android 5.1)

peppy commented 3 years ago

As a heads up, we can not support android versions that are 6 years old.