Bug Issue: HTML5 Memory Leak When Drawing

Pages: 1


  • Level 3 Stencyler
November 30, 2018, 11:09:45 am
When a conditional statement is true in the draw event there is a memory leak. This only happens on html5. The memory rapidly climbs by 100MB a second until it crashes or the conditional statement is false.


  • Master Stencyler
  • *
November 30, 2018, 05:02:37 pm
If it's not too much trouble, please export and attach a sample .stencyl to be sure that we get the same setup. It often really helps speed things along on this end. Thanks!
« Last Edit: November 30, 2018, 05:03:09 pm by Justin »


  • Level 3 Stencyler
November 30, 2018, 10:12:34 pm
I'll try to upload it when able! As an update I noticed the problem seemed to be stemming from drawing text over top the same area that an image is attached to the screen. However I later noticed it happening again in a later instance in a different scenario, so it's very strange.

Either way I will try to get you the files when I am back at my computer!


  • Level 3 Stencyler
December 01, 2018, 02:23:33 am
Hi kantieno,

probably is like this issue reported : http://community.stencyl.com/index.php?issue=1176.0

Have you tried different browser ?


  • Level 3 Stencyler
December 01, 2018, 08:55:03 am
Yeah all browsers I've tried have the problem. I'm only running one instance of the game as well!

I stripped down the game so that only the components causing the problem are left. As soon as the game is launched in html5 memory usage will start to climb, it may dip down once, but then it steadily climbs until crashing.

I've attached the .stencyl!
« Last Edit: December 01, 2018, 08:55:36 am by kantieno »

New attachment added by kantieno - December 01, 2018, 08:57:20 am


  • Master Stencyler
  • *
December 08, 2018, 10:29:58 am
Testing in Firefox I see the memory go up over time when drawing anything, with or without conditionals.  The memory does eventually get released and the process starts again.

  • Status changed from New to Confirmed


  • Master Stencyler
  • *
August 01, 2020, 11:48:10 pm
Some duplicate issues with more information:

#1532: Drawing consumes CPU / Memory on WebGL (HTML5)
- Provides some simple pseudo code for reproduction.

#1805: HTML5 Memory Leak
- Some discussion and a sample game

#1886: HTML5 Memory Leak Investigation
- Compared memory usage across browsers using published games
  • Tags added: 4.1.0, html5
  • Issue Assigned from (none) to Justin
  • Status changed from Confirmed to Assigned
« Last Edit: August 01, 2020, 11:47:09 pm by Justin »

Pages: 1


  • Reported
    November 30, 2018, 11:09:45 am
  • Updated
    August 01, 2020, 11:48:10 pm

  • View Status
  • Type
  • Status
  • Priority
  • Version
    3.5.0 beta 1
  • Fixed in
  • Assigned to
  • Category
    Compiling/Testing Games



* Harvest Game Tests.stencyl (3448.02 kB - downloaded 419 times.)