开发者

NSInvalidArgumentException caused by "<null selector>"

we have an iPhone app in the app store where we see a lot of crashes after an update. These crashes did not occure when testing it before submiting it to the app store and we cannot reproduce the crash on our own devices.

Heres the crash message we get:

'NSInvalidArgum开发者_高级运维entException', reason: '*** -[MessageHeader ]:unrecognized selector sent to instance 0x4551450'

The source that causes this message is:

[self fireDelegateIfRegisteredMessageId:header.messageID andMessage:message];

The only place where MessageHeader is referenced is "header.messageID" but I am wondering how this selector would become nil. Also that same statement is used on various places above this line and it worked there.

What could cause this problem? Espacility what could cause an selector to become nil except the following code?

SEL selectorTest = nil;
[self performSelector:selectorTest]


I had a similar problem. My problem was a buffer overflow shortly before the line who caused the exception. It was some quick and dirt feature adding and forgot to check it thoroughly.

I used to write 16 Bytes in a 8 Bytes big buffer. The exception uccured only on device and not in simulator or debug builds. It was really an anoying bug.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜