Memory leak when using preFX in the same scene as a 3.8 Spine object
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.80.1
- Operating system: Windows
- Browser: All browsers
Description
If you assign preFX to any gameObject in a scene that also contains a 3.8 spine object, something goes wacky in the renderer and starts spewing the same instructions into this.renderer.glAttribLocationWrappers on repeat.
Game performance eventually tanks, as renderer.glAttribLocationWrappers.indexOf() is run multiple times per render cycle.
Example Test Code
Click the text to trigger the bug
https://codepen.io/Bambosh/pen/KKjKdxP
Additional Information
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue using the linked CodePen with a preFX-enabled game object and a 3.8 Spine object. Inspect the renderer path that repeatedly updates this.renderer.glAttribLocationWrappers and compare behavior with and without preFX or Spine. Done means the repeated instructions stop accumulating and render performance no longer degrades over time.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- game-dev, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100