cocos2d / cocos2d-x

Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.
https://www.cocos.com/en/cocos2d-x
18.24k stars 7.06k forks source link

Crash when using debug prebuilt libs #17348

Open SASkievua opened 7 years ago

SASkievua commented 7 years ago

do:

  1. cocos gen-libs -c -p win32 -m debug
  2. cocos gen-templates
  3. cocos new project -p com.company.project -l cpp -t binary

then open-compile-run project in vs2015 project will crash on first cocos function call with std::string parameter VS show this parameter in that cocos function as "Error reading characters of string"

everything ok when using release version of prebuilt libs

dumganhar commented 7 years ago

Could you upload more detailed log about the crash?

SASkievua commented 7 years ago

i don't know where cocos crash log is here some screenshots

crash happened on first call with string parameter screenshot - 13 02 2017 22_42_40

exception thrown in setViewName function and VS can't show string characters screenshot - 13 02 2017 22_45_04

Andrii-Ishchenko commented 7 years ago

Have the same issue and dont know how to handle it. Just did what said in this tutorial http://www.cocos2d-x.org/docs/editors_and_tools/cocosCLTool/ .

dumganhar commented 7 years ago

@natural-law, please take a look at this issue. Thanks.

natural-law commented 7 years ago

@SASkievua Please don't use command cocos gen-templates anymore. In fact, it's a internal command for Cocos Studio usage. I'll remove the command later! @slackmoehrle Could you please update the documents to remove the binary-templates related information?

Sorry for the confusion!

SASkievua commented 7 years ago

@natural-law thanks for your replay! but how we are supposed to create new projects with precompiled libraries without corresponding template? there are no template for precompiled libraries in downloaded cocos2dx package