开发者

Strange crashes on startup inside CCSprite's -draw method

I got an iPhone application using Cocos2d (version: #define COCOS2D_VERSION 0x00010000). It works ok on my iPad and iPhone, as well as on various iPhones I tested it on.

But on one (3G) it keeps crashing every time during initialization - the crash log shows the problem in CCSprite.m file, in the -draw method - in this line开发者_运维百科:

// tex coords
diff = offsetof( ccV3F_C4B_T2F, texCoords);
glTexCoordPointer(2, GL_FLOAT, kQuadSize, (void*)(offset + diff)); // This line crashes

The crashlog shows the following:

OS Version:      iPhone OS 4.2.1 (8C148)
Report Version:  104

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00000004
Crashed Thread:  0

Thread 0 Crashed:
0   MBXGLEngine                     0x302554e8 0x30229000 + 181480
1   MBXGLEngine                     0x30256980 0x30229000 + 186752
2   MBXGLEngine                     0x3022ca80 0x30229000 + 14976
3   MBXGLEngine                     0x30252580 0x30229000 + 169344
4   S100                            0x000342d8 -[CCSprite draw] (CCSprite.m:606)
5   S100                            0x00023e74 -[CCNode visit] (CCNode.m:550)
6   S100                            0x00023e14 -[CCNode visit] (CCNode.m:535)
7   S100                            0x00023e50 -[CCNode visit] (CCNode.m:545)
8   S100                            0x00048500 -[CCDirectorIOS drawScene] (CCDirectorIOS.m:169)
9   Foundation                      0x35168eda 0x35151000 + 98010
10  Foundation                      0x35168d5e 0x35151000 + 97630
11  S100                            0x0004ad38 -[EAGLView layoutSubviews] (EAGLView.m:214)


What's the size of the texture? On older device it cannot be more than 1024x1024.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜