使用Swift 3.0和xcode 8.3构建的应用正在使用Firebase,Fabric,Crashlytics,Realm,Kingfisher以及最近两天在启动屏幕上显示3000多起突然崩溃的Pod。目前最棘手的问题是它在所有有问题的设备中都能正常工作。现在无法重现崩溃。我想这是与Swift 3.0的xcode构建系统相关的问题。此外,它可能是Fabric / crashlytics的私有API问题,与swift 3.0冲突。它说超出范围的异常,但是在登录屏幕中没有这样的已知数据。用户启动该应用程序,停留几秒钟,它在没有任何用户交互的情况下崩溃。在crashlytics中,错误类似于:
specialized _ArrayBuffer._getElementSlowPath(Int) -> AnyObject
Fatal Exception: NSRangeException
0 CoreFoundation 0x181ba2d8c __exceptionPreprocess
1 libobjc.A.dylib 0x180d5c5ec objc_exception_throw
2 CoreFoundation 0x181afe448 -[__NSArray0 objectEnumerator]
3 PHOTO ACCESS 0x102d7974c specialized _ArrayBuffer._getElementSlowPath(Int) -> AnyObject (CalendarView.swift)
4 PHOTO ACCESS 0x102cc1bd8 specialized AppDelegate.ServiceModelDidFinishTask(ServiceModel, data : ServiceData!, service : Service) -> () (AppDelegate.swift:451)
5 PHOTO ACCESS 0x102cc0594 protocol witness for ServiceModelDelegate.ServiceModelDidFinishTask(ServiceModel, data : ServiceData!, service : Service) -> () in conformance AppDelegate (AppDelegate.swift)
6 PHOTO ACCESS 0x102d61e1c specialized ServiceModel.webServiceDidFinishTask(WebService, data : ServiceData, service : Service, urlData : String?) -> () (ServiceModel.swift:506)
7 PHOTO ACCESS 0x102d5ef3c protocol witness for WebServiceDelegate.webServiceDidFinishTask(WebService, data : ServiceData, service : Service, urlData : String?) -> () in conformance ServiceModel (ServiceModel.swift)
8 PHOTO ACCESS 0x102d33fd0 specialized WebService.procesAPIResponse(response : AnyObject, returnData : Data!) -> () (PhotoWebservice.swift:289)
9 PHOTO ACCESS 0x102d34550 partial apply for WebService.(callService() -> ()).(closure #2) (PhotoWebservice.swift)
10 CFNetwork 0x182131e4c __75-[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:]_block_invoke
11 CFNetwork 0x18214ab6c __49-[__NSCFLocalSessionTask _task_onqueue_didFinish]_block_invoke
12 Foundation 0x1825cae88 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__
13 Foundation 0x18250c8d0 -[NSBlockOperation main]
14 Foundation 0x18250bcac -[__NSOperationInternal _start:]
15 libdispatch.dylib 0x181494a60 _dispatch_client_callout
16 libdispatch.dylib 0x18149c170 _dispatch_block_invoke_direct$VARIANT$mp
17 libdispatch.dylib 0x181494a60 _dispatch_client_callout
18 libdispatch.dylib 0x18149c170 _dispatch_block_invoke_direct$VARIANT$mp
19 libdispatch.dylib 0x18149c05c dispatch_block_perform$VARIANT$mp
20 Foundation 0x1825cc750 __NSOQSchedule_f
21 libdispatch.dylib 0x181494a60 _dispatch_client_callout
22 libdispatch.dylib 0x18149ce94 _dispatch_continuation_pop$VARIANT$mp
23 libdispatch.dylib 0x18149b7cc _dispatch_async_redirect_invoke$VARIANT$mp
24 libdispatch.dylib 0x1814a1cac _dispatch_root_queue_drain
25 libdispatch.dylib 0x1814a19fc _dispatch_worker_thread3
26 libsystem_pthread.dylib 0x1817c7fac _pthread_wqthread
27 libsystem_pthread.dylib 0x1817c7b08 start_wqthread
可怕的是,登录屏幕中没有调用calenderview.swift。这可能与崩溃有关。
相关问题:
Swift Crash: Array._allocateBufferUninitialized
https://github.com/ephread/Instructions/issues/179
https://git.snooey.net/Mirrors/swift/commit/6d03fe0a73f31bb6ab95e5c17a6ac3278baaeb1c
what is `_ArrayBuffer` in Swift and how and when I should to use it?
有人遇到过这个问题吗?