I have a non-arc project. Within my project, I have enabled arc in a few ViewControllers using -fobjc-arc
. If I call popToRootViewControllerAnimated
from an arc enabled VC, I get a crash.. If I remove arc from that VC, then popToRootViewControllerAnimated
works fine but this time other things stops working.. What can I do? Thanks..
Asked
Active
Viewed 245 times
2

Tim Tuffley
- 605
- 1
- 6
- 20
-
1In your xCode Go Edit->Refactor->Convert to arc-> You should properly check & uncheck files which you need arc or not. – karthika Sep 27 '13 at 04:44
-
Can you please post some code ? So we can get idea what is the issue – Nirmalsinh Rathod Sep 27 '13 at 06:16
-
Nobody here can help with a crash unless you show the details of the crash. Where is the stack trace? What sort of crash is it? What line does it crash on? – jrturton Sep 27 '13 at 06:34
1 Answers
0
Not really an answer, but some suggested troubleshooting approaches:
Have you stepped through with a debugger and/or added logs statements showing the process as you pop? It could be that an object needs to be marked with the modifier:
__autoreleasing
. . typically this is implicit, but there's a few situations where it needs to be explicit.
Also try setting NSZombieEnabled on your scheme, so show which object is being messaged after it has been released - the problem is likely to be a dangling pointer.
Do you have any 'assign' or __unsafe_unretained scoped properties? A subtle change in life-cycle may be exposing a problem here.

Jasper Blues
- 28,258
- 22
- 102
- 185