【问题标题】:XCode4 apps always crash on startup when debugging on device在设备上调试时,XCode4 应用程序总是在启动时崩溃
【发布时间】:2011-03-14 19:41:52
【问题描述】:

我刚刚完成了 XCode 4 的安装,遇到了一些麻烦。当我使用 IOS 4.2 在 iPad 上运行一个新项目时,该应用程序在启动之前就崩溃了。如果我然后单击该应用程序的图标,它会打开并运行得很好。是什么赋予了?为什么它不会通过调试器运行?在升级到版本 4 之前,我从未遇到过 XCode 的这些问题。

编辑:

我从控制台得到的错误如下所示:

GNU gdb 6.3.50-20050815 (Apple version gdb-1518) (Sat Feb 12 02:56:02 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=x86_64-apple-darwin --target=arm-apple-darwin".tty /dev/ttys001
warning: Unable to read symbols from "dyld" (prefix __dyld_) (not yet mapped into memory).
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2 (8C134)/Symbols/System/Library/Frameworks/UIKit.framework/UIKit (file not found).
warning: Unable to read symbols from "UIKit" (not yet mapped into memory).
warning: Unable to read symbols from "Foundation" (not yet mapped into memory).
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2 (8C134)/Symbols/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics (file not found).
warning: Unable to read symbols from "CoreGraphics" (not yet mapped into memory).
warning: Unable to read symbols from "libgcc_s.1.dylib" (not yet mapped into memory).
warning: Unable to read symbols from "libSystem.B.dylib" (not yet mapped into memory).
warning: Unable to read symbols from "libobjc.A.dylib" (not yet mapped into memory).
warning: Unable to read symbols from "CoreFoundation" (not yet mapped into memory).
target remote-mobile /tmp/.XcodeGDBRemote-832-35
Switching to remote-macosx protocol
mem 0x1000 0x3fffffff cache
mem 0x40000000 0xffffffff none
mem 0x00000000 0x0fff none
[Switching to process 11523 thread 0x0]
[Switching to process 11523 thread 0x0]
gdb stack crawl at point of internal error:
0   gdb-arm-apple-darwin                0x000000010010974a internal_vproblem + 308
1   gdb-arm-apple-darwin                0x0000000100109924 internal_verror + 27
2   gdb-arm-apple-darwin                0x00000001001099c2 align_down + 0
3   gdb-arm-apple-darwin                0x0000000100150c5e macosx_solib_add + 794
4   gdb-arm-apple-darwin                0x000000010016417c remote_macosx_complete_create_or_attach + 187
5   gdb-arm-apple-darwin                0x000000010016489e remote_macosx_create_inferior + 1252
6   gdb-arm-apple-darwin                0x000000010005f6c3 run_command_1 + 586
7   gdb-arm-apple-darwin                0x0000000100107b7f execute_command + 557
8   gdb-arm-apple-darwin                0x00000001000171e7 mi_execute_async_cli_command + 204
9   gdb-arm-apple-darwin                0x00000001000168e5 captured_mi_execute_command + 344
10  gdb-arm-apple-darwin                0x0000000100072a62 catch_exception + 57
11  gdb-arm-apple-darwin                0x000000010001443e mi_execute_command + 140
12  gdb-arm-apple-darwin                0x0000000100077721 process_event + 133
13  gdb-arm-apple-darwin                0x0000000100078435 gdb_do_one_event + 1049
14  gdb-arm-apple-darwin                0x0000000100072b49 catch_errors + 70
/SourceCache/gdb/gdb-1518/src/gdb/macosx/macosx-nat-dyld.c:1648: internal-error: unrecognized shared library breakpoint
A problem internal to GDB has been detected,
further debugging may prove unreliable.

有什么想法吗?

【问题讨论】:

  • 当应用程序在启动时崩溃时,您会遇到什么错误(如果有)?你能分享调用堆栈吗?
  • 这看起来不像通常的崩溃,我猜是安装过程中出现的问题。要验证,请尝试运行一个苹果示例项目,如果以同样的方式失败,我建议卸载并重新安装 xcode。
  • 我也有同样的问题。在 Scheme 下拉菜单中,我有“我的 iPad(4.2,将 Base SDK 覆盖到 4.3)”,我尝试在 iTunes 中更新,但没有得到任何更新。

标签: ios ipad xcode4


【解决方案1】:

我刚刚尝试在我同事的 iPhone 上运行相同的项目,并且运行良好。所以我的 iPad 有问题。猜猜所有这些错误代码意味着我需要擦拭我的 iPad 并恢复。其他人有这种经历吗?

【讨论】:

  • 我买了一台 iPad 2,从那以后再也没有看到任何问题。所以我认为问题出在我的 iPad 上,也许我在某个地方搞砸了设置。
【解决方案2】:

我遇到了同样的问题,非常恼火,我开始在 Xcode4 周围寻找并尝试修复它。

我找到了解决此问题的方法,方法是单击设备选择下拉菜单并选择底部的编辑方案。 然后您将启动选项更改为“等待[您的应用名称在此处].app 启动

但是,当您运行时,您必须单击设备上的应用程序图标。每次。至少它有效。

祝你好运!

【讨论】:

  • 您不能使用此选项在模拟器上构建和运行。没发生什么事。就这么简单。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2013-04-04
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-07-29
  • 2023-02-14
  • 1970-01-01
相关资源
最近更新 更多