Performing any operation from a background thread on UIView or a subclass is not supported and may result in unexpected and insidious behavior - swift4.2

I want to make a http get request. after requesting if the request can give successful response then the other functionality works fine. but if could not give a successful response, then it takes long time loading and make this issue. after finishing loading, open new activity and then the button of new activity not working.
func httpRequester(url: String){
let myUrl = NSURL(string: url)
let request = NSMutableURLRequest(url: myUrl! as URL)
request.httpMethod = "GET"
var responseString = "Not Found"
let task = URLSession.shared.dataTask(with: request as URLRequest) {
data, response, error in
if error != nil {
self.performSegue(withIdentifier: "statusActivity", sender: Any?.self)
//self.removeSpinner()
}else {
responseString = String(data: data!, encoding: String.Encoding(rawValue: String.Encoding.utf8.rawValue))!
print("responseString1 = \(responseString)")
if responseString == "Not Found" {
self.performSegue(withIdentifier: "statusActivity", sender: Any?.self)
}
//self.removeSpinner()
}
}
task.resume()
}
> [Animation] +[UIView setAnimationsEnabled:] being called from a background thread. Performing any operation from a background thread
> on UIView or a subclass is not supported and may result in unexpected
> and insidious behavior. trace=(
> 0 UIKitCore 0x00000001da64e4d4 <redacted> + 116
> 1 libdispatch.dylib 0x0000000101a04c74 _dispatch_client_callout + 16
> 2 libdispatch.dylib 0x0000000101a06c84 _dispatch_once_callout + 84
> 3 UIKitCore 0x00000001da64e45c <redacted> + 100
> 4 UIKitCore 0x00000001da64e5c8 <redacted> + 92
> 5 UIKitCore 0x00000001da614eac <redacted> + 504
> 6 UIKitCore 0x00000001da610030 <redacted> + 340
> 7 UIKitCore 0x00000001da1b85a8 <redacted> + 2064
> 8 UIKitCore 0x00000001da1b5a98 <redacted> + 176
> 9 TTGSnackbar 0x000000010142d9f0 $sSo23UIActivityIndicatorViewC5styleABSo0abC5StyleV_tcfcTO + 40
> 10 TTGSnackbar 0x000000010142b890 $sSo23UIActivityIndicatorViewC5styleABSo0abC5StyleV_tcfC + 52
> 11 TTGSnackbar 0x000000010141ad38 $s11TTGSnackbarAAC9configure33_3D47E74E3F8A802BB77D3DD363ACFD63LLyyF +
> 13072
> 12 TTGSnackbar 0x0000000101420778 $s11TTGSnackbarAAC7message8durationABSS_AA0A8DurationOtcfc + 4644
> 13 TTGSnackbar 0x000000010141f544 $s11TTGSnackbarAAC7message8durationABSS_AA0A8DurationOtcfC + 76
> 14 SynopiLive360 0x0000000100e03ff0 $s13SynopiLive360010StatusViewD10ControllerC5coderACSgSo7NSCoderC_tcfc
> + 408
> 15 SynopiLive360 0x0000000100e04564 $s13SynopiLive360010StatusViewD10ControllerC5coderACSgSo7NSCoderC_tcfcTo
> + 56
> 16 UIKitCore 0x00000001d9e8bf90 <redacted> + 248
> 17 UIFoundation 0x00000001b841af28 <redacted> + 744
> 18 UIFoundation 0x00000001b83ba304 <redacted> + 316
> 19 UIKitCore 0x00000001d9e90484 <redacted> + 188
> 20 UIFoundation 0x00000001b841af28 <redacted> + 744
> 21 UIFoundation 0x00000001b841b16c <redacted> + 1324
> 22 UIFoundation 0x00000001b83ba304 <redacted> + 316
> 23 UIKitCore 0x00000001d9e8dd6c <redacted> + 1120
> 24 UIKitCore 0x00000001da35c084 <redacted> + 196
> 25 UIKitCore 0x00000001da35cc84 <redacted> + 92
> 26 UIKitCore 0x00000001da35cee0 <redacted> + 56
> 27 UIKitCore 0x00000001d9c2d3e4 <redacted> + 104
> 28 SynopiLive360 0x0000000100e2fc24 $s13SynopiLive36022LoggedInViewControllerC12updateUrlkey3url3keyySS_SStF
> + 3160
> 29 SynopiLive360 0x0000000100e29e60 $s13SynopiLive36022LoggedInViewControllerC19simpleGetUrlRequest3url5tokenySS_SStFy10Foundation4DataVSg_So13NSURLResponseCSgs5Error_pSgtcfU_
> + 1048
> 30 SynopiLive360 0x0000000100e29464 $s10Foundation4DataVSgSo13NSURLResponseCSgs5Error_pSgIegggg_So6NSDataCSgAGSo7NSErrorCSgIeyByyy_TR
> + 284
> 31 CFNetwork 0x00000001ae3a8688 <redacted> + 32
> 32 CFNetwork 0x00000001ae3bc220 <redacted> + 176
> 33 Foundation 0x00000001ae838f68 <redacted> + 16
> 34 Foundation 0x00000001ae745420 <redacted> + 72
> 35 Foundation 0x00000001ae744908 <redacted> + 740
> 36 Foundation 0x00000001ae83acec <redacted> + 272
> 37 libdispatch.dylib 0x0000000101a036f0 _dispatch_call_block_and_release + 24
> 38 libdispatch.dylib 0x0000000101a04c74 _dispatch_client_callout + 16
> 39 libdispatch.dylib 0x0000000101a07ffc _dispatch_continuation_pop + 524
> 40 libdispatch.dylib 0x0000000101a07458 _dispatch_async_redirect_invoke + 628
> 41 libdispatch.dylib 0x0000000101a15dc8 _dispatch_root_queue_drain + 372
> 42 libdispatch.dylib 0x0000000101a167ac _dispatch_worker_thread2 + 156
> 43 libsystem_pthread.dylib 0x00000001ad9f51b4 _pthread_wqthread + 464
> 44 libsystem_pthread.dylib 0x00000001ad9f7cd4 start_wqthread + 4
> )
> 2019-06-26 12:10:53.567764+0600 SynopiLive360[975:143540] [Assert] Cannot be called with asCopy = NO on non-main thread.
> stskhtkehy
> streamUrl111: empty
> streamKey111: empty
> btndisp111: +8801779722399
> btndisp111: 1234
> updateUi: empty
> isSuccessUi: false
> internetChanged: connected
> 2019-06-26 12:10:53.581584+0600 SynopiLive360[975:143540] This application is modifying the autolayout engine from a background
> thread after the engine was accessed from the main thread. This can
> lead to engine corruption and weird crashes.
> Stack:(
> 0 Foundation 0x00000001ae943474 <redacted> + 96
> 1 Foundation 0x00000001ae74eaec <redacted> + 36
> 2 UIKitCore 0x00000001da64698c <redacted> + 788
> 3 UIKitCore 0x00000001da655ddc <redacted> + 1740
> 4 UIKitCore 0x00000001da644d54 <redacted> + 64
> 5 SynopiLive360 0x0000000100dc3d18 $s13SynopiLive36014SegueFromRightC7performyyF + 960
> 6 SynopiLive360 0x0000000100dc4564 $s13SynopiLive36014SegueFromRightC7performyyFTo + 40
> 7 UIKitCore 0x00000001da35d058 <redacted> + 292
> 8 UIKitCore 0x00000001da35cf04 <redacted> + 92
> 9 UIKitCore 0x00000001d9c2d3e4 <redacted> + 104
> 10 SynopiLive360 0x0000000100e2fc24 $s13SynopiLive36022LoggedInViewControllerC12updateUrlkey3url3keyySS_SStF
> + 3160
> 11 SynopiLive360 0x0000000100e29e60 $s13SynopiLive36022LoggedInViewControllerC19simpleGetUrlRequest3url5tokenySS_SStFy10Foundation4DataVSg_So13NSURLResponseCSgs5Error_pSgtcfU_
> + 1048
> 12 SynopiLive360 0x0000000100e29464 $s10Foundation4DataVSgSo13NSURLResponseCSgs5Error_pSgIegggg_So6NSDataCSgAGSo7NSErrorCSgIeyByyy_TR
> + 284
> 13 CFNetwork 0x00000001ae3a8688 <redacted> + 32
> 14 CFNetwork 0x00000001ae3bc220 <redacted> + 176
> 15 Foundation 0x00000001ae838f68 <redacted> + 16
> 16 Foundation 0x00000001ae745420 <redacted> + 72
> 17 Foundation 0x00000001ae744908 <redacted> + 740
> 18 Foundation 0x00000001ae83acec <redacted> + 272
> 19 libdispatch.dylib 0x0000000101a036f0 _dispatch_call_block_and_release + 24
> 20 libdispatch.dylib 0x0000000101a04c74 _dispatch_client_callout + 16
> 21 libdispatch.dylib 0x0000000101a07ffc _dispatch_continuation_pop + 524
> 22 libdispatch.dylib 0x0000000101a07458 _dispatch_async_redirect_invoke + 628
> 23 libdispatch.dylib 0x0000000101a15dc8 _dispatch_root_queue_drain + 372
> 24 libdispatch.dylib 0x0000000101a167ac _dispatch_worker_thread2 + 156
> 25 libsystem_pthread.dylib 0x00000001ad9f51b4 _pthread_wqthread + 464
> 26 libsystem_pthread.dylib 0x00000001ad9f7cd4 start_wqthread + 4
> )
> 2019-06-26 12:10:53.587827+0600 SynopiLive360[975:143540] This application is modifying the autolayout engine from a background
> thread after the engine was accessed from the main thread. This can
> lead to engine corruption and weird crashes.
> Stack:(
> 0 Foundation 0x00000001ae943474 <redacted> + 96
> 1 Foundation 0x00000001ae74eaec <redacted> + 36
> 2 UIKitCore 0x00000001da64698c <redacted> + 788
> 3 UIKitCore 0x00000001da655ddc <redacted> + 1740
> 4 SynopiLive360 0x0000000100e49e1c $sSo16UIViewControllerC13SynopiLive360E9grayColor6onViewySo0A0C_tF +
> 1064
> 5 SynopiLive360 0x0000000100e2fcf8 $s13SynopiLive36022LoggedInViewControllerC12updateUrlkey3url3keyySS_SStF
> + 3372
> 6 SynopiLive360 0x0000000100e29e60 $s13SynopiLive36022LoggedInViewControllerC19simpleGetUrlRequest3url5tokenySS_SStFy10Foundation4DataVSg_So13NSURLResponseCSgs5Error_pSgtcfU_
> + 1048
> 7 SynopiLive360 0x0000000100e29464 $s10Foundation4DataVSgSo13NSURLResponseCSgs5Error_pSgIegggg_So6NSDataCSgAGSo7NSErrorCSgIeyByyy_TR
> + 284
> 8 CFNetwork 0x00000001ae3a8688 <redacted> + 32
> 9 CFNetwork 0x00000001ae3bc220 <redacted> + 176
> 10 Foundation 0x00000001ae838f68 <redacted> + 16
> 11 Foundation 0x00000001ae745420 <redacted> + 72
> 12 Foundation 0x00000001ae744908 <redacted> + 740
> 13 Foundation 0x00000001ae83acec <redacted> + 272
> 14 libdispatch.dylib 0x0000000101a036f0 _dispatch_call_block_and_release + 24
> 15 libdispatch.dylib 0x0000000101a04c74 _dispatch_client_callout + 16
> 16 libdispatch.dylib 0x0000000101a07ffc _dispatch_continuation_pop + 524
> 17 libdispatch.dylib 0x0000000101a07458 _dispatch_async_redirect_invoke + 628
> 18 libdispatch.dylib 0x0000000101a15dc8 _dispatch_root_queue_drain + 372
> 19 libdispatch.dylib 0x0000000101a167ac _dispatch_worker_thread2 + 156
> 20 libsystem_pthread.dylib 0x00000001ad9f51b4 _pthread_wqthread + 464
> 21 libsystem_pthread.dylib 0x00000001ad9f7cd4 start_wqthread + 4
> )
> 2019-06-26 12:10:53.592944+0600 SynopiLive360[975:143540] This application is modifying the autolayout engine from a background
> thread after the engine was accessed from the main thread. This can
> lead to engine corruption and weird crashes.
> Stack:(
> 0 Foundation 0x00000001ae943474 <redacted> + 96
> 1 Foundation 0x00000001ae74eaec <redacted> + 36
> 2 UIKitCore 0x00000001da5a3308 <redacted> + 560
> 3 UIKitCore 0x00000001da5a3094 <redacted> + 220
> 4 UIKitCore 0x00000001da646a84 <redacted> + 120
> 5 Foundation 0x00000001ae74eb34 <redacted> + 108
> 6 UIKitCore 0x00000001da64698c <redacted> + 788
> 7 UIKitCore 0x00000001da655ddc <redacted> + 1740
> 8 SynopiLive360 0x0000000100e49e1c $sSo16UIViewControllerC13SynopiLive360E9grayColor6onViewySo0A0C_tF +
> 1064
> 9 SynopiLive360 0x0000000100e2fcf8 $s13SynopiLive36022LoggedInViewControllerC12updateUrlkey3url3keyySS_SStF
> + 3372
> 10 SynopiLive360 0x0000000100e29e60 $s13SynopiLive36022LoggedInViewControllerC19simpleGetUrlRequest3url5tokenySS_SStFy10Foundation4DataVSg_So13NSURLResponseCSgs5Error_pSgtcfU_
> + 1048
> 11 SynopiLive360 0x0000000100e29464 $s10Foundation4DataVSgSo13NSURLResponseCSgs5Error_pSgIegggg_So6NSDataCSgAGSo7NSErrorCSgIeyByyy_TR
> + 284
> 12 CFNetwork 0x00000001ae3a8688 <redacted> + 32
> 13 CFNetwork 0x00000001ae3bc220 <redacted> + 176
> 14 Foundation 0x00000001ae838f68 <redacted> + 16
> 15 Foundation 0x00000001ae745420 <redacted> + 72
> 16 Foundation 0x00000001ae744908 <redacted> + 740
> 17 Foundation 0x00000001ae83acec <redacted> + 272
> 18 libdispatch.dylib 0x0000000101a036f0 _dispatch_call_block_and_release + 24
> 19 libdispatch.dylib 0x0000000101a04c74 _dispatch_client_callout + 16
> 20 libdispatch.dylib 0x0000000101a07ffc _dispatch_continuation_pop + 524
> 21 libdispatch.dylib 0x0000000101a07458 _dispatch_async_redirect_invoke + 628
> 22 libdispatch.dylib 0x0000000101a15dc8 _dispatch_root_queue_drain + 372
> 23 libdispatch.dylib 0x0000000101a167ac _dispatch_worker_thread2 + 156
> 24 libsystem_pthread.dylib 0x00000001ad9f51b4 _pthread_wqthread + 464
> 25 libsystem_pthread.dylib 0x00000001ad9f7cd4 start_wqthread + 4
> )
> 2019-06-26 12:10:55.243945+0600 SynopiLive360[975:143336] [LayoutConstraints] Unable to simultaneously satisfy constraints.
> Probably at least one of the constraints in the following list is one you don't want.
> Try this:
> (1) look at each constraint and try to figure out which you don't expect;
> (2) find the code that added the unwanted constraint or constraints and fix it.
> (
> "<NSLayoutConstraint:0x2837c0d70 UILabel:0x101cac270'Synopi Live 360'.width == 374 (active)>",
> "<NSLayoutConstraint:0x2837c10e0 UILayoutGuide:0x282dd9f80'UIViewSafeAreaLayoutGuide'.trailing ==
> UILabel:0x101cac270'Synopi Live 360'.trailing + 20 (active)>",
> "<NSLayoutConstraint:0x2837c0690 UILabel:0x101cac270'Synopi Live 360'.leading ==
> UILayoutGuide:0x282dd9f80'UIViewSafeAreaLayoutGuide'.leading + 20
> (active)>",
> "<NSLayoutConstraint:0x2837f8000 'UIView-Encapsulated-Layout-Width' UIView:0x101b22a50.width == 375
> (active)>",
> "<NSLayoutConstraint:0x2837c0b40 'UIViewSafeAreaLayoutGuide-left'
> H:|-(0)-[UILayoutGuide:0x282dd9f80'UIViewSafeAreaLayoutGuide'](LTR)
> (active, names: '|':UIView:0x101b22a50 )>",
> "<NSLayoutConstraint:0x2837c2ee0 'UIViewSafeAreaLayoutGuide-right'
> H:[UILayoutGuide:0x282dd9f80'UIViewSafeAreaLayoutGuide']-(0)-|(LTR)
> (active, names: '|':UIView:0x101b22a50 )>"
> )
>
> Will attempt to recover by breaking constraint
> <NSLayoutConstraint:0x2837c0d70 UILabel:0x101cac270'Synopi Live 360'.width == 374 (active)>
>
> Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
> The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
> 2019-06-26 12:12:20.716885+0600 SynopiLive360[975:143540] This application is modifying the autolayout engine from a background
> thread after the engine was accessed from the main thread. This can
> lead to engine corruption and weird crashes.
> Stack:(
> 0 Foundation 0x00000001ae943474 <redacted> + 96
> 1 Foundation 0x00000001ae74eaec <redacted> + 36
> 2 UIKitCore 0x00000001da5a4fbc <redacted> + 92
> 3 UIKitCore 0x00000001da5a3acc <redacted> + 120
> 4 UIKitCore 0x00000001da5a4bdc <redacted> + 168
> 5 UIKitCore 0x00000001da595664 <redacted> + 96
> 6 UIKitCore 0x00000001da5a5a60 <redacted> + 416
> 7 UIKitCore 0x00000001da648878 <redacted> + 328
> 8 UIKitCore 0x00000001da65beb8 <redacted> + 1392
> 9 QuartzCore 0x00000001b22621f0 <redacted> + 184
> 10 QuartzCore 0x00000001b2267198 <redacted> + 332
> 11 QuartzCore 0x00000001b21ca0a8 <redacted> + 348
> 12 QuartzCore 0x00000001b21f8108 <redacted> + 640
> 13 QuartzCore 0x00000001b21f9288 <redacted> + 228
> 14 libsystem_pthread.dylib 0x00000001ad9f74b4 <redacted> + 580
> 15 libsystem_pthread.dylib 0x00000001ad9f4904 <redacted> + 80
> 16 libsystem_pthread.dylib 0x00000001ad9f5508 pthread_workqueue_setdispatchoffset_np + 0
> 17 libsystem_pthread.dylib 0x00000001ad9f514c _pthread_wqthread + 360
> 18 libsystem_pthread.dylib 0x00000001ad9f7cd4 start_wqthread + 4
> )
> 2019-06-26 12:12:20.735424+0600 SynopiLive360[975:143540] This application is modifying the autolayout engine from a background
> thread after the engine was accessed from the main thread. This can
> lead to engine corruption and weird crashes.
> Stack:(
> 0 Foundation 0x00000001ae943474 <redacted> + 96
> 1 Foundation 0x00000001ae74eaec <redacted> + 36
> 2 UIKitCore 0x00000001da5a4ae0 <redacted> + 120
> 3 UIKitCore 0x00000001da5a4780 <redacted> + 692
> 4 UIKitCore 0x00000001da5a4780 <redacted> + 692
> 5 Foundation 0x00000001ae74eb34 <redacted> + 108
> 6 UIKitCore 0x00000001da5a4fbc <redacted> + 92
> 7 UIKitCore 0x00000001da5a3acc <redacted> + 120
> 8 UIKitCore 0x00000001da5a4bdc <redacted> + 168
> 9 UIKitCore 0x00000001da595664 <redacted> + 96
> 10 UIKitCore 0x00000001da5a5a60 <redacted> + 416
> 11 UIKitCore 0x00000001da648878 <redacted> + 328
> 12 UIKitCore 0x00000001da65beb8 <redacted> + 1392
> 13 QuartzCore 0x00000001b22621f0 <redacted> + 184
> 14 QuartzCore 0x00000001b2267198 <redacted> + 332
> 15 QuartzCore 0x00000001b21ca0a8 <redacted> + 348
> 16 QuartzCore 0x00000001b21f8108 <redacted> + 640
> 17 QuartzCore 0x00000001b21f9288 <redacted> + 228
> 18 libsystem_pthread.dylib 0x00000001ad9f74b4 <redacted> + 580
> 19 libsystem_pthread.dylib 0x00000001ad9f4904 <redacted> + 80
> 20 libsystem_pthread.dylib 0x00000001ad9f5508 pthread_workqueue_setdispatchoffset_np + 0
> 21 libsystem_pthread.dylib 0x00000001ad9f514c _pthread_wqthread + 360
> 22 libsystem_pthread.dylib 0x00000001ad9f7cd4 start_wqthread + 4
> )
> 2019-06-26 12:12:20.749133+0600 SynopiLive360[975:143540] This application is modifying the autolayout engine from a background
> thread after the engine was accessed from the main thread. This can
> lead to engine corruption and weird crashes.
> Stack:(
> 0 Foundation 0x00000001ae943474 <redacted> + 96
> 1 Foundation 0x00000001ae74eaec <redacted> + 36
> 2 UIKitCore 0x00000001da5a4ae0 <redacted> + 120
> 3 UIKitCore 0x00000001da5a4780 <redacted> + 692
> 4 UIKitCore 0x00000001da5a4780 <redacted> + 692
> 5 Foundation 0x00000001ae74eb34 <redacted> + 108
> 6 UIKitCore 0x00000001da5a4fbc <redacted> + 92
> 7 UIKitCore 0x00000001da5a3acc <redacted> + 120
> 8 UIKitCore 0x00000001da5a4bdc <redacted> + 168
> 9 UIKitCore 0x00000001da595664 <redacted> + 96
> 10 UIKitCore 0x00000001da5a5a60 <redacted> + 416
> 11 UIKitCore 0x00000001da648878 <redacted> + 328
> 12 UIKitCore 0x00000001da65beb8 <redacted> + 1392
> 13 QuartzCore 0x00000001b22621f0 <redacted> + 184
> 14 QuartzCore 0x00000001b2267198 <redacted> + 332
> 15 QuartzCore 0x00000001b21ca0a8 <redacted> + 348
> 16 QuartzCore 0x00000001b21f8108 <redacted> + 640
> 17 QuartzCore 0x00000001b21f9288 <redacted> + 228
> 18 libsystem_pthread.dylib 0x00000001ad9f74b4 <redacted> + 580
> 19 libsystem_pthread.dylib 0x00000001ad9f4904 <redacted> + 80
> 20 libsystem_pthread.dylib 0x00000001ad9f5508 pthread_workqueue_setdispatchoffset_np + 0
> 21 libsystem_pthread.dylib 0x00000001ad9f514c _pthread_wqthread + 360
> 22 libsystem_pthread.dylib 0x00000001ad9f7cd4 start_wqthread + 4
> )
> 2019-06-26 12:12:20.757334+0600 SynopiLive360[975:143540] This application is modifying the autolayout engine from a background
> thread after the engine was accessed from the main thread. This can
> lead to engine corruption and weird crashes.
> Stack:(
> 0 Foundation 0x00000001ae943474 <redacted> + 96
> 1 Foundation 0x00000001ae74eaec <redacted> + 36
> 2 UIKitCore 0x00000001da64698c <redacted> + 788
> 3 UIKitCore 0x00000001da655ddc <redacted> + 1740
> 4 UIKitCore 0x00000001d9c796d4 <redacted> + 340
> 5 UIKitCore 0x00000001d9c787b0 <redacted> + 484
> 6 UIKitCore 0x00000001d9c78af4 <redacted> + 224
> 7 UIKitCore 0x00000001da65be54 <redacted> + 1292
> 8 QuartzCore 0x00000001b22621f0 <redacted> + 184
> 9 QuartzCore 0x00000001b2267198 <redacted> + 332
> 10 QuartzCore 0x00000001b21ca0a8 <redacted> + 348
> 11 QuartzCore 0x00000001b21f8108 <redacted> + 640
> 12 QuartzCore 0x00000001b21f9288 <redacted> + 228
> 13 libsystem_pthread.dylib 0x00000001ad9f74b4 <redacted> + 580
> 14 libsystem_pthread.dylib 0x00000001ad9f4904 <redacted> + 80
> 15 libsystem_pthread.dylib 0x00000001ad9f5508 pthread_workqueue_setdispatchoffset_np + 0
> 16 libsystem_pthread.dylib 0x00000001ad9f514c _pthread_wqthread + 360
> 17 libsystem_pthread.dylib 0x00000001ad9f7cd4 start_wqthread + 4
> )
> 2019-06-26 12:12:20.765234+0600 SynopiLive360[975:143540] This application is modifying the autolayout engine from a background
> thread after the engine was accessed from the main thread. This can
> lead to engine corruption and weird crashes.
> Stack:(
> 0 Foundation 0x00000001ae943474 <redacted> + 96
> 1 Foundation 0x00000001ae74eaec <redacted> + 36
> 2 UIKitCore 0x00000001da5a3308 <redacted> + 560
> 3 UIKitCore 0x00000001da5a3094 <redacted> + 220
> 4 UIKitCore 0x00000001da646a84 <redacted> + 120
> 5 Foundation 0x00000001ae74eb34 <redacted> + 108
> 6 UIKitCore 0x00000001da64698c <redacted> + 788
> 7 UIKitCore 0x00000001da655ddc <redacted> + 1740
> 8 UIKitCore 0x00000001d9c796d4 <redacted> + 340
> 9 UIKitCore 0x00000001d9c787b0 <redacted> + 484
> 10 UIKitCore 0x00000001d9c78af4 <redacted> + 224
> 11 UIKitCore 0x00000001da65be54 <redacted> + 1292
> 12 QuartzCore 0x00000001b22621f0 <redacted> + 184
> 13 QuartzCore 0x00000001b2267198 <redacted> + 332
> 14 QuartzCore 0x00000001b21ca0a8 <redacted> + 348
> 15 QuartzCore 0x00000001b21f8108 <redacted> + 640
> 16 QuartzCore 0x00000001b21f9288 <redacted> + 228
> 17 libsystem_pthread.dylib 0x00000001ad9f74b4 <redacted> + 580
> 18 libsystem_pthread.dylib 0x00000001ad9f4904 <redacted> + 80
> 19 libsystem_pthread.dylib 0x00000001ad9f5508 pthread_workqueue_setdispatchoffset_np + 0
> 20 libsystem_pthread.dylib 0x00000001ad9f514c _pthread_wqthread + 360
> 21 libsystem_pthread.dylib 0x00000001ad9f7cd4 start_wqthread + 4
> )
help me please

You are invoking performSegue() on a thread that is not the main UI thread. You need to dispatch to the main thread to do this safely.

Related

FBAudienceframework in my framework in swift but its giving final class exception

FBAdLogger is a final class and cannot be subclassed. FBAdLogger
2018-06-19 18:16:46.777370+0530 100MB[28915:293039] * Terminating app due to uncaught exception 'FBFinalClassViolationException', reason: 'FBAdLogger is a final class and cannot be subclassed. FBAdLogger'
* First throw call stack:
(
0 CoreFoundation 0x0000000112c311e6 exceptionPreprocess + 294
1 libobjc.A.dylib 0x0000000111c47031 objc_exception_throw + 48
2 100MB 0x000000010575cbb0 +[FBAdLogger logAtLevel:file:lineNumber:format:] + 0
3 libobjc.A.dylib 0x0000000111c47b04 CALLING_SOME_+initialize_METHOD + 19
4 libobjc.A.dylib 0x0000000111c47e9e _class_initialize + 276
5 libobjc.A.dylib 0x0000000111c4e824 lookUpImpOrForward + 226
6 libobjc.A.dylib 0x0000000111c5e414 _objc_msgSend_uncached + 68
7 100MB 0x000000010575926c fbadsdk_dfl_load_library_once + 104
8 100MB 0x00000001057592ea fbadsdk_dfl_load_AdSupport_once + 21
9 libdispatch.dylib 0x00000001148347ec _dispatch_client_callout + 8
10 libdispatch.dylib 0x0000000114835d64 dispatch_once_f + 285
11 100MB 0x0000000105755fdb fbadsdk_dfl_handle_get_AdSupport + 48
12 100MB 0x0000000105754fd1 fbadsdk_dfl_load_symbol_once + 11
13 libdispatch.dylib 0x00000001148347ec _dispatch_client_callout + 8
14 libdispatch.dylib 0x0000000114835d64 dispatch_once_f + 285
15 100MB 0x0000000105755fa8 fbadsdk_dfl_ASIdentifierManagerClass + 48
16 100MB 0x0000000105760d2d +[FBAdUtility(FBAdDeviceInfoUtility) getAdvertisingIdentifier] + 16
17 100MB 0x0000000105760ead +[FBAdUtility(FBAdDeviceInfoUtility) testHashForSelf] + 30
18 100MB 0x0000000105693050 __30+[FBAdSettings testDeviceHash]_block_invoke + 24
19 libdispatch.dylib 0x00000001148347ec _dispatch_client_callout + 8
20 libdispatch.dylib 0x0000000114835d64 dispatch_once_f + 285
21 100MB 0x0000000105693036 +[FBAdSettings testDeviceHash] + 79
22 100MB 0x0000000105693584 +[FBAdSettings isTestMode] + 89
23 100MB 0x0000000105762958 +[FBAdUtility(FBAdLoggingUtility) displayVerboseDebugMessage:] + 157
24 100MB 0x0000000105765f5f -[NSDictionary(FBAdUtility) objectForKeyOrNil:ofClass:] + 271
25 100MB 0x000000010576560f -[NSDictionary(FBAdUtility) objectForKey:ofClass:orDefault:] + 70
26 100MB 0x0000000105765841 -[NSDictionary(FBAdUtility) numberForKey:orDefault:] + 95
27 100MB 0x00000001057658d2 -[NSDictionary(FBAdUtility) integerForKey:orDefault:] + 92
28 DigiAdz 0x000000011013df9f -[FBAdPlacementDefinition ingestPlacementData:] + 279
29 DigiAdz 0x000000011013de77 -[FBAdPlacementDefinition initWithPlacementData:] + 65
30 DigiAdz 0x0000000110151f03 -[FBAdProviderResponseParser parsePlacementDefinitionFromData:] + 398
31 DigiAdz 0x0000000110152420 -[FBAdProviderResponseParser parseResponseFromData:successHandler:errorHandler:] + 1222
32 DigiAdz 0x0000000110151821 __55-[FBAdProvider parseResponseFromData:canReturnSources:]_block_invoke.216 + 122
33 Foundation 0x000000010a743363 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK + 7
34 Foundation 0x000000010a7431ca -[NSBlockOperation main] + 68
35 Foundation 0x000000010a7416b2 -[__NSOperationInternal _start:] + 766
36 Foundation 0x000000010a73d776 __NSOQSchedule_f + 364
37 libdispatch.dylib 0x00000001148347ec _dispatch_client_callout + 8
38 libdispatch.dylib 0x000000011483aad9 _dispatch_continuation_pop + 967
39 libdispatch.dylib 0x0000000114838f54 _dispatch_async_redirect_invoke + 780
40 libdispatch.dylib 0x000000011484036c _dispatch_root_queue_drain + 664
41 libdispatch.dylib 0x0000000114840076 _dispatch_worker_thread3 + 132
42 libsystem_pthread.dylib 0x0000000114d5f169 _pthread_wqthread + 1387
43 libsystem_pthread.dylib 0x0000000114d5ebe9 start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Main Thread Checker Warnings coming from Sinch Video Library

I'm using SinchRTC 3.11.1 in my IOS App. When I enter a video chat the following warnings are being produced because of the Sinch library. A few UI API calls are being done from a background thread instead of the main UI thread. Can these be fixed within the library?
Main Thread Checker: UI API called on a background thread: -[UIApplication applicationState]
PID: 96751, TID: 7066961, Thread name: Sinch Worker Thread, Queue name: com.apple.root.default-qos.overcommit, QoS: 21
Backtrace:
4 XXXXXX 0x0000000105d7eb41 -[SINClientImpl onPubSubSubscriptionConnectionEvent] + 66
5 XXXXXX 0x0000000105d7ec84 -[SINClientImpl onPubSubSubscriptionSuccess:] + 197
6 CoreFoundation 0x0000000108740a3c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
7 CoreFoundation 0x000000010874093a _CFXRegistrationPost + 442
8 CoreFoundation 0x0000000108740682 ___CFXNotificationPost_block_invoke + 50
9 CoreFoundation 0x0000000108702a02 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1826
10 CoreFoundation 0x0000000108701b7c _CFXNotificationPost + 652
11 Foundation 0x0000000109ec0172 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
12 XXXXXX 0x0000000105d9b8c7 -[SINPubSubscriber notify:userInfo:] + 336
13 XXXXXX 0x0000000105d9ba46 -[SINPubSubscriber subscribeDidSucceedOnChannel:sequence:withRequestedTimetoken:] + 220
14 XXXXXX 0x0000000105d92515 -[PubnubSubscriber request:withInitialTimeToken:didSucceedWithResponse:] + 435
15 XXXXXX 0x0000000105d920d5 __43-[PubnubSubscriber subscribeWithTimeToken:]_block_invoke + 111
16 XXXXXX 0x0000000105d909ce __52-[PubnubService performRequest:onSuccess:onFailure:]_block_invoke.42 + 143
17 XXXXXX 0x0000000105d8ffc9 -[PubnubRequestOperation operationWillFinish] + 284
18 XXXXXX 0x0000000105d6902d -[SINQRunLoopOperation finishWithError:] + 70
19 XXXXXX 0x0000000105d68536 -[SINQHTTPOperation finishWithError:] + 41
20 CFNetwork 0x0000000107f7e0e5 __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke + 53
21 CFNetwork 0x0000000107f7e00a -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 198
22 CFNetwork 0x0000000107f7df32 -[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 48
23 CFNetwork 0x0000000107f823b3 ___ZN27URLConnectionClient_Classic26_delegate_didFinishLoadingEU13block_pointerFvvE_block_invoke + 100
24 CFNetwork 0x00000001081283cb ___ZN27URLConnectionClient_Classic18_withDelegateAsyncEPKcU13block_pointerFvP16_CFURLConnectionPK33CFURLConnectionClientCurrent_VMaxE_block_invoke_2 + 100
25 libdispatch.dylib 0x0000000110e8a658 _dispatch_client_callout + 8
26 libdispatch.dylib 0x0000000110e8fe6b _dispatch_block_invoke_direct + 589
27 CFNetwork 0x0000000107f7de04 _ZN19RunloopBlockContext13_invoke_blockEPKvPv + 24
28 CoreFoundation 0x00000001086f35d8 CFArrayApplyFunction + 72
29 CFNetwork 0x0000000107f7dcda _ZN19RunloopBlockContext7performEv + 132
30 CFNetwork 0x0000000107f7db78 _ZN17MultiplexerSource7performEv + 282
31 CFNetwork 0x0000000107f7d9ab _ZN17MultiplexerSource8_performEPv + 65
32 CoreFoundation 0x0000000108747e71 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
33 CoreFoundation 0x000000010872c56f __CFRunLoopDoSources0 + 271
34 CoreFoundation 0x000000010872bb1f __CFRunLoopRun + 1039
35 CoreFoundation 0x000000010872b499 CFRunLoopRunSpecific + 409
36 Foundation 0x0000000109eda22e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 274
37 XXXXXX 0x0000000105cf8bd8 _ZN4base20MessagePumpNSRunLoop2017-07-12 12:20:51.360149-0700 XXXXXX[96751:7066961] [reports] Main Thread Checker: UI API called on a background thread: -[UIApplication applicationState]
PID: 96751, TID: 7066961, Thread name: Sinch Worker Thread, Queue name: com.apple.root.default-qos.overcommit, QoS: 21
Backtrace:
4 XXXXXX 0x0000000105d7eb41 -[SINClientImpl onPubSubSubscriptionConnectionEvent] + 66
5 XXXXXX 0x0000000105d7ec84 -[SINClientImpl onPubSubSubscriptionSuccess:] + 197
6 CoreFoundation 0x0000000108740a3c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
7 CoreFoundation 0x000000010874093a _CFXRegistrationPost + 442
8 CoreFoundation 0x0000000108740682 ___CFXNotificationPost_block_invoke + 50
9 CoreFoundation 0x0000000108702a02 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1826
10 CoreFoundation 0x0000000108701b7c _CFXNotificationPost + 652
11 Foundation 0x0000000109ec0172 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
12 XXXXXX 0x0000000105d9b8c7 -[SINPubSubscriber notify:userInfo:] + 336
13 XXXXXX 0x0000000105d9ba46 -[SINPubSubscriber subscribeDidSucceedOnChannel:sequence:withRequestedTimetoken:] + 220
14 XXXXXX 0x0000000105d92515 -[PubnubSubscriber request:withInitialTimeToken:didSucceedWithResponse:] + 435
15 XXXXXX 0x0000000105d920d5 __43-[PubnubSubscriber subscribeWithTimeToken:]_block_invoke + 111
16 XXXXXX 0x0000000105d909ce __52-[PubnubService performRequest:onSuccess:onFailure:]_block_invoke.42 + 143
17 XXXXXX 0x0000000105d8ffc9 -[PubnubRequestOperation operationWillFinish] + 284
18 XXXXXX 0x0000000105d6902d -[SINQRunLoopOperation finishWithError:] + 70
19 XXXXXX 0x0000000105d68536 -[SINQHTTPOperation finishWithError:] + 41
20 CFNetwork 0x0000000107f7e0e5 __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke + 53
21 CFNetwork 0x0000000107f7e00a -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 198
22 CFNetwork 0x0000000107f7df32 -[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 48
23 CFNetwork 0x0000000107f823b3 ___ZN27URLConnectionClient_Classic26_delegate_didFinishLoadingEU13block_pointerFvvE_block_invoke + 100
24 CFNetwork 0x00000001081283cb ___ZN27URLConnectionClient_Classic18_withDelegateAsyncEPKcU13block_pointerFvP16_CFURLConnectionPK33CFURLConnectionClientCurrent_VMaxE_block_invoke_2 + 100
25 libdispatch.dylib 0x0000000110e8a658 _dispatch_client_callout + 8
26 libdispatch.dylib 0x0000000110e8fe6b _dispatch_block_invoke_direct + 589
27 CFNetwork 0x0000000107f7de04 _ZN19RunloopBlockContext13_invoke_blockEPKvPv + 24
28 CoreFoundation 0x00000001086f35d8 CFArrayApplyFunction + 72
29 CFNetwork 0x0000000107f7dcda _ZN19RunloopBlockContext7performEv + 132
30 CFNetwork 0x0000000107f7db78 _ZN17MultiplexerSource7performEv + 282
31 CFNetwork 0x0000000107f7d9ab _ZN17MultiplexerSource8_performEPv + 65
32 CoreFoundation 0x0000000108747e71 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
33 CoreFoundation 0x000000010872c56f __CFRunLoopDoSources0 + 271
34 CoreFoundation 0x000000010872bb1f __CFRunLoopRun + 1039
35 CoreFoundation 0x000000010872b499 CFRunLoopRunSpecific + 409
36 Foundation 0x0000000109eda22e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 274
37 XXXXXX 0x0000000105cf8bd8 _ZN4base20MessagePumpNSRunLoop
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIView layer]
PID: 96751, TID: 7066464, Thread name: (none), Queue name: com.sinch.SINVideoCapturer.session, QoS: 25
Backtrace:
4 XXXXXX 0x0000000105d66f4f -[SINVideoCapturer startWithPreset_sq:frameRate:] + 505
5 libdispatch.dylib 0x0000000110e8966d _dispatch_call_block_and_release + 12
6 libdispatch.dylib 0x0000000110e8a658 _dispatch_client_callout + 8
7 libdispatch.dylib 0x0000000110e9308c _dispatch_queue_serial_drain + 1173
8 libdispatch.dylib 0x0000000110e93aa5 _dispatch_queue_invoke + 342
9 libdispatch.dylib 0x0000000110e96d3b _dispatch_root_queue_drain + 785
10 libdispatch.dylib 0x0000000110e969c7 _dispatch_worker_thread4 + 54
11 libsystem_pthread.dylib 0x00000001112ed616 _pthread_wqthread + 1299
12 libsystem_pthread.dylib 0x00000001112ed0f1 start_wqthread + 13
2017-07-12 12:20:52.112965-0700 XXXXXX[96751:7066464] [reports] Main Thread Checker: UI API called on a background thread: -[UIView layer]
PID: 96751, TID: 7066464, Thread name: (none), Queue name: com.sinch.SINVideoCapturer.session, QoS: 25
Backtrace:
4 XXXXXX 0x0000000105d66f4f -[SINVideoCapturer startWithPreset_sq:frameRate:] + 505
5 libdispatch.dylib 0x0000000110e8966d _dispatch_call_block_and_release + 12
6 libdispatch.dylib 0x0000000110e8a658 _dispatch_client_callout + 8
7 libdispatch.dylib 0x0000000110e9308c _dispatch_queue_serial_drain + 1173
8 libdispatch.dylib 0x0000000110e93aa5 _dispatch_queue_invoke + 342
9 libdispatch.dylib 0x0000000110e96d3b _dispatch_root_queue_drain + 785
10 libdispatch.dylib 0x0000000110e969c7 _dispatch_worker_thread4 + 54
11 libsystem_pthread.dylib 0x00000001112ed616 _pthread_wqthread + 1299
12 libsystem_pthread.dylib 0x00000001112ed0f1 start_wqthread + 13
That is because Xcode 9 features a new main thread checker that checks whether UI API's are executed in Main thread. UI operations are bound to cause problems in a non-main thread. You have to update your SinchRTC to fix this runtime issue. The developers of SinchRTC should patch this and release an update. Hope this helps. For more info., refer this link.
The library should fix theses errors but if you want to disable it you can do it in the scheme, in the Diagnostics option.

OSX crash happening on system libraries and no sign of my app

A crash is occurring in my app but the crash report only shows system libraries. It is clear that my app is provoking the issue but because 1) of its size and 2) there isn't sign of any of my libraries in the stack trace, I can't figure out where it is happening. As far as I know it is related with NSUrlConnection but it is being used in lots of places.
Does any body knows how can I used Atos or lldb to symbolicate when my app is NOT being mentioned in the stack trace?
Below is the stack.
Thanks
Thread 33:: com.apple.NSURLConnectionLoader Dispatch queue: com.apple.CFFileDescriptor
0 com.apple.CoreFoundation 0x00007fff9d3a2add __CFFileDescriptorEnableCallBacks_block_invoke + 13
1 libdispatch.dylib 0x00007fff9b13440b _dispatch_client_callout + 8
2 libdispatch.dylib 0x00007fff9b1359f2 _dispatch_barrier_sync_f_invoke + 74
3 com.apple.CoreFoundation 0x00007fff9d3a2ab4 CFFileDescriptorEnableCallBacks + 180
4 com.apple.CoreFoundation 0x00007fff9d42cdaa constructCFFD + 122
5 com.apple.CoreFoundation 0x00007fff9d36e48e fileOpen + 238
6 com.apple.CoreFoundation 0x00007fff9d3626a8 _CFStreamOpen + 120
7 com.apple.CoreFoundation 0x00007fff9d36e37f CFReadStreamOpen + 95
8 com.apple.CFNetwork 0x00007fff911b27fe FileURLProtocol::_protocolInterface_startLoad(_CFCachedURLResponse const*) + 578
9 com.apple.CFNetwork 0x00007fff91041350 ___ZN19URLConnectionLoader27_private_ScheduleOriginLoadEPK12NSURLRequestPK20_CFCachedURLResponse_block_invoke_2 + 61
10 com.apple.CFNetwork 0x00007fff910412f1 ___ZNK19URLConnectionLoader25withExistingProtocolAsyncEU13block_pointerFvP11URLProtocolE_block_invoke + 25
11 libdispatch.dylib 0x00007fff9b13440b _dispatch_client_callout + 8
12 libdispatch.dylib 0x00007fff9b142039 _dispatch_block_invoke + 474
13 com.apple.CFNetwork 0x00007fff9104017c RunloopBlockContext::_invoke_block(void const*, void*) + 24
14 com.apple.CoreFoundation 0x00007fff9d33ad74 CFArrayApplyFunction + 68
15 com.apple.CFNetwork 0x00007fff91040075 RunloopBlockContext::perform() + 137
16 com.apple.CFNetwork 0x00007fff9103ff16 MultiplexerSource::perform() + 282
17 com.apple.CFNetwork 0x00007fff9103fd38 MultiplexerSource::_perform(void*) + 72
18 com.apple.CoreFoundation 0x00007fff9d398881 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
19 com.apple.CoreFoundation 0x00007fff9d377fbc __CFRunLoopDoSources0 + 556
20 com.apple.CoreFoundation 0x00007fff9d3774df __CFRunLoopRun + 927
21 com.apple.CoreFoundation 0x00007fff9d376ed8 CFRunLoopRunSpecific + 296
22 com.apple.CFNetwork 0x00007fff9101aa6d +[NSURLConnection(Loader) _resourceLoadLoop:] + 412
23 com.apple.Foundation 0x00007fff9b195e64 __NSThread__start__ + 1351
24 libsystem_pthread.dylib 0x00007fff9997a99d _pthread_body + 131
25 libsystem_pthread.dylib 0x00007fff9997a91a _pthread_start + 168
26 libsystem_pthread.dylib 0x00007fff99978351 thread_start + 13

Xamarin DACircularProgress component exception

I'm trying to use the DACircularProgress component from Xamarin, but it doesn't seem to work on a real device.
On the emulator it works well, but on the device the following exception is thrown.
Does anyone know the reason, or used this component successfully?
Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Please file a radar on UIKit if you see this assertion.
Native stack trace:
0 CoreFoundation 0x228bf883 + 150
1 libobjc.A.dylib 0x34272dff objc_exception_throw + 38
2 CoreFoundation 0x228bf741 <redacted> + 0
3 Foundation 0x2364f307 <redacted> + 86
4 UIKit 0x2707ceb5 <redacted> + 480
5 UIKit 0x2707d45b <redacted> + 14
6 UIKit 0x26cbbd81 <redacted> + 44
7 UIKit 0x26b5651f <redacted> + 702
8 UIKit 0x27078c99 <redacted> + 1220
9 UIKit 0x2707837b <redacted> + 1234
10 UIKit 0x26a86847 <redacted> + 30
11 UIKit 0x26a86823 <redacted> + 30
12 UIKit 0x26cca889 <redacted> + 52
13 UIKit 0x26cca805 <redacted> + 252
14 UIKit 0x269d7243 <redacted> + 30
15 UIKit 0x26cca6f3 <redacted> + 142
16 UIKit 0x269ccf9d <redacted> + 1408
17 UIKit 0x269cccff <redacted> + 738
18 UIKit 0x269cccff <redacted> + 738
19 UIKit 0x269cccff <redacted> + 738
20 UIKit 0x269cccff <redacted> + 738
21 UIKit 0x269cc471 <redacted> + 124
22 UIKit 0x269cc317 <redacted> + 426
23 UIKit 0x269d8de7 <redacted> + 1606
24 UIKit 0x269d879b <redacted> + 30
25 UIKit 0x26bbe607 <redacted> + 154
26 UIKit 0x269ccfb5 <redacted> + 1432
27 UIKit 0x269cccff <redacted> + 738
28 UIKit 0x269cc471 <redacted> + 124
29 UIKit 0x269cc317 <redacted> + 426
30 UIKit 0x269d8de7 <redacted> + 1606
31 UIKit 0x269d879b <redacted> + 30
32 UIKit 0x26c5ab69 <redacted> + 1728
33 UIKit 0x269dfabd <redacted> + 72
34 UIKit 0x26bbe191 <redacted> + 180
35 UIKit 0x26ccacd1 <redacted> + 208
36 UIKit 0x26bbddcf <redacted> + 966
37 UIKit 0x26b79c33 <redacted> + 3574
38 UIKit 0x26a8acd3 <redacted> + 658
39 UIKit 0x26a8a9dd <redacted> + 52
40 UIKit 0x26a8a957 <redacted> + 214
41 UIKit 0x269cd6bb <redacted> + 694
42 QuartzCore 0x2629967d <redacted> + 128
43 QuartzCore 0x26294d79 <redacted> + 352
44 QuartzCore 0x26294c09 <redacted> + 16
45 QuartzCore 0x26294129 <redacted> + 368
46 QuartzCore 0x26293deb <redacted> + 590
47 UIKit 0x269d03f7 <redacted> + 5334
48 CoreFoundation 0x22882827 <redacted> + 14
49 CoreFoundation 0x22882417 <redacted> + 454
50 CoreFoundation 0x2288077f <redacted> + 806
51 CoreFoundation 0x227d31e9 CFRunLoopRunSpecific + 516
52 CoreFoundation 0x227d2fdd CFRunLoopRunInMode + 108
53 GraphicsServices 0x2ba77af9 GSEventRunModal + 160
54 UIKit 0x26a3818d UIApplicationMain + 144
55 libXamarin.iOS.dll.dylib 0x005feb08 wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 252
56 libXamarin.iOS.dll.dylib 0x005b581c UIKit_UIApplication_Main_string___intptr_intptr + 52
57 libXamarin.iOS.dll.dylib 0x005b57dc UIKit_UIApplication_Main_string___string_string + 204
58 libmyappname.exe.dylib 0x0042222c myappname_Application_Main_string__ + 188
59 libmscorlib.dll.dylib 0x0082adc8 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 256
60 libmonosgen-2.0.dylib 0x0018fea9 mono_jit_runtime_invoke + 1588
61 libmonosgen-2.0.dylib 0x001e37a3 mono_runtime_invoke + 102
62 libmonosgen-2.0.dylib 0x001e6ffb mono_runtime_exec_main + 284
63 libxamarin-debug.dylib 0x003f2408 xamarin_main + 2232
64 myappname 0x00019677 main + 112
65 libdyld.dylib 0x3499d873 <redacted> + 2

SIGSEGV Crash with NSKeyValuePushPendingNotificationPerThread

I have an app on the Mac App Store, and I get these crash reports from my users which I cannot reproduce or figure out how to debug. It seem like something crashes due to NSManagedObjectContext reset, but it's not obvious, and users don't have a reproducible case. The main thread can have a different stack trace, but the non-main thread always has the same stack trace.
Exception Type: SIGSEGV
Exception Codes: SEGV_MAPERR at 0x41bfc026bec0
Crashed Thread: 8
Application Specific Information:
Selector name found in current argument registers: retain
Thread 0:
0 libFontParser.dylib 0x00007fff8efa7921 _ZNK20TTrueTypeFontHandler11RenderGlyphEtR27TTrueTypeQuadOutlineContextj + 89
1 libFontParser.dylib 0x00007fff8efa789e _ZNK20TTrueTypeFontHandler14GetOutlinePathEtRK18TGlyphOutlineBatch + 60
2 libFontParser.dylib 0x00007fff8efa744a FPFontCopyGlyphPath + 394
3 CoreGraphics 0x00007fff8767e913 CGFontCreateGlyphPath + 44
4 CoreGraphics 0x00007fff8767e85d CGFontCreateGlyphBitmap + 437
5 CoreGraphics 0x00007fff8767e607 _ZN14CGGlyphBuilder22create_missing_bitmapsEPK17CGGlyphIdentifiermPPK13CGGlyphBitmap + 109
6 libRIP.A.dylib 0x00007fff8b7bec2d render_glyphs + 204
7 libRIP.A.dylib 0x00007fff8b7bdf6f draw_glyph_bitmaps + 1585
8 libRIP.A.dylib 0x00007fff8b7bd8cd ripc_DrawGlyphs + 2785
9 CoreGraphics 0x00007fff87738077 draw_glyphs + 1034
10 CoreText 0x00007fff8ac50426 _ZL25DrawSbixGlyphsAtPositionsPK5TFontP6CGFontRK6TCFRefIPK8__CFDataEPKtPK7CGPointmP9CGContext17CGAffineTransformSI_ + 2990
11 CoreText 0x00007fff8abfdb73 CTFontDrawGlyphsWithAdvances + 789
12 UIFoundation 0x00007fff966f212e -[NSLineFragmentRenderingContext drawAtPoint:inContext:] + 5398
13 UIFoundation 0x00007fff96616728 __NSStringDrawingEngine + 16941
14 UIFoundation 0x00007fff966108ff _NSStringDrawingCore + 150
15 AppKit 0x00007fff93ce6d50 _NSDrawTextCell + 6954
16 AppKit 0x00007fff9421cdf8 __47-[NSTextFieldCell drawLayer:inGraphicsContext:]_block_invoke + 576
17 AppKit 0x00007fff944aa538 +[NSAppearance _performWithCurrentAppearance:usingBlock:] + 79
18 AppKit 0x00007fff93cf6739 -[NSTextFieldCell drawLayer:inGraphicsContext:] + 225
19 AppKit 0x00007fff93cf6470 +[NSGraphicsContext configureGraphicsContextForCALayer:withCGContext:andRenderWithHandler:] + 97
20 QuartzCore 0x00007fff939f1e93 CABackingStoreUpdate_ + 3306
21 QuartzCore 0x00007fff939f11a3 ___ZN2CA5Layer8display_Ev_block_invoke + 59
22 QuartzCore 0x00007fff939f115f x_blame_allocations + 81
23 QuartzCore 0x00007fff939f0c5c _ZN2CA5Layer8display_Ev + 1546
24 AppKit 0x00007fff93ce039f _NSBackingLayerDisplay + 617
25 QuartzCore 0x00007fff939f0381 _ZN2CA5Layer17display_if_neededEPNS_11TransactionE + 603
26 QuartzCore 0x00007fff939efabd _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 35
27 QuartzCore 0x00007fff939ef24e _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 242
28 QuartzCore 0x00007fff939eeea4 _ZN2CA11Transaction6commitEv + 390
29 QuartzCore 0x00007fff939ffcad _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 71
30 CoreFoundation 0x00007fff8bbd0da7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
31 CoreFoundation 0x00007fff8bbd0d00 __CFRunLoopDoObservers + 368
32 CoreFoundation 0x00007fff8bbc2878 CFRunLoopRunSpecific + 328
33 HIToolbox 0x00007fff918f1aef RunCurrentEventLoopInMode + 235
34 HIToolbox 0x00007fff918f176e ReceiveNextEventCommon + 179
35 HIToolbox 0x00007fff918f16ab _BlockUntilNextEventMatchingListInModeWithFilter + 71
36 AppKit 0x00007fff93bb0f81 _DPSNextEvent + 964
37 AppKit 0x00007fff93bb0730 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 194
38 AppKit 0x00007fff93ba4593 -[NSApplication run] + 594
39 AppKit 0x00007fff93b8fa14 NSApplicationMain + 1832
40 libdyld.dylib 0x00007fff88d605c9 start + 1
...
Thread 7:
0 libsystem_kernel.dylib 0x00007fff94d1b94a __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff9508740d start_wqthread + 13
Thread 8 Crashed:
0 libobjc.A.dylib 0x00007fff90c740dd objc_msgSend + 29
1 Foundation 0x00007fff92461d24 NSKeyValuePushPendingNotificationPerThread + 446
2 Foundation 0x00007fff9240968f NSKeyValueWillChange + 465
3 Foundation 0x00007fff924bc33e -[NSObject(NSKeyValueObservingPrivate) _willChangeValuesForKeys:] + 234
4 CoreData 0x00007fff8d9fdd6d -[NSFaultHandler turnObject:intoFaultWithContext:] + 221
5 CoreData 0x00007fff8da28641 -[NSManagedObjectContext(_NSInternalAdditions) _disposeObjects:count:notifyParent:] + 353
6 CoreData 0x00007fff8da27c78 -[NSManagedObjectContext(_NSInternalAdditions) _dispose:] + 392
7 CoreData 0x00007fff8da27821 -[NSManagedObjectContext _dealloc__] + 337
8 CoreData 0x00007fff8da563ab __internalBlockToDeallocNSManagedObjectContext_block_invoke + 75
9 CoreData 0x00007fff8da1c246 developerSubmittedBlockToNSManagedObjectContextPerform + 182
10 libdispatch.dylib 0x00007fff8f122c13 _dispatch_client_callout + 8
11 libdispatch.dylib 0x00007fff8f126365 _dispatch_queue_drain + 1100
12 libdispatch.dylib 0x00007fff8f127ecc _dispatch_queue_invoke + 202
13 libdispatch.dylib 0x00007fff8f1256b7 _dispatch_root_queue_drain + 463
14 libdispatch.dylib 0x00007fff8f133fe4 _dispatch_worker_thread3 + 91
15 libsystem_pthread.dylib 0x00007fff95089637 _pthread_wqthread + 729
16 libsystem_pthread.dylib 0x00007fff9508740d start_wqthread + 13
Any idea how to find out what's causing the issue and possibly fix it? I've tried enabling zombies, setting NSBindingDebugLogLevel to 1, and running Zombies instrument, but no luck.

Resources