weex在ios11设备上,如果.we文件中加入了<input>组件,app就会崩溃
报错为:Main Thread Checker: UI API called on a background thread: -[UIView init]
完整报错:
2017-09-19 15:53:14.109616+0800 DEV[33368:845422] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Only run on the main thread!'
* First throw call stack:
(
0 CoreFoundation 0x000000010f6f11cb __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010f053f41 objc_exception_throw + 48
2 CoreFoundation 0x000000010f6f6362 +[NSException raise:format:arguments:] + 98
3 Foundation 0x000000010c2b0523 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 165
4 UIFoundation 0x0000000118108678 -[NSLayoutManager(NSPrivate) _resizeTextViewForTextContainer:] + 1178
5 UIFoundation 0x000000011810809d -[NSLayoutManager(NSPrivate) _recalculateUsageForTextContainerAtIndex:] + 2232
6 UIFoundation 0x000000011813f01e _enableTextViewResizing + 228
7 UIFoundation 0x000000011813ed09 -[NSLayoutManager setTextStorage:] + 900
8 UIFoundation 0x000000011816e223 -[NSTextStorage addLayoutManager:] + 84
9 UIKit 0x000000010c985582 -[UIFieldEditor initWithTextField:textStorage:] + 739
10 UIKit 0x000000010d50653b -[UITextField _fieldEditor] + 186
11 UIKit 0x000000010d50ac50 -[UITextField _initContentView] + 56
12 UIKit 0x000000010d4f0ee9 -[UITextField initWithFrame:] + 394
13 UIKit 0x000000010c895f66 -[UIView init] + 62
14 DEV 0x000000010500f5ec -[WXTextInputView init] + 39
15 DEV 0x000000010500fadc -[WXTextInputComponent initWithRef:type:styles:attributes:events:weexInstance:] + 317
16 DEV 0x0000000104fe90fb -[WXComponentManager _buildComponentForData:] + 319
17 DEV 0x0000000104fe87dd -[WXComponentManager _recursivelyAddComponent:toSupercomponent:atIndex:appendingInTree:] + 108
18 DEV 0x0000000104fe874e -[WXComponentManager addComponent:toSupercomponent:atIndex:appendingInTree:] + 110
19 DEV 0x0000000104fe54c0 __27-[WXBridgeContext jsBridge]_block_invoke_2 + 103
20 DEV 0x0000000104fe80df +[WXComponentManager _performBlockOnComponentThread:] + 233
21 Foundation 0x000000010c217948 __NSThreadPerformPerform + 334
22 CoreFoundation 0x000000010f6942b1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
23 CoreFoundation 0x000000010f733d31 __CFRunLoopDoSource0 + 81
24 CoreFoundation 0x000000010f678c19 __CFRunLoopDoSources0 + 185
25 CoreFoundation 0x000000010f6781ff __CFRunLoopRun + 1279
26 CoreFoundation 0x000000010f677a89 CFRunLoopRunSpecific + 409
27 Foundation 0x000000010c1d1e5e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 274
28 DEV 0x0000000104fe7fc8 -[WXComponentManager _runLoopThread] + 255
29 Foundation 0x000000010c1df8ac __NSThread__start__ + 1197
30 libsystem_pthread.dylib 0x00000001107e993b _pthread_body + 180
31 libsystem_pthread.dylib 0x00000001107e9887 _pthread_body + 0
32 libsystem_pthread.dylib 0x00000001107e908d thread_start + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
浏览器中正常,各位大佬有知道问题在哪里的嘛?感恩感恩!!
Log很清楚啊,view在后台线程初始化。