Memory Leak when using MobilePipeline and SpinePlugin
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- javascript
- Lĩnh vực
- game-dev, performance
Hướng nghiên cứu
Bắt đầu với scene Phaser được cung cấp và so sánh MobilePipeline với MultiPipeline trong khi theo dõi glAttribLocationWrappers. Kiểm tra Mobile-vert.js và WebGLRenderer.js, đặc biệt là createAttribLocation, sau đó xác minh bằng ví dụ rằng collection wrapper không còn tăng lên sau mỗi lần cập nhật khi Spine và một game object khác được render.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Version
- Phaser Version: 3.90
- Operating system: All
- Browser: All Mobile
Description
I have found a memory leak when using the MobilePipeline on webgl renderer. The default MultiPipeline works fine and has no memory leaks.
I happens as soon as you have a spine game object and any other game object. It will cause the render game.renderer.glAttribLocationWrappers to infinitely grow on very update.
Example Test Code
import Phaser from 'phaser';
import { SpinePlugin } from '@esotericsoftware/spine-phaser-v3';
class Example extends Phaser.Scene {
preload() {
this.load.atlas('buttons', 'nine-slice.png', 'nine-slice.json');
this.load.spineJson('spineboy-json', 'spine/spineboy-pro.json');
this.load.spineAtlas('spineboy-atlas', 'spine/spineboy-pma.atlas', false);
}
create() {
// Need to have another game object
var button = this.add.nineslice(400, 300, 'buttons', 'button-bg', 400, 110, 64, 64);
button.setInteractive();
button.on('pointerup', this.onButtonPressed, this);
button.input.cursor = 'pointer';
button.setSize(100, 50);
const spineBoy = this.add.spine(500, 500, 'spineboy-json', 'spineboy-atlas');
spineBoy.animationState.setAnimation(0, 'idle', true);
}
onButtonPressed() {
console.log('button pressed');
}
update() {
console.log('glAttribLocationWrappers', this.game.renderer.glAttribLocationWrappers.length);
}
}
const config = {
type: Phaser.WEBGL,
width: 800,
height: 600,
backgroundColor: '#000000',
parent: 'phaser-example',
scene: Example,
render: {
autoMobilePipeline: false, // Disable mobile pipeline to force default
defaultPipeline: 'MobilePipeline' // Comment this out to use default 'MultiPipeline'
},
plugins: {
scene: [{ key: 'spine.SpinePlugin', plugin: SpinePlugin, mapping: 'spine' }]
}
};
const game = new Phaser.Game(config);
Additional Information
I have the console logging, to see it increase in the Mobile Pipeline and it won't in the default one.
From my investigation. I have found that the Mobile-vert,js shader has an unused attribute inTexId, and it is gettting compiled out and then in the WebGLRenderer.js createAttribLocation function its tries to create the wrapper but it cannot get a location which keeps adding to the glAttriLocationWrappers array and never removes it.
- Ngôn ngữ chính
- JavaScript
- Star
- 40.7k
- Fork
- 7.2k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của phaserjs/phaser
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Type definition for TilemapLayer.getTileAt is wrongCó thể đã có người làm @hkbughk đã nhận 34 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Shader.preDestroy leaks its ShaderQuad's vertex buffer and VAO on every create/destroy cycle (4.2.1)Có thể đã có người làm @k1epg01ng129-eng đã nhận 32 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Black opaque background on transparent Phaser.Text textures in Phaser 4.2.1 on older iOS WebGLCó thể đã có người làm @SamuelMalmfors đã nhận 14 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
phaserjs/phaser#7392 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của phaserjs/phaser
Issue tương tự
-
enhancement ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
DCGM/semant-demo#708 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 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
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Client codegen: an import repeated in an impl file is emitted twice, and the browser rejects the moduleCó thể đã có người làm @MalithaPrabhashana đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
jaseci-labs/jac#10756 ·
Maintainer thường phản hồi trong vòng 1 ngày