{"record":{"id":"63e1d069f08aaec1","repo":"wasabeef/android-gpuimage","slug":"no-configs-match-configspec","errorCode":null,"errorMessage":"No configs match configSpec","messagePattern":"No configs match configSpec","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"critical","filePath":"library/src/main/java/jp/co/cyberagent/android/gpuimage/GLTextureView.java","lineNumber":783,"sourceCode":"         */\n        EGLConfig chooseConfig(EGL10 egl, EGLDisplay display);\n    }\n\n    private abstract class BaseConfigChooser implements EGLConfigChooser {\n        public BaseConfigChooser(int[] configSpec) {\n            mConfigSpec = filterConfigSpec(configSpec);\n        }\n\n        public EGLConfig chooseConfig(EGL10 egl, EGLDisplay display) {\n            int[] num_config = new int[1];\n            if (!egl.eglChooseConfig(display, mConfigSpec, null, 0, num_config)) {\n                throw new IllegalArgumentException(\"eglChooseConfig failed\");\n            }\n\n            int numConfigs = num_config[0];\n\n            if (numConfigs <= 0) {\n                throw new IllegalArgumentException(\"No configs match configSpec\");\n            }\n\n            EGLConfig[] configs = new EGLConfig[numConfigs];\n            if (!egl.eglChooseConfig(display, mConfigSpec, configs, numConfigs, num_config)) {\n                throw new IllegalArgumentException(\"eglChooseConfig#2 failed\");\n            }\n            EGLConfig config = chooseConfig(egl, display, configs);\n            if (config == null) {\n                throw new IllegalArgumentException(\"No config chosen\");\n            }\n            return config;\n        }\n\n        abstract EGLConfig chooseConfig(EGL10 egl, EGLDisplay display, EGLConfig[] configs);\n\n        protected int[] mConfigSpec;\n\n        private int[] filterConfigSpec(int[] configSpec) {","sourceCodeStart":765,"sourceCodeEnd":801,"githubUrl":"https://github.com/wasabeef/android-gpuimage/blob/ceea576ec931c2968431ad46f1fb2e6d68a542e2/library/src/main/java/jp/co/cyberagent/android/gpuimage/GLTextureView.java#L765-L801","documentation":"eglChooseConfig succeeded but returned zero matching framebuffer configurations for mConfigSpec, so the ConfigChooser throws. The requested surface configuration (color/stencil/depth bits) cannot be satisfied by any EGLConfig on this device.","triggerScenarios":"mConfigSpec demands a combination no device config satisfies (e.g. specific RGB bit sizes plus stencil), producing numConfigs <= 0 after a successful eglChooseConfig call.","commonSituations":"Very old or exotic GPUs, emulators with software rendering, devices where the exact 8-8-8-8 RGBA + depth24/stencil8 combination is unavailable.","solutions":["Relax the config spec: drop EGL_STENCIL_SIZE and reduce depth/alpha bit requirements","Add a fallback chooser that retries with EGL_DONT_CARE bits","Check EGLConfig listing via eglGetConfigs to see what the device actually offers","Use TextureView/SurfaceView with hardware acceleration enabled"],"exampleFix":"// before\nspec: { EGL_RED_SIZE 8, GREEN 8, BLUE 8, ALPHA 8, DEPTH 24, STENCIL 8, ... }\n// after\nif (numConfigs <= 0) {\n    int[] relaxed = { EGL10.EGL_DEPTH_SIZE, 16, EGL10.EGL_NONE };\n    egl.eglChooseConfig(display, relaxed, null, 0, num_config);\n}","handlingStrategy":"fallback","validationCode":"int[] num = new int[1];\nif (!egl.eglChooseConfig(display, spec, null, 0, num) || num[0] <= 0) {\n    spec = new int[]{ EGL10.EGL_DEPTH_SIZE, 16, EGL10.EGL_NONE }; // relaxed fallback\n}","typeGuard":null,"tryCatchPattern":"// catch (IllegalArgumentException e) { recreate view with relaxed config or RGB565 }","preventionTips":["Provide a relaxed/RGB565 fallback config spec","Query available EGLConfigs at startup to know device limits","Don't demand stencil/alpha unless the effect requires it"],"tags":["egl","android","opengl","no-config","device-compatibility"],"backgroundTag":"empty-result-set","analyzedSha":"ceea576ec931c2968431ad46f1fb2e6d68a542e2","analyzedAt":"2026-09-11T16:56:13.742Z","contentChangedAt":"2026-09-11T16:56:13.742Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}