Saiful
Saiful

Reputation: 1911

Application crash on ios6 but working fine in ios5

I have an application for audio/video call using SIP protocol.It working fine when i tried to make a call with ios5 device or used it on ios 5 device but it crash when i tried to call or use it on ios 6. It crash on only when i tried to make a video call with ios6 device to ios5 device. Crash message

Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [2.74665e-34 nan]'

Upvotes: 0

Views: 248

Answers (3)

Saiful
Saiful

Reputation: 1911

After analyzing my crash report and my code

*** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan 96]'

I found the bug. I am using a method which is override from another class but somehow it's not working in iOS 6 and that's why it return some zero value because of this zero value it returns nan value and it crashed.

Upvotes: 0

alemangui
alemangui

Reputation: 3655

It's hard to know what's wrong without more code, but here are my two cents: If you have a view (something like a UIWebView) in your code, and you are using the plain init method to initialize it, try changing it to initWithFrame to give it a frame right away. The problem might be that you are trying to use the element before a frame is allocated to it, thus resulting in a CALayerInvalidGeometry error.

Upvotes: 0

Aitul
Aitul

Reputation: 2992

Check this answer link Probably you are calculating the value of some frame and it is a NaN (not a number). For SIP calls the best is iDoubs, a very easy API

Upvotes: 2

Related Questions