Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NSInternalInconsistencyException on iOS 13.2.3 when connecting to qBittorent 4.2.1 #67

Open
nadavcoh opened this issue Jan 4, 2020 · 1 comment

Comments

@nadavcoh
Copy link

nadavcoh commented Jan 4, 2020

NSInternalInconsistencyException on iOS 13.2.3 when connecting to qBittorent 4.2.1
TL;DR:

[Assert] UIView animation API is 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.
BarMagnet[17998:2644184] 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.
BarMagnet[17998:2644184] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Modifications to the layout engine must not be performed from a background thread after it has been accessed from the main thread.'

Full console output:

2020-01-04 12:40:32.760255+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:40:32.788994+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:40:34.763867+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:40:34.767037+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:40:36.869136+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:40:36.870762+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:40:38.915546+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:40:38.916218+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:40:40.920900+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:40:40.921495+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:40:43.015106+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:40:43.020690+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:40:45.085467+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:40:45.086722+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:40:47.157659+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:40:47.159767+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:40:49.227441+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:40:49.227981+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:40:51.236956+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:40:51.237377+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:40:53.245812+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:40:53.246240+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:40:55.319601+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:40:55.320669+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:40:57.323021+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:40:57.324660+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:40:59.394411+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:40:59.395962+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:41:01.466946+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:41:01.467523+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:41:03.468783+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:41:03.488321+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:41:05.490708+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:41:05.493125+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:41:07.561621+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:41:07.566446+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:41:09.587532+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:41:09.589532+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:41:09.676494+0200 BarMagnet[17998:2643537] [Common] _BSMachError: port bc03; (os/kern) invalid capability (0x14) "Unable to insert COPY_SEND"
2020-01-04 12:41:10.052208+0200 BarMagnet[17998:2643996] [general] Connection to daemon was invalidated
2020-01-04 12:41:11.650685+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:41:11.652407+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:41:13.677367+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:41:13.678671+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:41:15.699851+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:41:15.701681+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:41:17.724720+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:41:17.725530+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:41:19.762183+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:41:19.764446+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:41:21.811235+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:41:21.812471+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:41:23.840651+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:41:23.843239+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:41:25.851610+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:41:25.855589+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:41:27.854976+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:41:27.856094+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:41:29.926054+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:41:29.927053+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:41:32.006363+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:41:32.007150+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:41:34.081884+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:41:34.083288+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:41:36.131967+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:41:36.134303+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:41:38.169565+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] (null)
2020-01-04 12:41:38.169952+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:41:40.241110+0200 BarMagnet[17998:2643849] -[qBittorrent getBaseURL] [Line 42] baseURL http://192.168.1.234:8087
2020-01-04 12:41:40.503807+0200 BarMagnet[17998:2643849] -[qBittorrent getBaseURL] [Line 42] baseURL http://192.168.1.234:8087
2020-01-04 12:41:40.504549+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] http://192.168.1.234:8087/query/torrents
2020-01-04 12:41:40.504795+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:41:40.909876+0200 BarMagnet[17998:2644184] -[qBittorrent getBaseURL] [Line 42] baseURL http://192.168.1.234:8087
2020-01-04 12:41:40.933134+0200 BarMagnet[17998:2644184] -[qBittorrent getBaseURL] [Line 42] baseURL http://192.168.1.234:8087
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIView init]
PID: 17998, TID: 2644184, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   BarMagnet                           0x00000001007aa6c8 -[TSMessageView initWithTitle:subtitle:image:type:duration:inViewController:callback:buttonTitle:buttonCallback:atPosition:canBeDismissedByUser:] + 384
5   BarMagnet                           0x00000001007a570c +[TSMessage showNotificationInViewController:title:subtitle:image:type:duration:callback:buttonTitle:buttonCallback:atPosition:canBeDismissedByUser:] + 416
6   BarMagnet                           0x00000001007a5524 +[TSMessage showNotificationInViewController:title:subtitle:type:] + 204
7   BarMagnet                           0x00000001007a51e0 +[TSMessage showNotificationWithTitle:subtitle:type:] + 160
8   BarMagnet                           0x00000001007ba83c -[TorrentJobChecker credentialsCheckInvocation] + 908
9   Foundation                          0x000000018615c0c4 3C682044-3249-3938-8111-F2F12D066D2B + 1278148
10  libsystem_pthread.dylib             0x0000000185a901d0 _pthread_start + 124
11  libsystem_pthread.dylib             0x0000000185a93ae0 thread_start + 8
2020-01-04 12:41:40.944808+0200 BarMagnet[17998:2644184] [reports] Main Thread Checker: UI API called on a background thread: -[UIView init]
PID: 17998, TID: 2644184, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   BarMagnet                           0x00000001007aa6c8 -[TSMessageView initWithTitle:subtitle:image:type:duration:inViewController:callback:buttonTitle:buttonCallback:atPosition:canBeDismissedByUser:] + 384
5   BarMagnet                           0x00000001007a570c +[TSMessage showNotificationInViewController:title:subtitle:image:type:duration:callback:buttonTitle:buttonCallback:atPosition:canBeDismissedByUser:] + 416
6   BarMagnet                           0x00000001007a5524 +[TSMessage showNotificationInViewController:title:subtitle:type:] + 204
7   BarMagnet                           0x00000001007a51e0 +[TSMessage showNotificationWithTitle:subtitle:type:] + 160
8   BarMagnet                           0x00000001007ba83c -[TorrentJobChecker credentialsCheckInvocation] + 908
9   Foundation                          0x000000018615c0c4 3C682044-3249-3938-8111-F2F12D066D2B + 1278148
10  libsystem_pthread.dylib             0x0000000185a901d0 _pthread_start + 124
11  libsystem_pthread.dylib             0x0000000185a93ae0 thread_start + 8
2020-01-04 12:41:57.596118+0200 BarMagnet[17998:2643849] -[qBittorrent getBaseURL] [Line 42] baseURL http://192.168.1.234:8087
2020-01-04 12:41:57.597818+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 46] http://192.168.1.234:8087/query/torrents
2020-01-04 12:41:57.598636+0200 BarMagnet[17998:2643849] -[TorrentJobChecker jobCheckInvocation] [Line 47] (null)
2020-01-04 12:41:57.601762+0200 BarMagnet[17998:2643850] -[qBittorrent getBaseURL] [Line 42] baseURL http://192.168.1.234:8087
2020-01-04 12:41:57.611821+0200 BarMagnet[17998:2644184] [Assert] UIView animation API is 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.
2020-01-04 12:41:57.623505+0200 BarMagnet[17998:2644184] 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                          0x0000000186249e8c 3C682044-3249-3938-8111-F2F12D066D2B + 2252428
	1   Foundation                          0x0000000186054d64 3C682044-3249-3938-8111-F2F12D066D2B + 200036
	2   Foundation                          0x0000000186054c7c 3C682044-3249-3938-8111-F2F12D066D2B + 199804
	3   Foundation                          0x00000001860548f0 3C682044-3249-3938-8111-F2F12D066D2B + 198896
	4   UIKitCore                           0x000000018a25d790 B7E79AF1-F09F-3BCE-B073-ECEA027BC0E8 + 15214480
	5   UIKitCore                           0x0000000189724d48 B7E79AF1-F09F-3BCE-B073-ECEA027BC0E8 + 3448136
	6   UIKitCore                           0x0000000189724f7c B7E79AF1-F09F-3BCE-B073-ECEA027BC0E8 + 3448700
	7   UIKitCore                           0x0000000189737c60 B7E79AF1-F09F-3BCE-B073-ECEA027BC0E8 + 3525728
	8   UIKitCore                           0x000000018971b0dc B7E79AF1-F09F-3BCE-B073-ECEA027BC0E8 + 3408092
	9   UIKitCore                           0x000000018a271604 B7E79AF1-F09F-3BCE-B073-ECEA027BC0E8 + 15296004
	10  QuartzCore                          0x000000018c7bf78c 8705A7FE-6FD6-301F-BE30-D32F13CB6C0E + 1378188
	11  QuartzCore                          0x000000018c7c5908 8705A7FE-6FD6-301F-BE30-D32F13CB6C0E + 1403144
	12  QuartzCore                          0x000000018c7d0528 8705A7FE-6FD6-301F-BE30-D32F13CB6C0E + 1447208
	13  QuartzCore                          0x000000018c718ed0 8705A7FE-6FD6-301F-BE30-D32F13CB6C0E + 696016
	14  QuartzCore                          0x000000018c742bbc 8705A7FE-6FD6-301F-BE30-D32F13CB6C0E + 867260
	15  QuartzCore                          0x000000018c743b40 8705A7FE-6FD6-301F-BE30-D32F13CB6C0E + 871232
	16  libsystem_pthread.dylib             0x0000000185a93344 F8B082D8-24D9-3B1E-B80B-645FC8A88E14 + 58180
	17  libsystem_pthread.dylib             0x0000000185a9022c F8B082D8-24D9-3B1E-B80B-645FC8A88E14 + 45612
	18  libsystem_pthread.dylib             0x0000000185a86854 pthread_exit + 36
	19  Foundation                          0x0000000186063714 3C682044-3249-3938-8111-F2F12D066D2B + 259860
	20  Foundation                          0x000000018615c0d8 3C682044-3249-3938-8111-F2F12D066D2B + 1278168
	21  libsystem_pthread.dylib             0x0000000185a901d0 _pthread_start + 124
	22  libsystem_pthread.dylib             0x0000000185a93ae0 thread_start + 8
)
2020-01-04 12:41:57.628509+0200 BarMagnet[17998:2644184] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Modifications to the layout engine must not be performed from a background thread after it has been accessed from the main thread.'
*** First throw call stack:
(0x185d7380c 0x185a9bfa4 0x186249f1c 0x186054d64 0x186054c7c 0x1860548f0 0x18a25d790 0x189724d48 0x189724f7c 0x189737c60 0x18971b0dc 0x18a271604 0x18c7bf78c 0x18c7c5908 0x18c7d0528 0x18c718ed0 0x18c742bbc 0x18c743b40 0x185a93344 0x185a9022c 0x185a86854 0x186063714 0x18615c0d8 0x185a901d0 0x185a93ae0)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 
@nadavcoh
Copy link
Author

nadavcoh commented Jan 4, 2020

https://stackoverflow.com/questions/43071654/modifications-to-the-layout-engine-must-not-be-performed-from-a-background-threa
This question on stack overflow verifies that this is an issue introduced in iOS 13

wasn't a problem in iOS 12, but crashed my app in iOS 13

And somewhat related to calling UIKit from a background thread

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant