[英]What does misaligned_stack_error_ mean?
I have some crashes with misaligned_stack_error_ after migration to new cocos2d-iphone version(3.1). 迁移到新的cocos2d-iphone版本(3.1)后,我因misaligned_stack_error_崩溃。 One harmless line crashes my code:
ccColor3B colorPH = [[self node].color ccColor3b];
一条无害的
ccColor3B colorPH = [[self node].color ccColor3b];
我的代码崩溃: ccColor3B colorPH = [[self node].color ccColor3b];
What can be reason of this crash? 崩溃的原因可能是什么? What does misaligned_stack_error_ mean?
misaligned_stack_error_是什么意思?
I've found the reason. 我找到了原因。 As I've already said I migrated to new cocos2d version.
正如我已经说过的,我迁移到了新的cocos2d版本。 In my old code I had a method in category for CCNode.
在我的旧代码中,我有一个CCNode类别中的方法。 It returns structure:
它返回结构:
-(ccColor3B)color
{
return (ccColor3B){255,255,255};
}
But it the new cocos2d version developers added new property in CCNode that calls color
too but returns object(CCColor*). 但是,新的cocos2d版本开发人员在CCNode中添加了新属性,该属性也调用了
color
但返回了object(CCColor *)。 Thanks! 谢谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.