When I use a singleton to call a type object, the program crashes.

Source: Internet
Author: User

The specific error is as follows, which can be solved:

 

08:57:46. 508 XYZ [707: 1403] *** assertion failure in-[uikeyboardtaskqueue failed],/sourcecache/uikit_sim/UIKit-2935.137/keyboard/uikeyboardtaskqueue. M: 368

08:57:46. 509 XYZ [707: 1403] *** terminating app due to uncaught exception 'nsinternalinconsistencyexception', reason: '-[uikeyboardtaskqueue waituntilalltasksarefinished] may only be called from the main thread.'

*** First throw call Stack:

(

0 corefoundation 0x0266e1e4 _ predictionpreprocess + 180

1 libobjc. A. dylib 0x023ed8e5 objc_exception_throw + 44

2 corefoundation 0x0266e048 + [nsexception raise: Format: arguments:] + 136

3 Foundation 0x01fcd4de-[nsassertionhandler handlefailureinmethod: object: file: linenumber: Description:] + 116

4 uikit 0x01800166-[uikeyboardtaskqueue waituntilalltasksarefinished] + 167

5 uikit 0x0128ff11-[uikeyboardimpl setdelegate: Force:] + 442

6 uikit 0x0128fd52-[uikeyboardimpl setdelegate:] + 60

7 uikit 0x01556dc5-[uiperipheralhost (uikitinternal) _ reloadinputviewsforresponder:] + 956

8 uikit 0x01560a0e-[uiperipheralhost (uikitinternal) _ preserveinputviewswithid: animated:] + 550

9 uikit 0x011d7940-[uiviewcontroller presentviewcontroller: withtransition: Completion:] + 3317

10 uikit 0x10f9078f-[uiviewcontrolleraccessibility (safecategory) presentviewcontroller: withtransition: Completion:] + 71

11 uikit 0x011d8aef-[uiviewcontroller presentviewcontroller: animated: Completion:] + 130

12 XYZ 0x0007e613 _ 33-[loginviewcontroller userlogin:] _ block_invoke + 483

13 Foundation 0x02109ac5 _ 67 + [nsurlconnection sendasynchronousrequest: queue: completionhandler:] _ block_invoke_2 + 151

14 Foundation 0x02068d65-[nsblockoperation main] + 88

15 Foundation 0x020c1c79-[_ nsoperationinternal _ start:] + 671

16 Foundation 0x0203e9c8-[nsoperation start] + 83

17 Foundation 0x020c3f44 _ nsoqschedule_f + 62

18 libdispatch. dylib 0x030854d0 _ dispatch_client_callout + 14

19 libdispatch. dylib 0x03071fe0 _ dispatch_async_redirect_invoke + 202

20 libdispatch. dylib 0x030854d0 _ dispatch_client_callout + 14

21 libdispatch. dylib 0x03073eb7 _ dispatch_root_queue_drain + 291

22 libdispatch. dylib 0x03074127 _ dispatch_worker_thread2 + 39

23 libsystem_pthread.dylib 0x033b4dab _ pthread_wqthread + 336

24 libsystem_pthread.dylib 0x033b8cce start_wqthread + 30

)

Libc ++ Abi. dylib: terminating with uncaught exception of Type nsexception

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.