如何解决 - [CFString release]:消息发送到解除分配的实例0x2426ecf0错误

时间:2015-01-12 06:44:12

标签: ios objective-c memory-management

我的应用程序因错误而崩溃

- [CFString release]:发送到解除分配的实例0x2426ecf0的消息。

这是后面的痕迹。请帮助我如何找到崩溃的位置。

* thread #6: tid = 0x12654, 0x02d84811 CoreFoundation`___forwarding___ + 769, queue = 'NSOperationQueue 0xb730470, stop reason = EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0)
    frame #0: 0x02d84811 CoreFoundation`___forwarding___ + 769
    frame #1: 0x02d844ee CoreFoundation`_CF_forwarding_prep_0 + 14
    frame #2: 0x02385e97 libobjc.A.dylib`objc_release + 71
    frame #3: 0x02386ce7 libobjc.A.dylib`(anonymous namespace)::AutoreleasePoolPage::pop(void*) + 537
    frame #4: 0x02d359d8 CoreFoundation`_CFAutoreleasePoolPop + 24
    frame #5: 0x00730b88 Foundation`-[__NSOperationInternal _start:] + 958
    frame #6: 0x006ad798 Foundation`-[NSOperation start] + 83
    frame #7: 0x00732d34 Foundation`__NSOQSchedule_f + 62
    frame #8: 0x025ca4b0 libdispatch.dylib`_dispatch_client_callout + 14
    frame #9: 0x025b7034 libdispatch.dylib`_dispatch_async_redirect_invoke + 202
    frame #10: 0x025ca4b0 libdispatch.dylib`_dispatch_client_callout + 14
    frame #11: 0x025b8ef1 libdispatch.dylib`_dispatch_root_queue_drain + 287
    frame #12: 0x025b913d libdispatch.dylib`_dispatch_worker_thread2 + 39
    frame #13: 0x02986dab libsystem_pthread.dylib`_pthread_wqthread + 336

1 个答案:

答案 0 :(得分:0)

您可能已经为实例分配了autorelease以及为其分配值之前发布的原因。

找出该实例的autorelease或跟踪其release

  

cell = [[[UITableViewCell alloc]   initWithStyle:UITableViewCellStyleDefault   reuseIdentifier:CellIdentifier] autorelease];

     

[控制器发布];