使用消息ViewController respondsToSelector崩溃应用程序:发送到解除分配的实例的消息 [英] Crashing application with message ViewController respondsToSelector: message sent to deallocated instance

查看:116
本文介绍了使用消息ViewController respondsToSelector崩溃应用程序:发送到解除分配的实例的消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用以下代码在readerview中打开pdf

Trying to open a pdf in readerview with below code

self.appDelegate.window.rootViewController.modalPresentationStyle = UIModalPresentationCurrentContext;
                self.modalPresentationStyle = UIModalPresentationCurrentContext;
                dispatch_async(dispatch_get_main_queue(), ^{
                    [self.appDelegate.aNavController presentViewController:downloadView animated:NO completion:nil];
                });

它在iPhone上工作正常,但在iPad上无效,显示:

It's working fine on iPhone but not working on iPad, showing:


ViewController respondsToSelector:发送到解除分配的
实例的消息。

ViewController respondsToSelector: message sent to deallocated instance.

从方案中启用zombie后出现此类错误

After enabling zombie from scheme getting this kind of error

0x655d799 <+777>:  jmp    0x655d89e                 ; <+1038>
    0x655d79e <+782>:  movl   %edi, (%esp)
    0x655d7a1 <+785>:  calll  0x668711c                 ; symbol stub for: class_getSuperclass
    0x655d7a6 <+790>:  movl   %eax, %edi
    0x655d7a8 <+792>:  movl   %ebx, (%esp)
    0x655d7ab <+795>:  calll  0x668721e                 ; symbol stub for: object_getClassName
    0x655d7b0 <+800>:  movl   %eax, %esi
    0x655d7b2 <+802>:  testl  %edi, %edi
    0x655d7b4 <+804>:  jne    0x655d7d7                 ; <+839>
    0x655d7b6 <+806>:  movl   %ebx, %edi
    0x655d7b8 <+808>:  movl   %edi, (%esp)
    0x655d7bb <+811>:  calll  0x668721e                 ; symbol stub for: object_getClassName
    0x655d7c0 <+816>:  movl   %eax, 0x10(%esp)
    0x655d7c4 <+820>:  movl   %esi, 0xc(%esp)
    0x655d7c8 <+824>:  movl   %edi, 0x8(%esp)
    0x655d7cc <+828>:  movl   -0x14(%ebp), %eax
    0x655d7cf <+831>:  leal   0x3028fa(%eax), %eax
    0x655d7d5 <+837>:  jmp    0x655d7ea                 ; <+858>
    0x655d7d7 <+839>:  movl   %esi, 0xc(%esp)
    0x655d7db <+843>:  movl   %ebx, %edi
    0x655d7dd <+845>:  movl   %edi, 0x8(%esp)
    0x655d7e1 <+849>:  movl   -0x14(%ebp), %eax
    0x655d7e4 <+852>:  leal   0x30290a(%eax), %eax
    0x655d7ea <+858>:  movl   %eax, 0x4(%esp)
    0x655d7ee <+862>:  movl   $0x4, (%esp)
    0x655d7f5 <+869>:  calll  0x65a94a0                 ; CFLog
    0x655d7fa <+874>:  movl   %edi, %ebx
    0x655d7fc <+876>:  movl   -0x10(%ebp), %esi
    0x655d7ff <+879>:  movl   %esi, (%esp)
    0x655d802 <+882>:  calll  0x668723c                 ; symbol stub for: sel_getName
    0x655d807 <+887>:  movl   %eax, %edi
    0x655d809 <+889>:  movl   %edi, (%esp)
    0x655d80c <+892>:  calll  0x6687242                 ; symbol stub for: sel_getUid
    0x655d811 <+897>:  cmpl   %esi, %eax
    0x655d813 <+899>:  je     0x655d83d                 ; <+941>
    0x655d815 <+901>:  movl   %eax, 0x10(%esp)
    0x655d819 <+905>:  movl   %edi, 0xc(%esp)
    0x655d81d <+909>:  movl   -0x10(%ebp), %eax
    0x655d820 <+912>:  movl   %eax, 0x8(%esp)
    0x655d824 <+916>:  movl   -0x14(%ebp), %eax
    0x655d827 <+919>:  leal   0x30291a(%eax), %eax
    0x655d82d <+925>:  movl   %eax, 0x4(%esp)
    0x655d831 <+929>:  movl   $0x4, (%esp)
    0x655d838 <+936>:  calll  0x65a94a0                 ; CFLog
    0x655d83d <+941>:  movl   %ebx, (%esp)
    0x655d840 <+944>:  calll  0x6687218                 ; symbol stub for: object_getClass
    0x655d845 <+949>:  movl   -0x14(%ebp), %ecx
    0x655d848 <+952>:  movl   0x2eb65e(%ecx), %esi
    0x655d84e <+958>:  movl   %esi, 0x4(%esp)
    0x655d852 <+962>:  movl   %eax, (%esp)
    0x655d855 <+965>:  calll  0x6687128                 ; symbol stub for: class_respondsToSelector
    0x655d85a <+970>:  testb  %al, %al
    0x655d85c <+972>:  jne    0x655d88a                 ; <+1018>
    0x655d85e <+974>:  movl   %ebx, (%esp)
    0x655d861 <+977>:  calll  0x668721e                 ; symbol stub for: object_getClassName
    0x655d866 <+982>:  movl   %eax, 0xc(%esp)
    0x655d86a <+986>:  movl   %ebx, 0x8(%esp)
    0x655d86e <+990>:  movl   -0x14(%ebp), %eax
    0x655d871 <+993>:  leal   0x30292a(%eax), %eax
    0x655d877 <+999>:  movl   %eax, 0x4(%esp)
    0x655d87b <+1003>: movl   $0x4, (%esp)
    0x655d882 <+1010>: calll  0x65a94a0                 ; CFLog
    0x655d887 <+1015>: int3   
    0x655d888 <+1016>: jmp    0x655d89e                 ; <+1038>
    0x655d88a <+1018>: movl   -0x10(%ebp), %eax
    0x655d88d <+1021>: movl   %eax, 0x8(%esp)
    0x655d891 <+1025>: movl   %esi, 0x4(%esp)
    0x655d895 <+1029>: movl   %ebx, (%esp)
    0x655d898 <+1032>: calll  0x66871b2                 ; symbol stub for: objc_msgSend
    0x655d89d <+1037>: int3   
    0x655d89e <+1038>: calll  0x6687680                 ; symbol stub for: getpid
    0x655d8a3 <+1043>: movl   %eax, (%esp)
    0x655d8a6 <+1046>: movl   $0x9, 0x4(%esp)
    0x655d8ae <+1054>: calll  0x66876da                 ; symbol stub for: kill
    0x655d8b3 <+1059>: nopw   %cs:(%eax,%eax)

使用仪器来获得这种东西。任何人都可以帮我找出确切问题的位置

Using instrumentation getting this kind of thing. can anyone help me figure out where is the exact issue

图片

推荐答案

我想我解决了这个问题,希望这个解决方案可以帮助别人。

I think i solved the issue, hope this solution help others.

- (void)viewWillDisappear:(BOOL)animated {
     SpeakerDescriptionTableCell *cell =(SpeakerDescriptionTableCell *)localObjCell;
     [cell.descriptionWebView stopLoading];
     [cell.descriptionWebView setDelegate:nil];
     cell.descriptionWebView = nil;
}

这篇关于使用消息ViewController respondsToSelector崩溃应用程序:发送到解除分配的实例的消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆