gpt4 book ai didi

Main.m 中的 iOS SIGABRT(提供回溯)

转载 作者:行者123 更新时间:2023-11-28 17:39:54 25 4
gpt4 key购买 nike

在 main.m 中获取 SIGABRT 错误。我已经从控制台列出了回溯跟踪,以查看是否有人可以为我指明正确的方向。

#0  0x94d77c5a in __kill ()
#1 0x94d77c4c in kill$UNIX2003 ()
#2 0x94e0a5a5 in raise ()
#3 0x94e206e4 in abort ()
#4 0x94d9cb1b in _Unwind_Resume ()
#5 0x012abe39 in CFRunLoopRunSpecific ()
#6 0x012abccb in CFRunLoopRunInMode ()
#7 0x002c12a7 in -[UIApplication _run] ()
#8 0x002c2a9b in UIApplicationMain ()
#9 0x000028d9 in main (argc=1, argv=0xbfffec90) at / Users/user-
name/Desktop/ProjectFive/ProjectFive/ProjectFive/main.m:20
#10 0x00002825 in start ()

这是我能够复制的核心转储信息。 SIGABRT 发生在我的 main.m 中的自动释放语句中

NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil,
NSStringFromClass([ProjectFiveAppDelegate class]));
[pool release];
return retVal;

...

0x002c297f  <+0891>  mov    %eax,(%esp)
0x002c2982 <+0894> call 0x75d8b2 <dyld_stub_objc_msgSend>
0x002c2987 <+0899> mov %eax,%esi
0x002c2989 <+0901> mov 0x69940e(%edi),%eax
0x002c298f <+0907> mov 0x68db46(%edi),%ecx
0x002c2995 <+0913> lea 0x525009(%edi),%edx
0x002c299b <+0919> mov %edx,0x8(%esp)
0x002c299f <+0923> mov %ecx,0x4(%esp)
0x002c29a3 <+0927> mov %eax,(%esp)
0x002c29a6 <+0930> call 0x75d8b2 <dyld_stub_objc_msgSend>
0x002c29ab <+0935> mov 0x68df86(%edi),%ecx
0x002c29b1 <+0941> mov %ebx,0x18(%esp)
0x002c29b5 <+0945> lea 0x6a6c56(%edi),%edx
0x002c29bb <+0951> mov %edx,0x14(%esp)
0x002c29bf <+0955> mov %eax,0xc(%esp)
0x002c29c3 <+0959> mov %esi,0x8(%esp)
0x002c29c7 <+0963> mov %ecx,0x4(%esp)
0x002c29cb <+0967> mov -0x18(%ebp),%eax
0x002c29ce <+0970> mov %eax,(%esp)
0x002c29d1 <+0973> movl $0x641,0x10(%esp)
0x002c29d9 <+0981> call 0x75d8b2 <dyld_stub_objc_msgSend>
0x002c29de <+0986> mov 0x699476(%edi),%eax
0x002c29e4 <+0992> mov 0x68db72(%edi),%ecx
0x002c29ea <+0998> mov %ecx,0x4(%esp)
0x002c29ee <+1002> mov %eax,(%esp)
0x002c29f1 <+1005> call 0x75d8b2 <dyld_stub_objc_msgSend>
0x002c29f6 <+1010> mov 0x68df92(%edi),%ecx
0x002c29fc <+1016> mov %eax,0x8(%esp)
0x002c2a00 <+1020> mov %ecx,0x4(%esp)
0x002c2a04 <+1024> mov -0x10(%ebp),%esi
0x002c2a07 <+1027> mov %esi,(%esp)
0x002c2a0a <+1030> call 0x75d8b2 <dyld_stub_objc_msgSend>
0x002c2a0f <+1035> mov 0x6d0fbe(%edi),%ebx
0x002c2a15 <+1041> test %al,%al
0x002c2a17 <+1043> je 0x2c2a2c <UIApplicationMain+1064>
0x002c2a19 <+1045> mov 0x68dbb6(%edi),%eax
0x002c2a1f <+1051> mov %ebx,0x8(%esp)
0x002c2a23 <+1055> mov %eax,0x4(%esp)
0x002c2a27 <+1059> mov %ebx,(%esp)
0x002c2a2a <+1062> jmp 0x2c2a69 <UIApplicationMain+1125>
0x002c2a2c <+1064> mov 0x68dc0a(%edi),%eax
0x002c2a32 <+1070> mov %eax,0x4(%esp)
0x002c2a36 <+1074> mov %esi,(%esp)
0x002c2a39 <+1077> call 0x75d8b2 <dyld_stub_objc_msgSend>
0x002c2a3e <+1082> mov 0x68dcba(%edi),%ecx
0x002c2a44 <+1088> mov %ecx,0x4(%esp)
0x002c2a48 <+1092> mov %eax,(%esp)
0x002c2a4b <+1095> call 0x75d8b2 <dyld_stub_objc_msgSend>
0x002c2a50 <+1100> mov 0x68df96(%edi),%ecx
0x002c2a56 <+1106> mov %eax,0x8(%esp)
0x002c2a5a <+1110> mov %ecx,0x4(%esp)
0x002c2a5e <+1114> mov %ebx,(%esp)
0x002c2a61 <+1117> movl $0x1,0xc(%esp)
0x002c2a69 <+1125> call 0x75d8b2 <dyld_stub_objc_msgSend>
0x002c2a6e <+1130> mov 0x68db22(%edi),%eax
0x002c2a74 <+1136> mov %eax,0x4(%esp)
0x002c2a78 <+1140> mov -0x14(%ebp),%eax
0x002c2a7b <+1143> mov %eax,(%esp)
0x002c2a7e <+1146> call 0x75d8b2 <dyld_stub_objc_msgSend>
0x002c2a83 <+1151> mov 0x6d0fbe(%edi),%eax
0x002c2a89 <+1157> mov 0x68df9a(%edi),%ecx
0x002c2a8f <+1163> mov %ecx,0x4(%esp)
0x002c2a93 <+1167> mov %eax,(%esp)
0x002c2a96 <+1170> call 0x75d8b2 <dyld_stub_objc_msgSend>
0x002c2a9b <+1175> xor %eax,%eax
0x002c2a9d <+1177> add $0x2c,%esp
0x002c2aa0 <+1180> pop %esi
0x002c2aa1 <+1181> pop %edi
0x002c2aa2 <+1182> pop %ebx
0x002c2aa3 <+1183> pop %ebp
0x002c2aa4 <+1184> ret

最佳答案

这可能是未捕获异常的结果。您应该尝试使用以下方法之一来追踪问题:

  1. 分析接近失败的源代码
  2. 一个源代码调试器(将其设置为在异常抛出时中断)
  3. Coverity Static Analysis、Clang Static Analyzer 等静态检查器,或者只是启动编译器警告
  4. 动态检查器,如 Electric Fence、Klee 或 valgrind (helgrind/memcheck)

关于Main.m 中的 iOS SIGABRT(提供回溯),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8571634/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com