WebGL: INVALID_VALUE: vertexAttribPointer: index out of range (Ubuntu)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- javascript
- Ambito
- computer-graphics, frontend
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- JavaScript
- Stelle
- 1.4k
- Fork
- 485
- Merge medio
- 1g 2h
- PR unite (30g)
- 9
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di phaserjs/phaser-ce
-
Web audio stops playing in iOS 17 and 18 after refocusingForse di nuovo libera @samme l’ha presa 633 giorni fa e non c’è nessuna pull request aperta. Aperta
phaserjs/phaser-ce#748 · 2 reazioni · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
phaserjs/phaser-ce#740 · 9 commenti · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 25/100
phaserjs/phaser-ce#724 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
phaserjs/phaser-ce#711 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di phaserjs/phaser-ce
Issue simili
-
enhancement ready
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
DCGM/semant-demo#708 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 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
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Client codegen: an import repeated in an impl file is emitted twice, and the browser rejects the moduleForse già presa @MalithaPrabhashana l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
jaseci-labs/jac#10756 ·
I maintainer di solito rispondono entro 1 giorno