所以我在这个非常奇怪和恼人的问题上被困了几天.所以我有一个应用程序,我发布到ios应用商店,我最近回去并为应用程序添加了一些额外的功能.我没有触摸应用程序的核心,只是添加了诸如twitter,facebook,app应用程序和google admob(基于完整版的免费版本).所以这里的事情变得奇怪.我测试了我的更新我做了一个adhoc发布版本并在我的iphone 3gs,4s,ipad 2上测试 - 没有任何问题.我提交给苹果他们批准了更新,它已经发布.我更新了应用程序并尝试运行它并在启动画面后立即崩溃(此处没有任何更改).我的项目使用cocos2dx框架(版本cocos2d-2.0-x-2.0.4 @ 2012年11月2日),我使用cocosbuilder(2.1).我查看了日志,它似乎是CCBReader :: readFloat()函数内部的一个未对齐问题.我发现这里有一个解决方法:https://github.com/DarraghCoy/cocos2d-x/commit/34b31fd754778f815fcac108089e3fe015e2e2b9.
所以我继续修改我的默认情况:float CCBReader :: readFloat(){unsigned char type = this-> readByte();
switch (type) {
case kCCBFloat0:
return 0;
case kCCBFloat1:
return 1;
case kCCBFloatMinus1:
return -1;
case kCCBFloat05:
return 0.5f;
case kCCBFloatInteger:
return (float)this->readInt(true);
default:
{
/* using a memcpy since the compiler isn't
* doing the float ptr math correctly on device.
* TODO still applies in C++ ? */
float * pF = (float*)(this->mBytes + this->mCurrentByte); …Run Code Online (Sandbox Code Playgroud)