iOS 9版iphone应用程序出现奇怪的崩溃

iOS 9版iphone应用程序出现奇怪的崩溃,ios,swift3,ios9,crashlytics,Ios,Swift3,Ios9,Crashlytics,我在运行iOS 9.2的设备上收到我的应用程序crashlytics的崩溃报告。它不会每次都发生,也不会总是在应用程序中的同一点发生。有时当用户刚打开时,有时当用户进一步进入时。我可以在报告中看到哪一行有问题,但我不理解错误 # OS Version: 9.2.1 # Device: iPhone 6 # RAM Free: 27.6% # Disk Free: 20.6% #0. Crashed: com.apple.main-thread 0 libswiftCore.dylib

我在运行iOS 9.2的设备上收到我的应用程序crashlytics的崩溃报告。它不会每次都发生,也不会总是在应用程序中的同一点发生。有时当用户刚打开时,有时当用户进一步进入时。我可以在报告中看到哪一行有问题,但我不理解错误

# OS Version: 9.2.1
# Device: iPhone 6
# RAM Free: 27.6%
# Disk Free: 20.6%

#0. Crashed: com.apple.main-thread
0  libswiftCore.dylib             0x100a71c5c _assertionFailed(StaticString, String, StaticString, UInt, flags : UInt32) -> Never (__hidden#16085_:167)
1  libswiftCore.dylib             0x100a919c0 _hidden#1062_ + 504
2  libswiftCore.dylib             0x100a917c8 swift_errorInMain + 26
3  Matura                         0x10010b570 specialized APIAsync.getRealmObjectBasedOnString(type : String) -> Object.Type? (APIAsync.swift)
4  Matura                         0x10010cec0 specialized APIAsync.checkUserExists(email : String) -> [AnyObject] (APIAsync.swift)
5  Matura                         0x10010dacc specialized APIAsync.login(email : String, password : String, callback : (Bool, String) -> ()) -> () (APIAsync.swift)
6  Matura                         0x1000cf444 specialized LoginViewController.login(UIButton) -> () (LoginViewController.swift)
7  Matura                         0x1000ce644 @objc LoginViewController.login(UIButton) -> () (LoginViewController.swift)
8  UIKit                          0x18852fe50 -[UIApplication sendAction:to:from:forEvent:] + 100
9  UIKit                          0x18852fdcc -[UIControl sendAction:to:forEvent:] + 80
10 UIKit                          0x188517a88 -[UIControl _sendActionsForEvents:withEvent:] + 416
11 UIKit                          0x18852f6e4 -[UIControl touchesEnded:withEvent:] + 572
12 UIKit                          0x18852f314 -[UIWindow _sendTouchesForEvent:] + 804
13 UIKit                          0x188527e30 -[UIWindow sendEvent:] + 784
14 UIKit                          0x1884f84cc -[UIApplication sendEvent:] + 248
15 UIKit                          0x1884f6794 _UIApplicationHandleEventQueue + 5528
16 CoreFoundation                 0x1837bcefc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
17 CoreFoundation                 0x1837bc990 __CFRunLoopDoSources0 + 540
18 CoreFoundation                 0x1837ba690 __CFRunLoopRun + 724
19 CoreFoundation                 0x1836e9680 CFRunLoopRunSpecific + 384
20 GraphicsServices               0x184bf8088 GSEventRunModal + 180
21 UIKit                          0x188560d90 UIApplicationMain + 204
22 Matura                         0x1000c5748 main (EngleskiPitanja.swift:15)
23 libdispatch.dylib              0x18328a8b8 (Missing)

--

#0. Crashed: com.apple.main-thread
0  libswiftCore.dylib             0x100a71c5c _assertionFailed(StaticString, String, StaticString, UInt, flags : UInt32) -> Never (__hidden#16085_:167)
1  libswiftCore.dylib             0x100a919c0 _hidden#1062_ + 504
2  libswiftCore.dylib             0x100a917c8 swift_errorInMain + 26
3  Matura                         0x10010b570 specialized APIAsync.getRealmObjectBasedOnString(type : String) -> Object.Type? (APIAsync.swift)
4  Matura                         0x10010cec0 specialized APIAsync.checkUserExists(email : String) -> [AnyObject] (APIAsync.swift)
5  Matura                         0x10010dacc specialized APIAsync.login(email : String, password : String, callback : (Bool, String) -> ()) -> () (APIAsync.swift)
6  Matura                         0x1000cf444 specialized LoginViewController.login(UIButton) -> () (LoginViewController.swift)
7  Matura                         0x1000ce644 @objc LoginViewController.login(UIButton) -> () (LoginViewController.swift)
8  UIKit                          0x18852fe50 -[UIApplication sendAction:to:from:forEvent:] + 100
9  UIKit                          0x18852fdcc -[UIControl sendAction:to:forEvent:] + 80
10 UIKit                          0x188517a88 -[UIControl _sendActionsForEvents:withEvent:] + 416
11 UIKit                          0x18852f6e4 -[UIControl touchesEnded:withEvent:] + 572
12 UIKit                          0x18852f314 -[UIWindow _sendTouchesForEvent:] + 804
13 UIKit                          0x188527e30 -[UIWindow sendEvent:] + 784
14 UIKit                          0x1884f84cc -[UIApplication sendEvent:] + 248
15 UIKit                          0x1884f6794 _UIApplicationHandleEventQueue + 5528
16 CoreFoundation                 0x1837bcefc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
17 CoreFoundation                 0x1837bc990 __CFRunLoopDoSources0 + 540
18 CoreFoundation                 0x1837ba690 __CFRunLoopRun + 724
19 CoreFoundation                 0x1836e9680 CFRunLoopRunSpecific + 384
20 GraphicsServices               0x184bf8088 GSEventRunModal + 180
21 UIKit                          0x188560d90 UIApplicationMain + 204
22 Matura                         0x1000c5748 main (EngleskiPitanja.swift:15)
23 libdispatch.dylib              0x18328a8b8 (Missing)

#1. com.apple.libdispatch-manager
0  libsystem_kernel.dylib         0x1833a94fc kevent_qos + 8
1  libdispatch.dylib              0x18326c94c _dispatch_mgr_invoke + 232
2  libdispatch.dylib              0x18325b7bc _dispatch_source_invoke + 50

#2. Thread
0  libsystem_kernel.dylib         0x1833a8b6c __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x18346d530 _pthread_wqthread + 1284
2  libsystem_pthread.dylib        0x18346d020 start_wqthread + 4

#3. Thread
0  libsystem_kernel.dylib         0x1833a8b6c __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x18346d530 _pthread_wqthread + 1284
2  libsystem_pthread.dylib        0x18346d020 start_wqthread + 4

#4. Thread
0  libsystem_kernel.dylib         0x1833a8b6c __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x18346d530 _pthread_wqthread + 1284
2  libsystem_pthread.dylib        0x18346d020 start_wqthread + 4

#5. Thread
0  libsystem_kernel.dylib         0x1833a8b6c __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x18346d530 _pthread_wqthread + 1284
2  libsystem_pthread.dylib        0x18346d020 start_wqthread + 4

#6. Thread
0  libsystem_kernel.dylib         0x1833a8b6c __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x18346d530 _pthread_wqthread + 1284
2  libsystem_pthread.dylib        0x18346d020 start_wqthread + 4

#7. com.twitter.crashlytics.ios.MachExceptionServer
0  Matura                         0x10013615c CLSProcessRecordAllThreads (CLSProcess.c:376)
1  Matura                         0x10013615c CLSProcessRecordAllThreads (CLSProcess.c:376)
2  Matura                         0x10013600c CLSProcessRecordAllThreads (CLSProcess.c:407)
3  Matura                         0x1001262b0 CLSHandler (CLSHandler.m:26)
4  Matura                         0x100121278 CLSMachExceptionServer (CLSMachException.c:446)
5  libsystem_pthread.dylib        0x18346fb28 _pthread_body + 156
6  libsystem_pthread.dylib        0x18346fa8c _pthread_body + 154
7  libsystem_pthread.dylib        0x18346d028 thread_start + 4

#8. Thread
0  libsystem_kernel.dylib         0x1833a8b6c __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x18346d530 _pthread_wqthread + 1284
2  libsystem_pthread.dylib        0x18346d020 start_wqthread + 4

#9. Thread
0  libsystem_kernel.dylib         0x1833a8b6c __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x18346d530 _pthread_wqthread + 1284
2  libsystem_pthread.dylib        0x18346d020 start_wqthread + 4

#10. com.apple.NSURLConnectionLoader
0  libsystem_kernel.dylib         0x18338d4bc mach_msg_trap + 8
1  libsystem_kernel.dylib         0x18338d338 mach_msg + 72
2  CoreFoundation                 0x1837bcac0 __CFRunLoopServiceMachPort + 196
3  CoreFoundation                 0x1837ba7c4 __CFRunLoopRun + 1032
4  CoreFoundation                 0x1836e9680 CFRunLoopRunSpecific + 384
5  CFNetwork                      0x183e59434 +[NSURLConnection(Loader) _resourceLoadLoop:] + 412
6  Foundation                     0x1841c7c40 __NSThread__start__ + 1000
7  libsystem_pthread.dylib        0x18346fb28 _pthread_body + 156
8  libsystem_pthread.dylib        0x18346fa8c _pthread_body + 154
9  libsystem_pthread.dylib        0x18346d028 thread_start + 4

#11. Thread
0  libsystem_kernel.dylib         0x1833a8b6c __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x18346d530 _pthread_wqthread + 1284
2  libsystem_pthread.dylib        0x18346d020 start_wqthread + 4

#12. Thread
0  libsystem_kernel.dylib         0x1833a8b6c __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x18346d530 _pthread_wqthread + 1284
2  libsystem_pthread.dylib        0x18346d020 start_wqthread + 4

#13. Thread
0  libsystem_kernel.dylib         0x1833a8b6c __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x18346d530 _pthread_wqthread + 1284
2  libsystem_pthread.dylib        0x18346d020 start_wqthread + 4

#14. com.apple.CFSocket.private
0  libsystem_kernel.dylib         0x1833a8368 __select + 8
1  CoreFoundation                 0x1837c3028 __CFSocketManager + 648
2  libsystem_pthread.dylib        0x18346fb28 _pthread_body + 156
3  libsystem_pthread.dylib        0x18346fa8c _pthread_body + 154
4  libsystem_pthread.dylib        0x18346d028 thread_start + 4
这是否意味着“Engleskiptanja”类缺失?如果是这样,我不明白为什么,因为它在项目中

这就是导致崩溃的方法

func getRealmObjectBasedOnString(type: String) -> Object.Type?{
    guard let objectType = NSClassFromString("Matura.\(type)") else {
        //print("fail \(type)")
        return nil
    }
    return objectType as? Object.Type
}

为了更好地进行碰撞分析,您可以应用febric
?如果是这样的话,那么我已经有了,这就是我得到崩溃报告的地方@vinodkumarplese也放了fabric crashreport@Filipedownloadedtxt文件并粘贴在这里,希望这就是你的意思@VinodKumar