iOS设备因未知原因崩溃

时间:2011-08-25 19:15:01

标签: iphone ios cocoa-touch

我有一个应用程序可以访问互联网并收集XML文章数据并将其存储到核心数据中。然后它显示文章的表视图供用户阅读。该应用程序在模拟器上运行良好,并在从XCode启动时在设备上运行。但是,一旦XCode停止并且我尝试在设备上启动应用程序,它在启动后几乎立即崩溃。我只看到了闪屏。非常感谢任何帮助。

控制台:

Aug 25 15:08:54 unknown kernel[0] <Debug>: launchd[151] Builtin profile: container (sandbox)
Aug 25 15:08:54 unknown kernel[0] <Debug>: launchd[151] Container: /private/var/mobile/Applications/3ACA6B69-8164-4E25-B498-C1A2F2638A01 [69] (sandbox)
Aug 25 15:09:14 unknown SpringBoard[28] <Warning>: StoryStream failed to launch in time
Aug 25 15:09:14 unknown SpringBoard[28] <Warning>: Forcing crash report of StoryStream[151]...
Aug 25 15:09:14 unknown SpringBoard[28] <Warning>: Finished crash reporting.
Aug 25 15:09:14 unknown ReportCrash[153] <Error>: libMobileGestalt loadBasebandMobileEquipmentInfo: CommCenter error: 1:45
Aug 25 15:09:14 unknown ReportCrash[153] <Error>: libMobileGestalt copyInternationalMobileEquipmentIdentity: Could not get mobile equipment info dictionary
Aug 25 15:09:14 unknown ReportCrash[153] <Error>: libMobileGestalt copyInternationalMobileEquipmentIdentity: Could not get mobile equipment info dictionary
Aug 25 15:09:14 unknown ReportCrash[153] <Error>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/StoryStream_2011-08-25-150914_TEK-Michigan.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0
Aug 25 15:09:14 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.tekgroup.StoryStream[0x6840]) Exited: Killed: 9
Aug 25 15:09:14 unknown SpringBoard[28] <Warning>: Application 'StoryStream' exited abnormally with signal 9: Killed: 9
Aug 25 15:10:14 unknown SpringBoard[28] <Notice>: MultitouchHID(1cd6edd0) uilock state: 0 -> 1

崩溃日志:

Incident Identifier: 2873A36E-AA14-452E-8459-F7B4B8D3706B
CrashReporter Key:   8607552d3b54a0064e538e6f939016c503e31e8d
Hardware Model:      iPod4,1
Process:         StoryStream [151]
Path:            /var/mobile/Applications/3ACA6B69-8164-4E25-B498-C1A2F2638A01/StoryStream.app/StoryStream
Identifier:      StoryStream
Version:         ??? (???)
Code Type:       ARM (Native)
Parent Process:  launchd [1]

Date/Time:       2011-08-25 15:09:14.085 -0400
OS Version:      iPhone OS 4.3.5 (8L1)
Report Version:  104

Exception Type:  00000020
Exception Codes: 0x8badf00d
Highlighted Thread:  0

Application Specific Information:
StoryStream failed to launch in time

Elapsed total CPU time (seconds): 4.370 (user 1.690, system 2.680), 22% CPU 
Elapsed application CPU time (seconds): 3.110, 15% CPU

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0:
0   libsystem_kernel.dylib          0x364aac00 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x364aa758 mach_msg + 44
2   CoreFoundation                  0x34a112b8 __CFRunLoopServiceMachPort + 88
3   CoreFoundation                  0x34a13562 __CFRunLoopRun + 350
4   CoreFoundation                  0x349a3ebc CFRunLoopRunSpecific + 224
5   CoreFoundation                  0x349a3dc4 CFRunLoopRunInMode + 52
6   CFNetwork                       0x32b50a18 CFURLConnectionSendSynchronousRequest + 244
7   Foundation                      0x303bfa10 +[NSURLConnection sendSynchronousRequest:returningResponse:error:] + 76
8   Foundation                      0x3034b51a -[NSData(NSData) initWithContentsOfURL:] + 134
9   StoryStream                     0x00010896 -[DataManager loadMedia] (DataManager.m:583)
10  StoryStream                     0x0001201e -[DataManager verifyData] (DataManager.m:852)
11  StoryStream                     0x00002eb2 -[DigiWireCDAppDelegate loadDataObjects] (DigiWireCDAppDelegate.m:36)
12  StoryStream                     0x0000323c -[DigiWireCDAppDelegate application:didFinishLaunchingWithOptions:] (DigiWireCDAppDelegate.m:92)
13  UIKit                           0x3552481a -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 766
14  UIKit                           0x3551eb5e -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 266
15  UIKit                           0x354f37d0 -[UIApplication handleEvent:withNewEvent:] + 1108
16  UIKit                           0x354f320e -[UIApplication sendEvent:] + 38
17  UIKit                           0x354f2c4c _UIApplicationHandleEvent + 5084
18  GraphicsServices                0x30987e70 PurpleEventCallback + 660
19  CoreFoundation                  0x34a10a90 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 20
20  CoreFoundation                  0x34a12838 __CFRunLoopDoSource1 + 160
21  CoreFoundation                  0x34a13606 __CFRunLoopRun + 514
22  CoreFoundation                  0x349a3ebc CFRunLoopRunSpecific + 224
23  CoreFoundation                  0x349a3dc4 CFRunLoopRunInMode + 52
24  UIKit                           0x3551dd42 -[UIApplication _run] + 366
25  UIKit                           0x3551b800 UIApplicationMain + 664
26  StoryStream                     0x00002dd4 main (main.m:14)
27  StoryStream                     0x00002d7c start + 32

Thread 1:
0   libsystem_kernel.dylib          0x364ad3ec __workq_kernreturn + 8
1   libsystem_c.dylib               0x361dc6d8 _pthread_wqthread + 592
2   libsystem_c.dylib               0x361dcbbc start_wqthread + 0

Thread 2 name:  Dispatch queue: com.apple.libdispatch-manager
Thread 2:
0   libsystem_kernel.dylib          0x364adfbc kevent + 24
1   libdispatch.dylib               0x3664c032 _dispatch_mgr_invoke + 706
2   libdispatch.dylib               0x3664d03a _dispatch_queue_invoke + 86
3   libdispatch.dylib               0x3664c5ea _dispatch_worker_thread2 + 186
4   libsystem_c.dylib               0x361dc58a _pthread_wqthread + 258
5   libsystem_c.dylib               0x361dcbbc start_wqthread + 0

Thread 3 name:  WebThread
Thread 3:
0   libsystem_kernel.dylib          0x364aac00 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x364aa758 mach_msg + 44
2   CoreFoundation                  0x34a112b8 __CFRunLoopServiceMachPort + 88
3   CoreFoundation                  0x34a13562 __CFRunLoopRun + 350
4   CoreFoundation                  0x349a3ebc CFRunLoopRunSpecific + 224
5   CoreFoundation                  0x349a3dc4 CFRunLoopRunInMode + 52
6   WebCore                         0x35ac127e RunWebThread(void*) + 382
7   libsystem_c.dylib               0x361db30a _pthread_start + 242
8   libsystem_c.dylib               0x361dcbb4 thread_start + 0

Thread 4:
0   libsystem_kernel.dylib          0x364aac00 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x364aa758 mach_msg + 44
2   CoreFoundation                  0x34a112b8 __CFRunLoopServiceMachPort + 88
3   CoreFoundation                  0x34a13562 __CFRunLoopRun + 350
4   CoreFoundation                  0x349a3ebc CFRunLoopRunSpecific + 224
5   CoreFoundation                  0x349a3dc4 CFRunLoopRunInMode + 52
6   Foundation                      0x3033a7f6 +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:] + 206
7   Foundation                      0x3032d382 -[NSThread main] + 38
8   Foundation                      0x3039f5c6 __NSThread__main__ + 966
9   libsystem_c.dylib               0x361db30a _pthread_start + 242
10  libsystem_c.dylib               0x361dcbb4 thread_start + 0

Thread 5 name:  com.apple.CFSocket.private
Thread 5:
0   libsystem_kernel.dylib          0x364acc60 __select + 20
1   CoreFoundation                  0x34a168f2 __CFSocketManager + 582
2   libsystem_c.dylib               0x361db30a _pthread_start + 242
3   libsystem_c.dylib               0x361dcbb4 thread_start + 0

Unknown thread crashed with unknown flavor: 5, state_count: 1

Binary Images:
   0x48000 -    0x5ffff +StoryStream armv7  <8715997d8e5b32b0b9dd12163e790706> /var/mobile/Applications/3ACA6B69-8164-4E25-B498-C1A2F2638A01/StoryStream.app/StoryStream
0x2fe47000 - 0x2fe6cfff  dyld armv7  <4d3190188cbf32a8a73f32a8b5bb7adf> /usr/lib/dyld
0x301c5000 - 0x30276fff  WebKit armv7  <eb9a0d69c64b3127b2bffd71641add3b> /System/Library/PrivateFrameworks/WebKit.framework/WebKit
0x3027a000 - 0x3027ffff  libsystem_dnssd.dylib armv7  <f019bc513a6a37f4a79555b3ffb2a777> /usr/lib/system/libsystem_dnssd.dylib
0x303a7000 - 0x303a8fff  libremovefile.dylib armv7  <0fa08e1bb47a3d179072a933d1726597> /usr/lib/system/libremovefile.dylib
0x303ac000 - 0x303acfff  Accelerate armv7  <7d5ad465049136afaa1f0d89aac600bc> /System/Library/Frameworks/Accelerate.framework/Accelerate
0x303d6000 - 0x3040efff  IOKit armv7  <80ae313ad69d3363935c88e51a11862d> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x3040f000 - 0x3052efff  Foundation armv7  <09ff368178c5321c9715b9c8d491d53f> /System/Library/Frameworks/Foundation.framework/Foundation
0x3062f000 - 0x3064efff  Bom armv7  <b178e3efb4d733c694bd5a55e57a314f> /System/Library/PrivateFrameworks/Bom.framework/Bom
0x306f4000 - 0x30736fff  CoreAudio armv7  <c972fd5f8e89333ca680b9a33587f896> /System/Library/Frameworks/CoreAudio.framework/CoreAudio
0x30a7c000 - 0x30a7efff  libAccessibility.dylib armv7  <d55f1553d14831a2a5435ae27ef75ef4> /usr/lib/libAccessibility.dylib
0x30a7f000 - 0x30a81fff  libgcc_s.1.dylib armv7  <a2631ac302f4310dae8367939e16b7c2> /usr/lib/libgcc_s.1.dylib
0x30a82000 - 0x30a8efff  GraphicsServices armv7  <ff78a9636e933f0dbd222f8d26209788> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
0x30aa9000 - 0x30b96fff  libiconv.2.dylib armv7  <f4146ce07e3031ea8a81fa5516fd77d0> /usr/lib/libiconv.2.dylib
0x30ba4000 - 0x30be3fff  libSystem.B.dylib armv7  <64cf947dd8423eeeb677f81dd3eb2d9d> /usr/lib/libSystem.B.dylib
0x30cf8000 - 0x30cf8fff  vecLib armv7  <0c60cd0a60f43d2791d36cb357d30e3c> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/vecLib
0x32a44000 - 0x32a44fff  libCVMSPluginSupport.dylib armv7  <42d8aa2a31843a6e8bfff745644a7ba5> /System/Library/Frameworks/OpenGLES.framework/libCVMSPluginSupport.dylib
0x32a53000 - 0x32b57fff  JavaScriptCore armv7  <61a94142e2d23dafa2964190dd46e9e3> /System/Library/PrivateFrameworks/JavaScriptCore.framework/JavaScriptCore
0x32be8000 - 0x32ca7fff  CFNetwork armv7  <b09e0d53de9f3bc8bde494780f3cdd4f> /System/Library/Frameworks/CFNetwork.framework/CFNetwork
0x32db5000 - 0x32dbefff  CoreVideo armv7  <ea847e6dba2d36b1826b255c73b39539> /System/Library/Frameworks/CoreVideo.framework/CoreVideo
0x32dbf000 - 0x32e2efff  ProofReader armv7  <6d843c6aecdd37ae84baa40af8ad7e65> /System/Library/PrivateFrameworks/ProofReader.framework/ProofReader
0x32e33000 - 0x32f4dfff  libicucore.A.dylib armv7  <bada0c2725bb31a483d5adf9aaf1f8df> /usr/lib/libicucore.A.dylib
0x331d0000 - 0x332f1fff  CoreGraphics armv7  <65f6c8701b563542820a26b0dfc4f6a4> /System/Library/Frameworks/CoreGraphics.framework/CoreGraphics
0x332f2000 - 0x33338fff  CoreTelephony armv7  <af7d1e770e5a3ffd8834a57fb5d40557> /System/Library/Frameworks/CoreTelephony.framework/CoreTelephony
0x33342000 - 0x333f1fff  QuartzCore armv7  <ef9632c9781f3101916b65e9faae1579> /System/Library/Frameworks/QuartzCore.framework/QuartzCore
0x334f3000 - 0x334f5fff  IOMobileFramebuffer armv7  <683f321680763e519d61541170ba2133> /System/Library/PrivateFrameworks/IOMobileFramebuffer.framework/IOMobileFramebuffer
0x3380c000 - 0x33861fff  libvDSP.dylib armv7  <0221caba81a235c5a896a835e2aac047> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libvDSP.dylib
0x33b65000 - 0x33b68fff  libmacho.dylib armv7  <53908d448e9e32418652a4afee5bc578> /usr/lib/system/libmacho.dylib
0x33c3c000 - 0x33c86fff  libstdc++.6.dylib armv7  <e98c3fd72ba43d02aac24b08f7219eb7> /usr/lib/libstdc++.6.dylib
0x33ccb000 - 0x33cccfff  CoreSurface armv7  <7b83cd757da73e6e826693c29296d3fa> /System/Library/PrivateFrameworks/CoreSurface.framework/CoreSurface
0x33ccd000 - 0x33d00fff  AppSupport armv7  <0217468bd9f839229a47910b7816b3d5> /System/Library/PrivateFrameworks/AppSupport.framework/AppSupport
0x33d25000 - 0x33de9fff  libobjc.A.dylib armv7  <a89ef30f6d663254babb6329ce02ca3d> /usr/lib/libobjc.A.dylib
0x33e0d000 - 0x33e11fff  libGFXShared.dylib armv7  <a0772a32cd8b3b9194bb0c29807c1c5b> /System/Library/Frameworks/OpenGLES.framework/libGFXShared.dylib
0x33e46000 - 0x33ea5fff  libBLAS.dylib armv7  <0b36b2272aa33a8c9aa22d99c89d7189> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libBLAS.dylib
0x33eab000 - 0x33eaffff  libcache.dylib armv7  <362fdd2de66f3e189b5d139c9669a9e3> /usr/lib/system/libcache.dylib
0x33eb0000 - 0x33eb1fff  libsystem_network.dylib armv7  <3e0b7d6754cd33669c0680525f03ede1> /usr/lib/system/libsystem_network.dylib
0x3400d000 - 0x34042fff  AddressBook armv7  <3f2071a77bc134cd82065eef90d4082f> /System/Library/Frameworks/AddressBook.framework/AddressBook
0x3407a000 - 0x3407cfff  MobileInstallation armv7  <94b6d6c5d9883175af26764567528127> /System/Library/PrivateFrameworks/MobileInstallation.framework/MobileInstallation
0x3407d000 - 0x34126fff  libxml2.2.dylib armv7  <5538d3f2c7d83b88b06168488fe6326b> /usr/lib/libxml2.2.dylib
0x34139000 - 0x3413afff  libdyld.dylib armv7  <7dd4acfe150831e0ae82296587e67e7f> /usr/lib/system/libdyld.dylib
0x34160000 - 0x34161fff  libsystem_blocks.dylib armv7  <ccc041df3de73eafb7a59e74cdb1702b> /usr/lib/system/libsystem_blocks.dylib
0x34177000 - 0x342cbfff  AudioToolbox armv7  <6619c8c13f8d328e923e797fa8d0df23> /System/Library/Frameworks/AudioToolbox.framework/AudioToolbox
0x342cc000 - 0x34303fff  Security armv7  <6599f42a910b3b31a0e1d98c883d61cb> /System/Library/Frameworks/Security.framework/Security
0x34315000 - 0x34602fff  libLAPACK.dylib armv7  <b855d60dac01310495453bddfd004f0d> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libLAPACK.dylib
0x34703000 - 0x3470afff  AggregateDictionary armv7  <ab9777b39e8e3026ad64dc90323cad7e> /System/Library/PrivateFrameworks/AggregateDictionary.framework/AggregateDictionary
0x34859000 - 0x34866fff  libbsm.0.dylib armv7  <0a1e2bb78d5138419ecad8ba0fe42fdd> /usr/lib/libbsm.0.dylib
0x34871000 - 0x34876fff  libcopyfile.dylib armv7  <e32cf2d48a1f3060b372ca7623e4a12b> /usr/lib/system/libcopyfile.dylib
0x348cf000 - 0x348ddfff  OpenGLES armv7  <5a76beaeaa013f0cbf16e5cb154598ab> /System/Library/Frameworks/OpenGLES.framework/OpenGLES
0x348e4000 - 0x348effff  libz.1.dylib armv7  <ac706bee36593dc683fd5a96a389d72e> /usr/lib/libz.1.dylib
0x34921000 - 0x34927fff  liblockdown.dylib armv7  <14c89b7346433c1f8675f454531f6ca3> /usr/lib/liblockdown.dylib
0x34a37000 - 0x34a3efff  libbz2.1.0.dylib armv7  <0a082e1d475432959ba93aa3dbf7fb31> /usr/lib/libbz2.1.0.dylib
0x34a3f000 - 0x34a77fff  libCGFreetype.A.dylib armv7  <416c77100b453e3f838831c4c857f8c7> /System/Library/Frameworks/CoreGraphics.framework/Resources/libCGFreetype.A.dylib
0x34a79000 - 0x34a99fff  PrintKit armv7  <e5a01ca9083a36afacc08611a398e2ad> /System/Library/PrivateFrameworks/PrintKit.framework/PrintKit
0x34a9a000 - 0x34b7ffff  CoreFoundation armv7  <a8444f997111304c9571b3ff974b769c> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x34c36000 - 0x34c73fff  CoreText armv7  <fb6a72faec2330c4b2cd33c2e9c59588> /System/Library/Frameworks/CoreText.framework/CoreText
0x34db1000 - 0x34e02fff  libsqlite3.dylib armv7  <8a41cc6a6d9332308bc415d27577fd24> /usr/lib/libsqlite3.dylib
0x34ec0000 - 0x34ec0fff  libdnsinfo.dylib armv7  <21415179ffa03f949fa8cc851c6c31c7> /usr/lib/system/libdnsinfo.dylib
0x3504f000 - 0x35157fff  CoreData armv7  <9843a401dd1d322383e3e40021cc8b95> /System/Library/Frameworks/CoreData.framework/CoreData
0x35258000 - 0x35258fff  libsystem_sandbox.dylib armv7  <f47c01d627853b328e088b3fdd08e87d> /usr/lib/system/libsystem_sandbox.dylib
0x35265000 - 0x352fafff  ImageIO armv7  <d520e3241d1130e8ac1375ee0f2c1095> /System/Library/Frameworks/ImageIO.framework/ImageIO
0x3557b000 - 0x35580fff  libnotify.dylib armv7  <9d7198e91de9386a9e5ea43608a66a57> /usr/lib/system/libnotify.dylib
0x355c2000 - 0x355d7fff  libresolv.9.dylib armv7  <e92cfbb83f7b330db19181e797bb3f7b> /usr/lib/libresolv.9.dylib
0x355ee000 - 0x3597bfff  UIKit armv7  <c271b78464d93cb7bf28c6e49df293ba> /System/Library/Frameworks/UIKit.framework/UIKit
0x35b7d000 - 0x35bacfff  SystemConfiguration armv7  <1d73b8a159363f96bb9c039655c5eae6> /System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration
0x35bba000 - 0x361c5fff  WebCore armv7  <07941e59d0a33f94802c16c76238fddf> /System/Library/PrivateFrameworks/WebCore.framework/WebCore
0x362a7000 - 0x36328fff  libsystem_c.dylib armv7  <17ee3fe220c23b1f898d21ba25b2bcac> /usr/lib/system/libsystem_c.dylib
0x3649c000 - 0x364a1fff  liblaunch.dylib armv7  <f5ccc8234aea3ebd9a88bd37f0fa23ae> /usr/lib/system/liblaunch.dylib
0x364a2000 - 0x364a5fff  IOSurface armv7  <ad50e71624583d06b891344d832f9b08> /System/Library/PrivateFrameworks/IOSurface.framework/IOSurface
0x364a6000 - 0x364e2fff  libGLImage.dylib armv7  <9d97699e44ee3651ba4ac37e5adec35b> /System/Library/Frameworks/OpenGLES.framework/libGLImage.dylib
0x364fd000 - 0x36502fff  MobileKeyBag armv7  <8c35c090bc373cb181fc26b961b8dba5> /System/Library/PrivateFrameworks/MobileKeyBag.framework/MobileKeyBag
0x3656e000 - 0x36597fff  MobileCoreServices armv7  <57fef84bdc17301d8bf53ba0fb967fe6> /System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices
0x3659a000 - 0x365b1fff  libsystem_kernel.dylib armv7  <c4ebe7eb2e6c3a2d9bd3620a4d6dbc0e> /usr/lib/system/libsystem_kernel.dylib
0x365b2000 - 0x365b6fff  AssetsLibraryServices armv7  <e1cbfe599c96369ca4bdb0dd99d3cd9f> /System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices
0x36745000 - 0x36752fff  libdispatch.dylib armv7  <9a0511ad5ebc3db898f1f49ed1a73d34> /usr/lib/system/libdispatch.dylib
0x367cb000 - 0x367e8fff  libsystem_info.dylib armv7  <48016be86e3f3cd9aeee1c6590e1ac6f> /usr/lib/system/libsystem_info.dylib
0x367ed000 - 0x367f9fff  SpringBoardServices armv7  <c68262667ac8397a949ce4e92dfec7db> /System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices

2 个答案:

答案 0 :(得分:7)

注意这一行

StoryStream failed to launch in time

您的应用程序需要花费太多时间才能启动。如果您在应用程序启动时正在进行任何工作,请考虑将其移至后台线程或至少使用计时器在第一次运行循环后执行此操作。

答案 1 :(得分:4)

查看主线程, 打电话给

+[NSURLConnection sendSynchronousRequest:returningResponse:error:]

在主线程上进行同步网络呼叫是危险的 如果服务器响应时间过长或从未响应,则watchdog进程会导致您的app被终止。

使用异步调用或在另一个线程上进行调用。