Выполнение любой операции из фонового потока в UIView или подклассе не поддерживается и может привести к неожиданному и коварному поведению - PullRequest
0 голосов
/ 26 июня 2019

Я хочу сделать запрос http http.после запроса, может ли запрос дать успешный ответ, другие функции работают нормально.но если не смогли дать успешный ответ, то загрузка и создание этой проблемы заняли бы много времени.после окончания загрузки откройте новое действие, а затем кнопка нового действия не работает.

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
>     )

помогите мне, пожалуйста

1 Ответ

0 голосов
/ 26 июня 2019

Вы вызываете executeSegue () для потока, который не является основным потоком пользовательского интерфейса.Вам нужно отправить в главный поток, чтобы сделать это безопасно.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...