# SpriteManager infinite drawcalls bug

**URL:** <https://forum.babylonjs.com/t/spritemanager-infinite-drawcalls-bug/34948>\
**Category:** Bugs\
**Tags:** sprite\
**Created:** [October 19, 2022, 12:38pm UTC](https://forum.babylonjs.com/t/spritemanager-infinite-drawcalls-bug/34948 "2022-10-19T12:38:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthias22](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/matthias22/32/19034_2.png) [@Matthias22](https://forum.babylonjs.com/u/Matthias22)\
**Post date:** [October 19, 2022, 12:38pm UTC](https://forum.babylonjs.com/t/spritemanager-infinite-drawcalls-bug/34948/1 "2022-10-19T12:38:14Z")

</div>

Hello!

I might be dumb, and did something that I shouldn’t… but I found something that kills me and my fps.

I tried to solve it but with no success. basically what happens:  
You create a spritemanager, and you have any mesh that is active.  
then you scene.freezeActiveMeshes()  
now the spritemanager for some reason starts to create infinite drawcalls 🤔  
here is a repro: [Spritemanager bug Playground](https://playground.babylonjs.com/#1JBPTW)

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [October 19, 2022, 2:53pm UTC](https://forum.babylonjs.com/t/spritemanager-infinite-drawcalls-bug/34948/2 "2022-10-19T14:53:39Z")

</div>

Ohhhhh I ll have a look ASAP, it is indeed totally a bug !!!

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [October 19, 2022, 2:53pm UTC](https://forum.babylonjs.com/t/spritemanager-infinite-drawcalls-bug/34948/3 "2022-10-19T14:53:42Z")

</div>

Assigned @sebavan on October 19, 2022, 2:53pm UTC



---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [October 19, 2022, 4:27pm UTC](https://forum.babylonjs.com/t/spritemanager-infinite-drawcalls-bug/34948/4 "2022-10-19T16:27:28Z")

</div>

This will fix it in the next release: [Fix infinite sprites draw in frozen scenes by sebavan · Pull Request #13131 · BabylonJS/Babylon.js · GitHub](https://github.com/BabylonJS/Babylon.js/pull/13131)

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [October 19, 2022, 4:27pm UTC](https://forum.babylonjs.com/t/spritemanager-infinite-drawcalls-bug/34948/5 "2022-10-19T16:27:32Z")

</div>

Unassigned @sebavan on October 19, 2022, 4:27pm UTC


