приложение отлично работает на симуляторе, но вылетает на устройстве - PullRequest
0 голосов
/ 09 декабря 2011

я разрабатываю свое приложение на xcode 4.1. Когда я использую симулятор iphone 4.3, он работает нормально. Но когда я пробую это на моем iphone 4, ios 4.3.3, это терпит крах. Как я могу найти проблему? я использую ASIHTTPRequest, это может быть проблемой?

это журнал сбоев, если он может помочь мне разобраться в проблеме

Hardware Model:      iPhone3,1
Process:         MyApp [1018]
Path:            /var/mobile/Applications/9D725E2D-DF8A-4B01-9FB1-F80D71A6CF9E/MyApp.app/MyApp
Identifier:      MyApp
Version:         ??? (???)
Code Type:       ARM (Native)
Parent Process:  crunchd [1]

Date/Time:       2011-12-09 17:42:17.026 +0100
OS Version:      iPhone OS 4.3.3 (8J2)
Report Version:  104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread:  0

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib          0x3558fa1c __pthread_kill + 8
1   libsystem_c.dylib               0x356663b4 pthread_kill + 52
2   libsystem_c.dylib               0x3565ebf8 abort + 72
3   libstdc++.6.dylib               0x35628a64 __gnu_cxx::__verbose_terminate_handler() + 376
4   libobjc.A.dylib                 0x3449d06c _objc_terminate + 104
5   libstdc++.6.dylib               0x35626e36 __cxxabiv1::__terminate(void (*)()) + 46
6   libstdc++.6.dylib               0x35626e8a std::terminate() + 10
7   libstdc++.6.dylib               0x35626f5a __cxa_throw + 78
8   libobjc.A.dylib                 0x3449bc84 objc_exception_throw + 64
9   CoreFoundation                  0x309841b8 -[NSObject(NSObject) doesNotRecognizeSelector:] + 96
10  CoreFoundation                  0x30983642 ___forwarding___ + 502
11  CoreFoundation                  0x308fa178 _CF_forwarding_prep_0 + 40
12  MyApp                           0x00004cc0 -[FirstViewController showTest] (FirstViewController.m:447)
13  MyApp                           0x0000471c -[FirstViewController request:didLoad:] (FirstViewController.m:384)
14  MyApp                           0x0000cfc8 -[FBRequest handleResponseData:] (FBRequest.m:261)
15  MyApp                           0x0000d5f6 -[FBRequest connectionDidFinishLoading:] (FBRequest.m:346)
16  Foundation                      0x341c52ee -[NSURLConnection(NSURLConnectionReallyInternal) sendDidFinishLoading] + 62
17  Foundation                      0x341c5270 _NSURLConnectionDidFinishLoading + 72
18  CFNetwork                       0x34c3f40a URLConnectionClient::_clientDidFinishLoading(URLConnectionClient::ClientConnectionEventQueue*) + 130
19  CFNetwork                       0x34c33f3e URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfo<XClientEvent, XClientEventParams>*, long) + 94
20  CFNetwork                       0x34c340c6 URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfo<XClientEvent, XClientEventParams>*, long) + 486
21  CFNetwork                       0x34c33e30 URLConnectionClient::processEvents() + 64
22  CFNetwork                       0x34c33de2 URLConnection::multiplexerClientPerform(RunLoopMultiplexer*) + 30
23  CFNetwork                       0x34c33d54 MultiplexerSource::perform() + 120
24  CFNetwork                       0x34c33cd2 MultiplexerSource::_perform(void*) + 2
25  CoreFoundation                  0x30957a72 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 6
26  CoreFoundation                  0x30959758 __CFRunLoopDoSources0 + 376
27  CoreFoundation                  0x3095a4e4 __CFRunLoopRun + 224
28  CoreFoundation                  0x308eaebc CFRunLoopRunSpecific + 224
29  CoreFoundation                  0x308eadc4 CFRunLoopRunInMode + 52
30  GraphicsServices                0x30269418 GSEventRunModal + 108
31  GraphicsServices                0x302694c4 GSEventRun + 56
32  UIKit                           0x30a10d62 -[UIApplication _run] + 398
33  UIKit                           0x30a0e800 UIApplicationMain + 664
34  MyApp                           0x00002b2c main (main.m:14)
35  MyApp                           0x00002ad4 start + 32

Thread 1 name:  Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0   libsystem_kernel.dylib          0x35590fbc kevent + 24
1   libdispatch.dylib               0x35261032 _dispatch_mgr_invoke + 706
2   libdispatch.dylib               0x3526203a _dispatch_queue_invoke + 86
3   libdispatch.dylib               0x352615ea _dispatch_worker_thread2 + 186
4   libsystem_c.dylib               0x3566758a _pthread_wqthread + 258
5   libsystem_c.dylib               0x35667bbc start_wqthread + 0

Thread 2 name:  WebThread
Thread 2:
0   libsystem_kernel.dylib          0x3558dc00 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x3558d758 mach_msg + 44
2   CoreFoundation                  0x309582b8 __CFRunLoopServiceMachPort + 88
3   CoreFoundation                  0x3095a562 __CFRunLoopRun + 350
4   CoreFoundation                  0x308eaebc CFRunLoopRunSpecific + 224
5   CoreFoundation                  0x308eadc4 CFRunLoopRunInMode + 52
6   WebCore                         0x35f5327e _ZL12RunWebThreadPv + 382
7   libsystem_c.dylib               0x3566630a _pthread_start + 242
8   libsystem_c.dylib               0x35667bb4 thread_start + 0

Thread 3:
0   libsystem_kernel.dylib          0x3558dc00 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x3558d758 mach_msg + 44
2   CoreFoundation                  0x309582b8 __CFRunLoopServiceMachPort + 88
3   CoreFoundation                  0x3095a562 __CFRunLoopRun + 350
4   CoreFoundation                  0x308eaebc CFRunLoopRunSpecific + 224
5   CoreFoundation                  0x308eadc4 CFRunLoopRunInMode + 52
6   Foundation                      0x341dd7f6 +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:] + 206
7   Foundation                      0x341d0382 -[NSThread main] + 38
8   Foundation                      0x342425c6 __NSThread__main__ + 966
9   libsystem_c.dylib               0x3566630a _pthread_start + 242
10  libsystem_c.dylib               0x35667bb4 thread_start + 0

Thread 4 name:  com.apple.CFSocket.private
Thread 4:
0   libsystem_kernel.dylib          0x3558dc2c semaphore_signal_trap + 8
1   libsystem_kernel.dylib          0x3558df92 semaphore_signal + 2
2   libsystem_c.dylib               0x356645f4 pthread_mutex_unlock + 188
3   CoreFoundation                  0x308fc3f0 CFRunLoopWakeUp + 84
4   CoreFoundation                  0x3095dc0e __CFSocketManager + 1378
5   libsystem_c.dylib               0x3566630a _pthread_start + 242
6   libsystem_c.dylib               0x35667bb4 thread_start + 0

Thread 0 crashed with ARM Thread State:
    r0: 0x00000000    r1: 0x00000000      r2: 0x00000001      r3: 0x00000000
    r4: 0x3f31548c    r5: 0x00000006      r6: 0x1eda0d5c      r7: 0x2fe253f8
    r8: 0x31307c7a    r9: 0x00000065     r10: 0x3e7d2b98     r11: 0x00000000
    ip: 0x00000148    sp: 0x2fe253ec      lr: 0x35c4d3bb      pc: 0x35b76a1c
  cpsr: 0x080f0010

Binary Images:
   0x28000 -    0x7dfff +MyApp armv7  <d503e69ae96b38c29f74f9fd27c88b08> /var/mobile/Applications/9D725E2D-DF8A-4B01-9FB1-F80D71A6CF9E/MyApp.app/MyApp
   0xc3000 -    0xc3fff +MobileSubstrate.dylib armv6  <4070bd34b2c273416bcec248fd8b873d> /Library/MobileSubstrate/MobileSubstrate.dylib
   0xf2000 -    0xf3fff +SubstrateLoader.dylib armv6  <ff6a576a67626b81229111c8c4169d09> /Library/Frameworks/CydiaSubstrate.framework/Libraries/SubstrateLoader.dylib
 0x1119000 -  0x113efff +Activator.dylib armv6  <a930347f472e332ba6a2f6809f12e335> /Library/MobileSubstrate/DynamicLibraries/Activator.dylib
 0x114f000 -  0x1153fff +IntelliStatusIconsView.dylib armv6  <915699e8cb5c1a129984cec679515c50> /Library/MobileSubstrate/DynamicLibraries/IntelliStatusIconsView.dylib
 0x115d000 -  0x115efff +sandcastleclient.dylib armv6  <d138ce2db8b033aba6119acf3d561535> /Library/MobileSubstrate/DynamicLibraries/sandcastleclient.dylib
 0x1161000 -  0x1164fff  libsubstrate.dylib armv6  <5f24c4f6863b75d701ee663ed761c423> /usr/lib/libsubstrate.dylib
0x2fe27000 - 0x2fe4cfff  dyld armv7  <bb9bfc7d242331d29a79adf7ef7aaa18> /usr/lib/dyld
0x305ec000 - 0x30615fff  MobileCoreServices armv7  <57fef84bdc17301d8bf53ba0fb967fe6> /System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices
0x30616000 - 0x3064dfff  Security armv7  <6599f42a910b3b31a0e1d98c883d61cb> /System/Library/Frameworks/Security.framework/Security
0x3064e000 - 0x3064ffff  libsystem_network.dylib armv7  <39bf0f48bd8539169a77f8f61cdcd4c9> /usr/lib/system/libsystem_network.dylib
0x306ac000 - 0x306acfff  Accelerate armv7  <7d5ad465049136afaa1f0d89aac600bc> /System/Library/Frameworks/Accelerate.framework/Accelerate
0x307aa000 - 0x3083ffff  ImageIO armv7  <d520e3241d1130e8ac1375ee0f2c1095> /System/Library/Frameworks/ImageIO.framework/ImageIO
0x3084c000 - 0x30858fff  GraphicsServices armv7  <ff78a9636e933f0dbd222f8d26209788> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
0x309b7000 - 0x309b9fff  libgcc_s.1.dylib armv7  <a2631ac302f4310dae8367939e16b7c2> /usr/lib/libgcc_s.1.dylib
0x309ba000 - 0x30ad4fff  libicucore.A.dylib armv7  <bada0c2725bb31a483d5adf9aaf1f8df> /usr/lib/libicucore.A.dylib
0x30ad9000 - 0x30aeffff  EAP8021X armv7  <9fefc0ada30435fbb3b51818c74f6cb8> /System/Library/PrivateFrameworks/EAP8021X.framework/EAP8021X
0x30c91000 - 0x30c91fff  vecLib armv7  <0c60cd0a60f43d2791d36cb357d30e3c> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/vecLib
0x30cce000 - 0x30d0bfff  CoreText armv7  <fb6a72faec2330c4b2cd33c2e9c59588> /System/Library/Frameworks/CoreText.framework/CoreText
0x30ec9000 - 0x30faefff  CoreFoundation armv7  <a8444f997111304c9571b3ff974b769c> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x30fc9000 - 0x31356fff  UIKit armv7  <c271b78464d93cb7bf28c6e49df293ba> /System/Library/Frameworks/UIKit.framework/UIKit
0x31377000 - 0x31464fff  libiconv.2.dylib armv7  <f4146ce07e3031ea8a81fa5516fd77d0> /usr/lib/libiconv.2.dylib
0x31465000 - 0x31466fff  libremovefile.dylib armv7  <e8858a499d663e6a9e3c188521273cc1> /usr/lib/system/libremovefile.dylib
0x31477000 - 0x31480fff  CoreVideo armv7  <ea847e6dba2d36b1826b255c73b39539> /System/Library/Frameworks/CoreVideo.framework/CoreVideo
0x314d1000 - 0x314d3fff  libAccessibility.dylib armv7  <d55f1553d14831a2a5435ae27ef75ef4> /usr/lib/libAccessibility.dylib
0x314d4000 - 0x31525fff  libsqlite3.dylib armv7  <8a41cc6a6d9332308bc415d27577fd24> /usr/lib/libsqlite3.dylib
0x3153f000 - 0x31546fff  libbz2.1.0.dylib armv7  <0a082e1d475432959ba93aa3dbf7fb31> /usr/lib/libbz2.1.0.dylib
0x3158b000 - 0x31590fff  liblaunch.dylib armv7  <f5ccc8234aea3ebd9a88bd37f0fa23ae> /usr/lib/system/liblaunch.dylib
0x315cb000 - 0x315d6fff  libz.1.dylib armv7  <ac706bee36593dc683fd5a96a389d72e> /usr/lib/libz.1.dylib
0x31747000 - 0x31747fff  libdnsinfo.dylib armv7  <21415179ffa03f949fa8cc851c6c31c7> /usr/lib/system/libdnsinfo.dylib
0x31748000 - 0x31749fff  libsystem_blocks.dylib armv7  <ccc041df3de73eafb7a59e74cdb1702b> /usr/lib/system/libsystem_blocks.dylib
0x3174a000 - 0x3176afff  PrintKit armv7  <e5a01ca9083a36afacc08611a398e2ad> /System/Library/PrivateFrameworks/PrintKit.framework/PrintKit
0x31777000 - 0x317b9fff  CoreAudio armv7  <c972fd5f8e89333ca680b9a33587f896> /System/Library/Frameworks/CoreAudio.framework/CoreAudio
0x31d8c000 - 0x31dc4fff  IOKit armv7  <80ae313ad69d3363935c88e51a11862d> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x31e05000 - 0x31e41fff  libGLImage.dylib armv7  <9d97699e44ee3651ba4ac37e5adec35b> /System/Library/Frameworks/OpenGLES.framework/libGLImage.dylib
0x33a07000 - 0x33a0cfff  MobileKeyBag armv7  <8c35c090bc373cb181fc26b961b8dba5> /System/Library/PrivateFrameworks/MobileKeyBag.framework/MobileKeyBag
0x33a0d000 - 0x33a16fff  MobileWiFi armv7  <03d98d5cf6383695aa7d8a88da52f410> /System/Library/PrivateFrameworks/MobileWiFi.framework/MobileWiFi
0x33b24000 - 0x33b6afff  CoreTelephony armv7  <af7d1e770e5a3ffd8834a57fb5d40557> /System/Library/Frameworks/CoreTelephony.framework/CoreTelephony
0x33b6b000 - 0x33b77fff  SpringBoardServices armv7  <c68262667ac8397a949ce4e92dfec7db> /System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices
0x33c4c000 - 0x33c4efff  IOMobileFramebuffer armv7  <683f321680763e519d61541170ba2133> /System/Library/PrivateFrameworks/IOMobileFramebuffer.framework/IOMobileFramebuffer
0x33c4f000 - 0x33c54fff  libcopyfile.dylib armv7  <e57c2b9054b831d9a37119baaa4947cb> /usr/lib/system/libcopyfile.dylib
0x33d40000 - 0x33d44fff  libGFXShared.dylib armv7  <a0772a32cd8b3b9194bb0c29807c1c5b> /System/Library/Frameworks/OpenGLES.framework/libGFXShared.dylib
0x33e7a000 - 0x33e7efff  AssetsLibraryServices armv7  <e1cbfe599c96369ca4bdb0dd99d3cd9f> /System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices
0x33e80000 - 0x33f31fff  WebKit armv7  <eb9a0d69c64b3127b2bffd71641add3b> /System/Library/PrivateFrameworks/WebKit.framework/WebKit
0x33f32000 - 0x33f3ffff  libbsm.0.dylib armv7  <0a1e2bb78d5138419ecad8ba0fe42fdd> /usr/lib/libbsm.0.dylib
0x34018000 - 0x3401efff  liblockdown.dylib armv7  <14c89b7346433c1f8675f454531f6ca3> /usr/lib/liblockdown.dylib
0x342f9000 - 0x342fafff  libdyld.dylib armv7  <41a7b5e5d9983449ab33affed0f635ad> /usr/lib/system/libdyld.dylib
0x34367000 - 0x3436afff  libmacho.dylib armv7  <43311c113a9d3182b7d007129819f029> /usr/lib/system/libmacho.dylib
0x3436b000 - 0x34380fff  libresolv.9.dylib armv7  <e92cfbb83f7b330db19181e797bb3f7b> /usr/lib/libresolv.9.dylib
0x34587000 - 0x3458afff  IOSurface armv7  <ad50e71624583d06b891344d832f9b08> /System/Library/PrivateFrameworks/IOSurface.framework/IOSurface
0x3468b000 - 0x346eafff  libBLAS.dylib armv7  <0b36b2272aa33a8c9aa22d99c89d7189> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libBLAS.dylib
0x3479a000 - 0x348b9fff  Foundation armv7  <09ff368178c5321c9715b9c8d491d53f> /System/Library/Frameworks/Foundation.framework/Foundation
0x34986000 - 0x34a35fff  QuartzCore armv7  <ef9632c9781f3101916b65e9faae1579> /System/Library/Frameworks/QuartzCore.framework/QuartzCore
0x34a7e000 - 0x34b42fff  libobjc.A.dylib armv7  <6b51e76fde9f381bb7b3bc5badbfee3a> /usr/lib/libobjc.A.dylib
0x34d28000 - 0x34d5bfff  AppSupport armv7  <0217468bd9f839229a47910b7816b3d5> /System/Library/PrivateFrameworks/AppSupport.framework/AppSupport
0x34d5c000 - 0x34d63fff  AggregateDictionary armv7  <ab9777b39e8e3026ad64dc90323cad7e> /System/Library/PrivateFrameworks/AggregateDictionary.framework/AggregateDictionary
0x34d66000 - 0x34e87fff  CoreGraphics armv7  <65f6c8701b563542820a26b0dfc4f6a4> /System/Library/Frameworks/CoreGraphics.framework/CoreGraphics
0x34ec8000 - 0x351b5fff  libLAPACK.dylib armv7  <b855d60dac01310495453bddfd004f0d> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libLAPACK.dylib
0x351e1000 - 0x35216fff  AddressBook armv7  <3f2071a77bc134cd82065eef90d4082f> /System/Library/Frameworks/AddressBook.framework/AddressBook
0x35217000 - 0x352d6fff  CFNetwork armv7  <b09e0d53de9f3bc8bde494780f3cdd4f> /System/Library/Frameworks/CFNetwork.framework/CFNetwork
0x352d7000 - 0x352f0fff  libRIP.A.dylib armv7  <4825c3e392983aba947eca06555e4480> /System/Library/Frameworks/CoreGraphics.framework/Resources/libRIP.A.dylib
0x35411000 - 0x35565fff  AudioToolbox armv7  <6619c8c13f8d328e923e797fa8d0df23> /System/Library/Frameworks/AudioToolbox.framework/AudioToolbox
0x35606000 - 0x35607fff  CoreSurface armv7  <7b83cd757da73e6e826693c29296d3fa> /System/Library/PrivateFrameworks/CoreSurface.framework/CoreSurface
0x3560c000 - 0x356b5fff  libxml2.2.dylib armv7  <5538d3f2c7d83b88b06168488fe6326b> /usr/lib/libxml2.2.dylib
0x356e0000 - 0x356e5fff  libsystem_dnssd.dylib armv7  <c7cfe523e2d73521abc01587313ef730> /usr/lib/system/libsystem_dnssd.dylib
0x357d3000 - 0x357f0fff  libsystem_info.dylib armv7  <48016be86e3f3cd9aeee1c6590e1ac6f> /usr/lib/system/libsystem_info.dylib
0x3583d000 - 0x35841fff  libcache.dylib armv7  <d2f7fd2a352b3cd59c564be34b53cf80> /usr/lib/system/libcache.dylib
0x35842000 - 0x3584ffff  libdispatch.dylib armv7  <9a0511ad5ebc3db898f1f49ed1a73d34> /usr/lib/system/libdispatch.dylib
0x35880000 - 0x358bffff  libSystem.B.dylib armv7  <33dcf9a403ae3fd5971d6030ada2fcab> /usr/lib/libSystem.B.dylib
0x358c0000 - 0x358c0fff  libCVMSPluginSupport.dylib armv7  <42d8aa2a31843a6e8bfff745644a7ba5> /System/Library/Frameworks/OpenGLES.framework/libCVMSPluginSupport.dylib
0x3595f000 - 0x359cefff  ProofReader armv7  <6d843c6aecdd37ae84baa40af8ad7e65> /System/Library/PrivateFrameworks/ProofReader.framework/ProofReader
0x359cf000 - 0x35a24fff  libvDSP.dylib armv7  <0221caba81a235c5a896a835e2aac047> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libvDSP.dylib
0x35b61000 - 0x35b64fff  CaptiveNetwork armv7  <fc834fd33a18341ea7506587ad895703> /System/Library/PrivateFrameworks/CaptiveNetwork.framework/CaptiveNetwork
0x35b65000 - 0x35b7cfff  libsystem_kernel.dylib armv7  <a06ec84e53bf32098b63c0caebdb45b6> /usr/lib/system/libsystem_kernel.dylib
0x35bcb000 - 0x35c15fff  libstdc++.6.dylib armv7  <b2cac408951c3f3c9ba3cf563e54ce81> /usr/lib/libstdc++.6.dylib
0x35c16000 - 0x35c18fff  MobileInstallation armv7  <94b6d6c5d9883175af26764567528127> /System/Library/PrivateFrameworks/MobileInstallation.framework/MobileInstallation
0x35c1a000 - 0x35c9bfff  libsystem_c.dylib armv7  <a7077267b6743ed3bbdd86d4380c75d9> /usr/lib/system/libsystem_c.dylib
0x35c9c000 - 0x35cd4fff  libCGFreetype.A.dylib armv7  <ccea634795153164a681f0f311f4461d> /System/Library/Frameworks/CoreGraphics.framework/Resources/libCGFreetype.A.dylib
0x36100000 - 0x36204fff  JavaScriptCore armv7  <61a94142e2d23dafa2964190dd46e9e3> /System/Library/PrivateFrameworks/JavaScriptCore.framework/JavaScriptCore
0x36262000 - 0x36281fff  Bom armv7  <b178e3efb4d733c694bd5a55e57a314f> /System/Library/PrivateFrameworks/Bom.framework/Bom
0x36534000 - 0x36b3ffff  WebCore armv7  <07941e59d0a33f94802c16c76238fddf> /System/Library/PrivateFrameworks/WebCore.framework/WebCore
0x36c14000 - 0x36c43fff  SystemConfiguration armv7  <1d73b8a159363f96bb9c039655c5eae6> /System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration
0x36c4d000 - 0x36c5bfff  OpenGLES armv7  <5a76beaeaa013f0cbf16e5cb154598ab> /System/Library/Frameworks/OpenGLES.framework/OpenGLES
0x36c6e000 - 0x36c73fff  libnotify.dylib armv7  <9d7198e91de9386a9e5ea43608a66a57> /usr/lib/system/libnotify.dylib
0x36d76000 - 0x36d76fff  libsystem_sandbox.dylib armv7  <f47c01d627853b328e088b3fdd08e87d> /usr/lib/system/libsystem_sandbox.dylib

Показать тестовый код

-(void)showTest
{
    NSLog(@"Show Test");
    lbl.text=@"";
    logOut.hidden=YES;
  //  [self showWithLabelMixed];
 FormViewController *formViewController =[[FormViewController alloc]initWithNibName:@"FormViewController" bundle:nil];
    formViewController.userId=fbUserId;
    [formViewController.userId retain];


    formViewController.sex=[fbResult objectForKey:@"sex"];
    [formViewController.sex retain];

    formViewController.country=[[fbResult objectForKey:@"current_location"]objectForKey:@"country"];
    [formViewController.country retain];

    formViewController.city=[[fbResult objectForKey:@"current_location"]objectForKey:@"city"];
    [formViewController.city retain];

    formViewController.birthDate=[fbResult objectForKey:@"birthday_date"];
    [formViewController.birthDate retain];

    formViewController.userImage=imageFb;
    [formViewController.userImage retain];

    [self presentModalViewController:formViewController animated:YES];

   // [self.tabBarController pushViewController:formViewController animated:YES];


}

строка 447 в firstViewControlelr равна

formViewController.country=[[fbResult objectForKey:@"current_location"]objectForKey:@"country"];

Но в FormViewController нет строки 447

Ответы [ 2 ]

1 голос
/ 09 декабря 2011

Если строка, вызывающая ошибку:

formViewController.country=[[fbResult objectForKey:@"current_location"]objectForKey:@"country"];

(1) Убедитесь, что formViewController имеет правильный синтаксис свойства для country - либо синтезированный, либо явный.Убедитесь, что [fbResult objectForKey:@"current_location"] возвращает допустимый объект словаря.

1 голос
/ 09 декабря 2011

В вашем методе showTest в строке 447:

[FirstViewController showTest] (FirstViewController.m:447)

Вы вызываете метод для объекта, который его не принимает:

-[NSObject(NSObject) doesNotRecognizeSelector:] + 96

Не могли бы вы отредактировать свой вопрос, чтобы показать нам код из метода showTest?

Редактировать: Обновление вопроса для отражения новой информации

Удалите следующие строки кода:

[formViewController.userId retain];
[formViewController.sex retain];
[formViewController.country retain];
[formViewController.city retain];
[formViewController.birthDate retain];
[formViewController.userImage retain];

Я не уверен, что это является причиной вашей ошибки, потому что вы не указали номер строки, которая вызывает ее в этом примере. Но то, что вы делаете здесь, это вызов retain для значений, которые уже были установлены установщиком свойств, а в случае объекта обычно уже установлены.

...