Jump to content

Memory leak with TileSprites and WebGL


Recommended Posts

I'm trying to create a simple parallax scrolling effect using three TileSprites with Phaser 2.2.2. All is well until I run my game on my Nexus 7 (2013, Android 4.4.4) as the whole browser (Chrome) crashes there after some time. Checking out the logs seems to point towards a memory leak somewhere in the WebGL/GLE stack, but I'm not sure if this is a bug somewhere or just me doing something stupid. If I change the rendering mode from Phaser.AUTO to Phaser.CANVAS, the problem is solved.


I opened an issue about this in Github, but as I'm really not sure if this actually is a bug, I thought I post it here as well.


Code to reproduce the problem can be found here: https://github.com/chacal/phaser_nexus_test

And the same code is live here: http://chacal.github.io/phaser_nexus_test/  (Just tap the screen to restart the game until it crashes, requires ~20 taps on my Nexus)

The Github issue is here: https://github.com/photonstorm/phaser/issues/1563


When the Chrome crashes, I see this in the Android logs:

W/Adreno-GSL(25812): <sharedmem_gpumem_alloc_id:1431>: sharedmem_gpumem_alloc: mmap failed errno 12 Out of memoryE/Adreno-GSL(25812): <ioctl_kgsl_sharedmem_alloc:1532>: ioctl_kgsl_sharedmem_alloc: FATAL ERROR : (null)

Any ideas? Am I doing something wrong in the code or is this a bug somewhere in Phaser or Chrome?

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...