Objective-c error “-[CFString retain]: message sent to deallocated instance 0x4593540”

StackOverflow https://stackoverflow.com/questions/2588594

  •  24-09-2019
  •  | 
  •  

문제

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

도움이 되었습니까?

해결책

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).

Double releasing when it shouldn't be happening

Here's a helpful post about NSZombieEnabled

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top