title: A crash at int retVal = UIApplicationMain(argc, argv, nil, @"AppController"); in cocos2dx 2.2.3
body: <p>My code snippet as follow:</p>
  
  <pre><code>void HelloWorld::gameOver()
  {
  CCDirector *pDirector=CCDirector::sharedDirector();
  pDirector-&gt;getTouchDispatcher()-&gt;removeAllDelegates();
  
  this-&gt;stopAllActions();
  
  this-&gt;unscheduleUpdate();
  this-&gt;unscheduleAllSelectors();
  
  CCSize visibleSize = CCDirector::sharedDirector()-&gt;getVisibleSize();
  CCPoint origin = CCDirector::sharedDirector()-&gt;getVisibleOrigin();
  
  auto spriteEndbg1 = CCSprite::create("engbg1136.png");
  spriteEndbg1-&gt;setPosition(CCPoint(visibleSize.width/2, visibleSize.height/2));
  this-&gt;addChild(spriteEndbg1, 5);
  
  auto spriteTop = CCSprite::create("gameover.png");
  spriteTop-&gt;setPosition(CCPoint(visibleSize.width/2, visibleSize.height-200));
  this-&gt;addChild(spriteTop, 5);
  
  //score
  auto scorebg = CCSprite::create("endtextbg.png");
  scorebg-&gt;setPosition(CCPoint(visibleSize.width/2, visibleSize.height-350));
  this-&gt;addChild(scorebg, 5);
  char *str = new char(5);
  sprintf(str, "您的得分为：%d", scodeNum);
  std::string strScore = str;
  CCLabelTTF* pLabel = CCLabelTTF::create(str, "Arial", 50);
  pLabel-&gt;setPosition(ccp(origin.x + visibleSize.width/2,
                          origin.y + visibleSize.height - pLabel-&gt;getContentSize().height));
  this-&gt;addChild(pLabel, 5);
  
  //try again
  auto tyrAgainbg = CCSprite::create("endtextbg.png");
  tyrAgainbg-&gt;setPosition(CCPoint(visibleSize.width/2, 300));
  this-&gt;addChild(tyrAgainbg, 5);
  CCMenuItemFont::setFontName("American Typewriter");
  CCMenuItemFont::setFontSize(60);
  auto closeItem = CCMenuItemFont::create("ReStart", this,
                                          menu_selector(HelloWorld::restartFn));
  
  closeItem-&gt;setPosition(CCPoint(visibleSize.width/2, 300));
  auto menu = CCMenu::create(closeItem,NULL);
  menu-&gt;setPosition(ccp(0,0));
  this-&gt;addChild(menu, 5);
  }
  </code></pre>
  
  <p>When my project after run this function a crash appear at </p>
  
  <pre><code>int retVal = UIApplicationMain(argc, argv, nil, @"AppController");
  </code></pre>
  
  <p>It is strange that argv is null.</p>
  
  <p>The stack information shown at follow:</p>
  
  <p><img src="https://i.stack.imgur.com/b913i.png" alt="enter image description here"></p>
  
  <p>Anyone has encounter this kind of question?</p>