CC2.4.6 few troubles with Mask?

hi all!
we have update our game to CC2.4.6 (from 2.4.5) and we have many trouble with cc.Mask.

  1. the mask that we use to close level, map etc… is not any more visible (dont’ works)
  2. if we try to load mask with cc.resource inside a prefab, after destroy this prefab, the game crash because mask try to destroy the image used for stencil but is null…

Other trouble: we have try create an empty project with a mask but chrome don’t see cc.resource :open_mouth: (in attach the projet to verify this)

Thanks in advance for any help! (for now we have come back to 2.4.5)


project: Dropbox - - Simplify your life

nothing? :blush:

I have asked engineering to review this topic.

In this demo, you call cc.resources, but the prefab is not under the resources folder, so it doesn’t load the prefab, so you need to create a new resources folder.
Also the test did not crash, is it necessary to package it for a specific platform?

mmm… yes sorry for missing folder. Yes, the little project works, but I think because I had made directly inside 2.4.6… The trouble exits when I import the project from 2.4.5 to 2.4.6 I attached an image to see it. :frowning: now I try to make a sample in 2.4.5 and import in 2.4.6 to reproduce it.

Thanks for support!


Hi @Koei, I don’t reproduce with a new project the trouble :sweat_smile:
The crash is that this._callbackTable is null and the app find key:‘load’. is there a reason why _callbackTable could be null? so I could be indagate with debugger…

Thanks for support!


p.s. @Koei if you want we could move the conversation in PM.

Hi @Koei , maybe I think found the trouble!
I load the prefab in this mode:

        cc.resources.load(file, cc.Prefab, function(err, prefab){

            if(err !== null && err !== undefined) {
                self.state = self.State.ActiveEnemies;

   = cc.instantiate(prefab);
   = prefab;

                cc.assetManager.releaseAsset(; // <---- ERROR?
            }, scope:this}); 

            self.isEnabled = true;

the prefabs has a autodestroy with a callback and inside it we call cc.assetManager.releaseAsset to remove the prefab load. Is this wrong? (use cc.assetManager.releaseAsset).
On 2.4.5 this don’t generates the trouble.


Can you provide a demo to see the problem in detail?

the sample (410.9 KB)

Thanks for support!


You should release the resource after destroying it.

If the node is destroyed after it is released, there will be problems with resource checking and multiple destruction operations will be performed on the same component resource.

1 Like

Yep works!
Thanks for your support you were very kind!


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.