phaserjs / phaserjs/phaser

Uncaught TypeError: Cannot read properties of null (reading 'renderWebGL') at GeometryMask2.applyStencil

Open
#7,130 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
40.3k
Forks
7.2k
PR merge metrics
No merged PRs in 30d

Description

Version

  • Phaser Version: 3.87.0
  • Operating system: Windows 10
  • Browser: Occured in Chrome

Description

The error did not contain any of my code so I do not know how i could catch or investigate it myself.

phaser.js:30552 Uncaught TypeError: Cannot read properties of null (reading 'renderWebGL') at GeometryMask2.applyStencil (phaser.js:30552:22) at GeometryMask2.preRenderWebGL (phaser.js:30511:14) at Layer2.LayerWebGLRenderer [as renderWebGL] (phaser.js:57604:18) at WebGLRenderer2.render (phaser.js:182352:19) at CameraManager2.render (phaser.js:11731:26) at Systems2.render (phaser.js:200490:22) at SceneManager2.render (phaser.js:197730:21) at Game2.step (phaser.js:17221:20) at TimeStep2.stepLimitFPS (phaser.js:18192:18) at step (phaser.js:31347:19)

The following line is the line that produced the crash
// Write stencil buffer geometryMask.renderWebGL(renderer, geometryMask, camera);

I am not sure which part is erroneous. It happened on a screen resize. I use both, layers and geometryMasks in my app.

Example Test Code

I do not have Test Code. I do not know which part of the application lead into the crashing code. sorry :(

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at GeometryMask2.applyStencil around phaser.js:30552 and trace the WebGL render path through preRenderWebGL, LayerWebGLRenderer, and resize handling. Reproduce the failure with layers and geometry masks during a screen resize; the report provides no test code, so a minimal case is needed before confirming the cause and a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.