When I set a RenderTexture instance as the mask of another RenderTexture, failed

I create a renderTexture, and drawFrame something on this renderTexture, then I make another renderTexture, and want to set this renderTexture to be the mask of the former, but the console output

Uncaught TypeError: Cannot read property 'loadIdentity' of undefined
    at GraphicsWebGLRenderer [as renderWebGL] (phaser.js:143312)
// code like 
let A = this.add.renderTexture( x, y, width, height );
A.drawFrame( key, frame );
let B = this.make.renderTexture( { x, y, width, height } );
A.setMask( B.createBitmapMask() )