TMXTilemap remove tile errors?

Using the latest build of cocos2dx, I am unable to remove tiles, as I get a weird random error.

This is just a test, I will only want to remove some of the tiles, but for testing I was going to try removing near or all, but it crashes half way

@
for( int x= 0; x < s.width; x++)
{
for( int y= 0; y < s.height; y++ )
{
CCSprite * tile = pSoftblockLayer~~>tileAt );
pSoftblockLayer~~>removeChild(tile, true);

//pSoftblockLayer~~>setTileGID );
if
{
//pSoftblockLayer~~>removeSpriteFromAtlas(tile);
pSoftblockLayer~~>removeTileAt );
pSoftblockLayer~~>cleanup();
}
}
}
@

assert error is this:
void CCSpriteBatchNode::removeSpriteFromAtlas(CCSprite *pobSprite) { // remove from TextureAtlas m_pobTextureAtlas->removeQuadAtIndex(pobSprite->getAtlasIndex());