WebGL: INVALID_VALUE: vertexAttribPointer: index out of range (Ubuntu)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- javascript
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- JavaScript
- スター
- 1.4k
- フォーク
- 485
- 平均マージ
- 1日 2時間
- マージ済み PR(30日)
- 9
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
phaserjs/phaser-ce のほかの issue
-
Web audio stops playing in iOS 17 and 18 after refocusing再び着手できるかも @samme が 633 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
phaserjs/phaser-ce#748 · リアクション 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
phaserjs/phaser-ce#740 · コメント 9 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
phaserjs/phaser-ce#724 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
phaserjs/phaser-ce#711 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
メンテナーはふだん 1 日以内に返信
phaserjs/phaser-ce の issue をすべて見る
似ている issue
-
enhancement ready
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
DCGM/semant-demo#708 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 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
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
Client codegen: an import repeated in an impl file is emitted twice, and the browser rejects the module対応中かも @MalithaPrabhashana が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
jaseci-labs/jac#10756 ·
メンテナーはふだん 1 日以内に返信