# \[Solved\]freezeAllActiveMeshes issues after upgrade to 4.1

**URL:** <https://forum.babylonjs.com/t/solved-freezeallactivemeshes-issues-after-upgrade-to-4-1/9062>\
**Category:** Questions\
**Tags:** material\
**Created:** [March 9, 2020, 7:13am UTC](https://forum.babylonjs.com/t/solved-freezeallactivemeshes-issues-after-upgrade-to-4-1/9062 "2020-03-09T07:13:23Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hersir](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/hersir/32/108_2.png) [@Hersir](https://forum.babylonjs.com/u/Hersir)\
**Post date:** [March 9, 2020, 7:13am UTC](https://forum.babylonjs.com/t/solved-freezeallactivemeshes-issues-after-upgrade-to-4-1/9062/1 "2020-03-09T07:13:24Z")

</div>

Hi,  
after upgrading to version 4.1 stable noticed issue with one of my materials.  
Its PBRMetalic material, that is transparent and uses global reflection texture, its used by cloned meshes

after calling freezeAllActiveMeshes on the scene, it turns black ands stays so until meshes are unfreezen.  
Was working with alpha versions.

Trying to find cause but maybe someone have idea in with direction to check? 🙂

Thank you

---

<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:** [March 9, 2020, 11:47am UTC](https://forum.babylonjs.com/t/solved-freezeallactivemeshes-issues-after-upgrade-to-4-1/9062/2 "2020-03-09T11:47:29Z")

</div>

Are you using multi scene ? I wonder if it could come from the BRDF texture.

Would be amazing if you could share a tiny PG with a repro so that I can fix it ASAP. It should definitely not do that.

---

<div class="post-metadata">

**Author:** ![Hersir](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/hersir/32/108_2.png) [@Hersir](https://forum.babylonjs.com/u/Hersir)\
**Post date:** [March 10, 2020, 6:22am UTC](https://forum.babylonjs.com/t/solved-freezeallactivemeshes-issues-after-upgrade-to-4-1/9062/3 "2020-03-10T06:22:08Z")

</div>

@sebavan will try to reproduce in PG, but for your answer, no multi scene is not used

---

<div class="post-metadata">

**Author:** ![Hersir](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/hersir/32/108_2.png) [@Hersir](https://forum.babylonjs.com/u/Hersir)\
**Post date:** [March 12, 2020, 2:33pm UTC](https://forum.babylonjs.com/t/solved-freezeallactivemeshes-issues-after-upgrade-to-4-1/9062/4 "2020-03-12T14:33:56Z")

</div>

Getting closer to isolate, its related to shadow generation.  
both meshes that are affected belong to shadow generator, and when I freeze meshes,  
I animate shadow light (SpotLight) intensity from 0 to 1, at that point they become black

---

<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:** [March 12, 2020, 2:45pm UTC](https://forum.babylonjs.com/t/solved-freezeallactivemeshes-issues-after-upgrade-to-4-1/9062/5 "2020-03-12T14:45:19Z")

</div>

Thanks for the heads up and I am pretty sure it is a bug ☹ I ll fix it in priority as soon as we have the repro.

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [March 12, 2020, 5:56pm UTC](https://forum.babylonjs.com/t/solved-freezeallactivemeshes-issues-after-upgrade-to-4-1/9062/6 "2020-03-12T17:56:14Z")

</div>

I tried to reproduce your problem but could not:

[https://playground.babylonjs.com/#P9T8KE](https://playground.babylonjs.com/#P9T8KE)

After 1s, the meshes are frozen, and after 1.2s the spot intensity is raised from 0 to 1 in ~ 1.5s

---

<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:** [March 12, 2020, 6:00pm UTC](https://forum.babylonjs.com/t/solved-freezeallactivemeshes-issues-after-upgrade-to-4-1/9062/7 "2020-03-12T18:00:28Z")

</div>

Can you try on 4.2 preview ???

---

<div class="post-metadata">

**Author:** ![Hersir](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/hersir/32/108_2.png) [@Hersir](https://forum.babylonjs.com/u/Hersir)\
**Post date:** [March 13, 2020, 6:57am UTC](https://forum.babylonjs.com/t/solved-freezeallactivemeshes-issues-after-upgrade-to-4-1/9062/8 "2020-03-13T06:57:11Z")

</div>

After animation is done I set `map.refreshRate = 0;` that’s when they become black, will try to find a way to reproduce in PG

---

<div class="post-metadata">

**Author:** ![Hersir](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/hersir/32/108_2.png) [@Hersir](https://forum.babylonjs.com/u/Hersir)\
**Post date:** [March 13, 2020, 7:05am UTC](https://forum.babylonjs.com/t/solved-freezeallactivemeshes-issues-after-upgrade-to-4-1/9062/9 "2020-03-13T07:05:31Z")

</div>

@Evgeni_Popov @sebavan

Managed to update your PG @Evgeni_Popov to reproduce

[PG](https://www.babylonjs-playground.com/#6BAMX2)

tested in Chrome

---

<div class="post-metadata">

**Author:** ![Hersir](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/hersir/32/108_2.png) [@Hersir](https://forum.babylonjs.com/u/Hersir)\
**Post date:** [March 13, 2020, 7:07am UTC](https://forum.babylonjs.com/t/solved-freezeallactivemeshes-issues-after-upgrade-to-4-1/9062/10 "2020-03-13T07:07:18Z")

</div>

Yes could not reproduce on safari, only on Chrome (Version 80.0.3987.132 (64 bit))  
OSX: Catalina 10.15.3

---

<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:** [March 13, 2020, 12:38pm UTC](https://forum.babylonjs.com/t/solved-freezeallactivemeshes-issues-after-upgrade-to-4-1/9062/11 "2020-03-13T12:38:04Z")

</div>

Thanks a lot for the repro !!! I am on it I will fix it ASAP

---

<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:** [March 13, 2020, 1:34pm UTC](https://forum.babylonjs.com/t/solved-freezeallactivemeshes-issues-after-upgrade-to-4-1/9062/12 "2020-03-13T13:34:30Z")

</div>

Just in case somebody else is looking into this, here is a min repro:  
[https://playground.babylonjs.com/#0NR8TY#5](https://playground.babylonjs.com/#0NR8TY#5)

Basically it looks like it only happens if we are first without refresh then freeze and then set back to no refresh. It is also just in PCF as the colorWrite flag looks like being incorrectly reseting the meshes who are thinking to be in a depth pre pass.

Obviously a bug but might take a bit of time to fix.

---

<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:** [March 13, 2020, 2:06pm UTC](https://forum.babylonjs.com/t/solved-freezeallactivemeshes-issues-after-upgrade-to-4-1/9062/13 "2020-03-13T14:06:08Z")

</div>

The fix should be in in a couple of hours 🙂 thanks again for your report.

---

<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:** [March 13, 2020, 4:09pm UTC](https://forum.babylonjs.com/t/solved-freezeallactivemeshes-issues-after-upgrade-to-4-1/9062/14 "2020-03-13T16:09:22Z")

</div>

Ok due to meetings and other stuff I can not avoid (parent teacher meeting due to the virus…) those two hours will probably transform in a bit more, but I will try to have it by end of day in the US, sorry for the delay.

---

<div class="post-metadata">

**Author:** ![PirateJC](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/piratejc/32/1003_2.png) [@PirateJC](https://forum.babylonjs.com/u/PirateJC)\
**Post date:** [March 13, 2020, 5:59pm UTC](https://forum.babylonjs.com/t/solved-freezeallactivemeshes-issues-after-upgrade-to-4-1/9062/15 "2020-03-13T17:59:30Z")

</div>

On behalf of everyone in the Babylon community, NO APOLOGIES NECESSARY Seb!!!

You are a rockstar and we all love you!

---

<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:** [March 13, 2020, 9:21pm UTC](https://forum.babylonjs.com/t/solved-freezeallactivemeshes-issues-after-upgrade-to-4-1/9062/16 "2020-03-13T21:21:13Z")

</div>

All fixed pushing a new nightly in about 10 minutes, sorry again for the delay.

---

<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:** [March 13, 2020, 9:46pm UTC](https://forum.babylonjs.com/t/solved-freezeallactivemeshes-issues-after-upgrade-to-4-1/9062/17 "2020-03-13T21:46:40Z")

</div>

All deployed !!!

---

<div class="post-metadata">

**Author:** ![Hersir](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/hersir/32/108_2.png) [@Hersir](https://forum.babylonjs.com/u/Hersir)\
**Post date:** [March 16, 2020, 6:45am UTC](https://forum.babylonjs.com/t/solved-freezeallactivemeshes-issues-after-upgrade-to-4-1/9062/18 "2020-03-16T06:45:23Z")

</div>

Thank you for your quick work, will test out as soon as npm version will be created 🙂  
And no apologies needed as this is way quicker then most enterprise/paid engine support is doing 😃
