views:

424

answers:

2

Im using phonegap and currently I have a webapp with php and javascript / html running inside of an iframe. It worked for a while but now it crashes with this error when I load the page

-[CFString retain]: message sent to deallocated instance 0x4593540

any ideas? thanks

+2  A: 

You have a retain count problem. From another Stack Overflow answer:

First, go back and reread the memory management rules just to make sure you are not missing anything obvious

Next, turn on NSZombieEnabled (in your executable settings, Arguments panel, add an environment variable NSZombieEnabled set to YES).

http://stackoverflow.com/questions/1060912/double-releasing-when-it-shouldnt-be-happening/1061641#1061641

Here's a helpful post about NSZombieEnabled

nevan
A: 

The static analyzer might find the issue (Build menu >> Build and Analyze).

Also, enable "Stop on Objective-C Exceptions" under the Run menu (activate breakpoints first). Then run the app and it will stop when it hits the exception. Then you can use the debugger to find the line where the error occurred.

macatomy