'-[__NSCFString replaceOccurrencesOfString:withString:options:range:]: nil argument'

2016-09-21 15:27:09.838 HandShaker[10945:178953] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString replaceOccurrencesOfString:withString:options:range:]: nil argument'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fffa118b4f2 __exceptionPreprocess + 178
	1   libobjc.A.dylib                     0x00007fff9d0b273c objc_exception_throw + 48
	2   CoreFoundation                      0x00007fffa11f24bd +[NSException raise:format:] + 205
	3   CoreFoundation                      0x00007fffa10d8f5c -[__NSCFString replaceOccurrencesOfString:withString:options:range:] + 156
	4   Foundation                          0x00007fff9790ad35 -[NSString stringByReplacingOccurrencesOfString:withString:options:range:] + 184
	5   Foundation                          0x00007fff9790ac6e -[NSString stringByReplacingOccurrencesOfString:withString:] + 92
	6   HandShaker                          0x0000000100037f40 -[SFViewModel setSffile:] + 2080
	7   HandShaker                          0x0000000100037370 -[SFViewModel initWithSFFile:withClient:] + 768
	8   HandShaker                          0x000000010017d3e1 -[SFPhotoAlbumsViewModel parserPhotoLibraryData:] + 1297
	9   HandShaker                          0x0000000100071eec __53-[SFPhotoViewController _reloadLibraryDataFromDevice]_block_invoke + 1084
	10  SmartFinderCore                     0x00000001004ad913 __44-[SSPManager fetchPhotoLibraryWithCallback:]_block_invoke + 1171
	11  SmartFinderCore                     0x0000000100538be0 __69-[SSPGetPhotoLibraryRequestOperation initWithSSPManager:andCallback:]_block_invoke.81 + 48
	12  libdispatch.dylib                   0x0000000100938070 _dispatch_call_block_and_release + 12
	13  libdispatch.dylib                   0x000000010092acc5 _dispatch_client_callout + 8
	14  libdispatch.dylib                   0x00000001009426ae _dispatch_main_queue_callback_4CF + 2845
	15  CoreFoundation                      0x00007fffa11409e9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
	16  CoreFoundation                      0x00007fffa10ff8dd __CFRunLoopRun + 1949
	17  CoreFoundation                      0x00007fffa10feed8 CFRunLoopRunSpecific + 296
	18  HIToolbox                           0x00007fff92988935 RunCurrentEventLoopInMode + 235
	19  HIToolbox                           0x00007fff9298876f ReceiveNextEventCommon + 432
	20  HIToolbox                           0x00007fff929885af _BlockUntilNextEventMatchingListInModeWithFilter + 71
	21  AppKit                              0x00007fff9b646df6 _DPSNextEvent + 1067
	22  AppKit                              0x00007fff9b646226 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
	23  AppKit                              0x00007fff9b63ad80 -[NSApplication run] + 682
	24  AppKit                              0x00007fff9b604368 NSApplicationMain + 1176
	25  HandShaker                          0x0000000100017712 main + 34
	26  libdyld.dylib                       0x00007fff9e4a45ad start + 1
	27  ???                                 0x0000000000000003 0x0 + 3
)
</pre><pre code_snippet_id="1891872" snippet_file_name="blog_20160921_3_4390713" name="code" class="objc">


找到以下代码,root为空,便会提示这个错误。

rootRelativePath = [folder stringByReplacingOccurrencesOfString:root withString:@""];



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值