本人开发了一个应用,在3g和wifi的情况下 运行都是很正常的,可是在2g环境下  就会出现一个加载画面后直接crash掉
具体的异常反馈如下
GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Fri Sep 16 06:56:50 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=i386-apple-darwin --target=arm-apple-darwin".tty /dev/ttys001
sharedlibrary apply-load-rules all
target remote-mobile /tmp/.XcodeGDBRemote-177-55
Switching to remote-macosx protocol
mem 0x1000 0x3fffffff cache
mem 0x40000000 0xffffffff none
mem 0x00000000 0x0fff none
[Switching to process 11779 thread 0x2e03]
[Switching to process 11779 thread 0x2e03]
warning: Unable to read symbols for /Library/MobileSubstrate/MobileSubstrate.dylib (file not found).
warning: No copy of MobileSubstrate.dylib found locally, reading from memory on remote device.  This may slow down the debug session.
warning: Unable to read symbols for /Library/Frameworks/CydiaSubstrate.framework/Libraries/SubstrateLoader.dylib (file not found).
warning: No copy of SubstrateLoader.dylib found locally, reading from memory on remote device.  This may slow down the debug session.
2011-10-21 10:59:05.375 smb[3632:607] MS:Notice: Installing: cn.fund123.iphone.smb [smb] (550.58)
2011-10-21 10:59:05.430 smb[3632:607] MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/Activator.dylib
warning: Unable to read symbols for /Library/MobileSubstrate/DynamicLibraries/Activator.dylib (file not found).
warning: No copy of Activator.dylib found locally, reading from memory on remote device.  This may slow down the debug session.
2011-10-21 10:59:05.571 smb[3632:607] MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/Backgrounder.dylib
warning: Unable to read symbols for /Library/MobileSubstrate/DynamicLibraries/Backgrounder.dylib (file not found).
warning: No copy of Backgrounder.dylib found locally, reading from memory on remote device.  This may slow down the debug session.
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.3.1 (8G4)/Symbols/usr/lib/libsubstrate.dylib (file not found).
warning: No copy of libsubstrate.dylib found locally, reading from memory on remote device.  This may slow down the debug session.
2011-10-21 10:59:05.805 smb[3632:607] MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/SBPandaHome.dylib
warning: Unable to read symbols for /Library/MobileSubstrate/DynamicLibraries/SBPandaHome.dylib (file not found).
warning: No copy of SBPandaHome.dylib found locally, reading from memory on remote device.  This may slow down the debug session.
MS:Warning: message not found [UIImage defaultDesktopImage]
2011-10-21 10:59:05.947 smb[3632:607] MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/SogouInputIPhone4.dylib
warning: Unable to read symbols for /Library/MobileSubstrate/DynamicLibraries/SogouInputIPhone4.dylib (file not found).
warning: No copy of SogouInputIPhone4.dylib found locally, reading from memory on remote device.  This may slow down the debug session.
2011-10-21 10:59:06.095 smb[3632:607] MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/lib360statusbar.dylib
warning: Unable to read symbols for /Library/MobileSubstrate/DynamicLibraries/lib360statusbar.dylib (file not found).
warning: No copy of lib360statusbar.dylib found locally, reading from memory on remote device.  This may slow down the debug session.
MS:Warning: message not found [UIStatusBarLayoutManager _viewForItem:creatingIfNecessary:]
MS:Warning: message not found [UIStatusBarLayoutManager prepareEnabledItems:]
2011-10-21 10:59:06.233 smb[3632:607] MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/libstatusbar.dylib
2011-10-21 10:59:06.239 smb[3632:607] MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/qihoo.360safesrv.dylib
warning: Unable to read symbols for /Library/MobileSubstrate/DynamicLibraries/qihoo.360safesrv.dylib (file not found).
warning: No copy of qihoo.360safesrv.dylib found locally, reading from memory on remote device.  This may slow down the debug session.
2011-10-21 10:59:07.635 smb[3632:607] MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/qihoo.360safesrv1.dylib
warning: Unable to read symbols for /Library/MobileSubstrate/DynamicLibraries/qihoo.360safesrv1.dylib (file not found).
warning: No copy of qihoo.360safesrv1.dylib found locally, reading from memory on remote device.  This may slow down the debug session.
objc[3632]: Class MCleanerSettingsBase is implemented in both /Library/MobileSubstrate/DynamicLibraries/qihoo.360safesrv.dylib and /Library/MobileSubstrate/DynamicLibraries/qihoo.360safesrv1.dylib. One of the two will be used. Which one is undefined.
objc[3632]: Class ProfileItem is implemented in both /Library/MobileSubstrate/DynamicLibraries/qihoo.360safesrv.dylib and /Library/MobileSubstrate/DynamicLibraries/qihoo.360safesrv1.dylib. One of the two will be used. Which one is undefined.
objc[3632]: Class PrivacyRuleItem is implemented in both /Library/MobileSubstrate/DynamicLibraries/qihoo.360safesrv.dylib and /Library/MobileSubstrate/DynamicLibraries/qihoo.360safesrv1.dylib. One of the two will be used. Which one is undefined.
objc[3632]: Class RuleItem is implemented in both /Library/MobileSubstrate/DynamicLibraries/qihoo.360safesrv.dylib and /Library/MobileSubstrate/DynamicLibraries/qihoo.360safesrv1.dylib. One of the two will be used. Which one is undefined.
objc[3632]: Class ChargeLogs is implemented in both /Library/MobileSubstrate/DynamicLibraries/qihoo.360safesrv.dylib and /Library/MobileSubstrate/DynamicLibraries/qihoo.360safesrv1.dylib. One of the two will be used. Which one is undefined.
2011-10-21 10:59:09.914 smb[3632:6b03] -[NSCFString countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance 0x2caec0
2011-10-21 10:59:10.971 smb[3632:607] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFString countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance 0x2caec0'
*** Call stack at first throw:
(
0   CoreFoundation                      0x360cc64f __exceptionPreprocess + 114
1   libobjc.A.dylib                     0x30773c5d objc_exception_throw + 24
2   CoreFoundation                      0x360d01bf -[NSObject(NSObject) doesNotRecognizeSelector:] + 102
3   CoreFoundation                      0x360cf649 ___forwarding___ + 508
4   CoreFoundation                      0x36046180 _CF_forwarding_prep_0 + 48
5   smb                                 0x000627f3 -[MobClick sendThread:] + 1990
6   Foundation                          0x34a31389 -[NSThread main] + 44
7   Foundation                          0x34aa35cd __NSThread__main__ + 972
8   libsystem_c.dylib                   0x32ff4311 _pthread_start + 248
9   libsystem_c.dylib                   0x32ff5bbc start_wqthread + 0
)
terminate called after throwing an instance of 'NSException'
(gdb) 希望有iphone的开发高手能够指点指点
注:相同的代码在3和wifi的情况下运行是非常正常的

解决方案 »

  1.   

     Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFString countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance 0x2caec0' 
    设断点看看。是不是网络改变后你要的数据没有获得导致。说得很明白,地址0x2caec0的对象实例,不能访问。
      

  2.   


    我断点发现崩溃在一个数组的初始化   可初始化的对象只是uiviewControl不涉及到数据加载。经过测试,如果用用的是联通卡,关闭3g,用2g  是正常的。可用户如果用的是移动卡,就会挂掉
      

  3.   

    原来是友盟提供的统计SDK有问题。在GPRS的情况下,调用友盟的SDK 就会崩溃掉。具体解决方案还在查看中,希望有遇到这个问题的朋友能够给点意见。
      

  4.   

    在网络环境差的情况下友盟的SDK可能会有这样的问题,但情况极少,并且针对您遇到的情况,我们本月发布的最新版本的SDK 1.6.7.1 已经修复了这个问题了,谢谢对友盟提出的问题,我们会持续改进并谢谢继续支持