Xmppframework for iphone works fine on simulator but not on device?
I am trying to see how the xmppframework for iphone works. Everything working perfectly on the simulator but not on device. I get a EXC_BAD_ACCESS
after it receives the users thats are online.
Any ideas or 开发者_如何学Pythonhelp?
I have an iPhone 3G ios 4.2.1.
Got the same today with the iPhoneXMPP sample in the iOS simulator.
In XMPPStream.m line 1181, adding the following check seems to fix it for me :
if (myPresence!=presence)
{
[myPresence release];
myPresence = [presence retain];
}
From Apple documentation.
This kind of problem is usually the result of over-releasing an object. It can be very confusing, since the failure tends to occur well after the mistake is made. The crash can also occur while the program is deep in framework code, often with none of your own code visible in the stack.
More
Check the below SO post
EXC_BAD_ACCESS signal received
How do i resolve EXC_BAD_ACCESS errors encountered in iphone development
how to debug EXC_BAD_ACCESS on iPhone
精彩评论