WebGL: INVALID_VALUE: vertexAttribPointer: index out of range (Ubuntu)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- javascript
- Área
- computer-graphics, frontend
Línea de trabajo
The report points to PIXI.WebGLSpriteBatch.flush in phaser.js and the shader.aTextureIndex attribute lookup, where the location is -1; the minimal reproduction is new Phaser.Game({width: 10, height: 10, renderer: Phaser.AUTO, resolution: 1}). Start by comparing the affected 2.7.x behavior with 2.6.2 and trace the shader attribute setup and use. Done means the minimal game no longer produces the vertexAttribPointer warning in Firefox or Chromium.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
A bug in the API:
I am getting WebGL: INVALID_VALUE: vertexAttribPointer: index out of range spam on Firefox as well as on Chromium, running Ubuntu.
There is no condition for it to happen. It just happens always. A "code example" therefore simply is the empty example codepen: https://codepen.io/pen?template=vyKJvw
There is nothing obvious wrong, except those errors being spammed.
Here is the stacktrace from chromium, referencing lines in phaser-arcade-physics.js of 2.7.7:
PIXI.WebGLSpriteBatch.flush @ phaser.js:5153
PIXI.WebGLSpriteBatch.end @ phaser.js:4806
PIXI.WebGLRenderer.renderDisplayObject @ phaser.js:3742
PIXI.WebGLRenderer.render @ phaser.js:3705
updateRender @ phaser.js:21403
update @ phaser.js:21325
updateRAF @ phaser.js:49064
_onLoop @ phaser.js:49047
It happens due to shader.aTextureIndex in the line
gl.vertexAttribPointer(shader.aTextureIndex, 1, gl.FLOAT, false, stride, 20);
being -1
It is -1 because the getAttributeLocation earlier does indeed seem to return -1
I have no idea why that is however. It reminds me of an issue I had in other WebGL code that was due to some attributes being optimized away since they were not used, but the shader code of the respective shader here does seem to at least superficially use the attribute.
The minimal code to create the issue is to have Phaser in your namespace and start it with:
new Phaser.Game({width: 10, height: 10, renderer: Phaser.AUTO, resolution: 1})
From that point on it spams the warning.
I tested 2.7.7 and 2.7.3, both show the error.
2.6.2 is unaffected
- Lenguaje dominante
- JavaScript
- Estrellas
- 1.4k
- Forks
- 485
- Merge medio
- 1 d 2 h
- PR fusionados (30 d)
- 9
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de phaserjs/phaser-ce
-
Web audio stops playing in iOS 17 and 18 after refocusingQuizá libre de nuevo @samme la tomó hace 633 días y no hay ningún pull request abierto. Abierto
phaserjs/phaser-ce#748 · 2 reacciones · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
phaserjs/phaser-ce#740 · 9 comentarios · 2 reacciones ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 25/100
phaserjs/phaser-ce#724 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
phaserjs/phaser-ce#711 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
Los mantenedores suelen responder en 1 día
Todos los issues de phaserjs/phaser-ce
Issues similares
-
enhancement ready
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
DCGM/semant-demo#708 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
agents area: runtime automation chore cli consistency dependencies developer-experience difficulty: easy documentation enhancement good first issue help wanted hygiene json-output priority: P3 starters tests
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Client codegen: an import repeated in an impl file is emitted twice, and the browser rejects the modulePosiblemente ocupada @MalithaPrabhashana la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
jaseci-labs/jac#10756 ·
Los mantenedores suelen responder en 1 día