title: Enabling debug draw on CCPhysicsNode causes crash
body: <p>Versions: Cocos2D V3.4, Xcode 7.2.1, SpriteBuilder 1.4.9.</p>
  
  <p>You can download my project <a href="https://github.com/ud230688/SpaceShooter.spritebuilder.git" rel="nofollow">here</a>. It was created with SpriteBuilder.</p>
  
  <p>Enabling debug draw on CCPhysicsNode causes a crash:</p>
  
  <pre><code>CCPhysicsNode *_physicsWorld;
  
  
  _physicsWorld = [CCPhysicsNode node];
  _physicsWorld.gravity = ccp(0,0);
  _physicsWorld.debugDraw = YES;//if debugDraw set to NO, crash will not occur, it happens only when its set to YES
  _physicsWorld.collisionDelegate = self;
  [_scene addChild:_physicsWorld];
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>Assertion failure in -[CCRenderStateGL
    initWithBlendMode:shader:shaderUniforms:copyUniforms:]</p>
  </blockquote>
  
  <p>My code to add physics body to the CCSprite:</p>
  
  <pre><code>  _PlayerSprite.physicsBody = [CCPhysicsBody bodyWithRect:(CGRect){CGPointZero, _PlayerSprite.contentSize} cornerRadius:0]; // 1 
  
    _PlayerSprite.physicsBody.collisionGroup = @"playerGroup"; // 2
  
    [_PhysicsWorld addChild:lobjPlayerSprite
                          z:Z_ORDER_PLAYERS];
  </code></pre>
  
  <p>Then code crashes at <code>CCRendererBasicTypes initWithBlendMode</code>:</p>
  
  <pre><code>-(instancetype)initWithBlendMode:(CCBlendMode *)blendMode shader:(CCShader *)shader shaderUniforms:(NSDictionary *)shaderUniforms copyUniforms:(BOOL)copyUniforms
  
  crashes here:-
  NSAssert(shader, @"CCRenderState: Shader is nil");
  </code></pre>