Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1475] Crash in "Dispatch queue: com.apple.NSURLSession-work" thread

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionNot Our Bug
Resolution Date2015-11-12T11:45:05.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsios
Reporterkazuaki konno
AssigneeShak Hossain
Created2015-09-19T05:36:14.000+0000
Updated2016-03-08T07:37:55.000+0000

Description

*App crash in "Dispatch queue: com.apple.NSURLSession-work" thread when launching.* This problem occurs in unspecified numbers of the devices. Some devices works fine but others don't, even with the same model. So we can not find out what exactly cause this problem. But we know it really happens. We also tried with 4.1.1.GA but still can not solve the problem. This is happening in store app and we really need your help. Store Link: https://itunes.apple.com/app/chattowaku-shi-shide-shieru/id463672966?mt=8 Log:
----------------------
Thread 8 name:  Dispatch queue: com.apple.NSURLSession-work
Thread 8:
0   dyld                          	0x1fe11b32 ImageLoaderMachO::getInstallPath() const + 14
1   dyld                          	0x1fe070fa dyld::checkandAddImage(ImageLoader*, dyld::LoadContext const&) + 78
2   dyld                          	0x1fe0b6a8 dyld::loadPhase5(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 280
3   dyld                          	0x1fe0b56e dyld::loadPhase4(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 142
4   dyld                          	0x1fe0b498 dyld::loadPhase3(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 1116
5   dyld                          	0x1fe0ae94 dyld::loadPhase1(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 108
6   dyld                          	0x1fe0704a dyld::loadPhase0(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 166
7   dyld                          	0x1fe06cc4 dyld::load(char const*, dyld::LoadContext const&) + 216
8   dyld                          	0x1fe0d1b4 dlopen + 828
9   libdyld.dylib                 	0x34ae5722 dlopen + 46
10  CoreFoundation                	0x25e6c71c __CFLookupCoreServicesInternalFunction + 32
11  CoreFoundation                	0x25de1b6c CFURLCopyResourcePropertyForKey + 220
12  CFNetwork                     	0x258d8c24 HSTSCache::createDataFromFileURL(__CFAllocator const*, __CFURL const*, __CFError**) + 36
13  CFNetwork                     	0x258d8b22 HSTSCache::createKnownHSTSHostsDictionary() + 66
14  CFNetwork                     	0x258d8a60 HSTSCache::initialize(__CFDictionary const*) + 64
15  libdispatch.dylib             	0x34ac4f0e dispatch_once_f + 58
16  CFNetwork                     	0x258d8902 HSTSPolicy::createDefaultPolicy() + 50
17  CFNetwork                     	0x258c1330 _CFHSTSPolicyCreateWithProperties + 68
18  CFNetwork                     	0x258c12ca ___ZNK14StorageSession15copyHSTSStorageEv_block_invoke + 218
19  libdispatch.dylib             	0x34ac4f0e dispatch_once_f + 58
20  CFNetwork                     	0x258c11ea StorageSession::copyHSTSStorage() const + 90
21  CFNetwork                     	0x259c35f8 -[NSURLSessionConfiguration copyHSTSPolicy] + 64
22  CFNetwork                     	0x2595334c HTTPProtocol::_createMutableCanonicalRequest(__CFAllocator const*, _CFURLRequest const*, NSURLSession const*, void const*) + 40
23  CFNetwork                     	0x25952f88 HTTPProtocol::_createCanonicalRequest(__CFAllocator const*, _CFURLRequest const*, NSURLSession const*, void const*) + 40
24  CFNetwork                     	0x25924708 +[_NSCFURLProtocol canonicalRequestForRequest:task:] + 84
25  CFNetwork                     	0x258e137e -[__NSURLSessionLocal _createCanonicalRequestForTask:] + 98
26  CFNetwork                     	0x258c4494 URLConnectionClient::_internalEvent_WillSendRequest() + 72
27  CFNetwork                     	0x2597214a URLConnectionClient::_connectionClientInterface_startConnection(__CFRunLoop*, __CFString const*) + 62
28  CFNetwork                     	0x258c42b4 ___ZN20ClassicURLConnection5startEv_block_invoke + 36
29  CFNetwork                     	0x25925f60 ___ZN20ClassicURLConnection15withClientAsyncEU13block_pointerFvP25ConnectionClientInterfaceE_block_invoke + 12
30  CFNetwork                     	0x25971f5e ___ZNK25URLConnectionInstanceData18withWorkQueueAsyncEU13block_pointerFvvE_block_invoke + 10
31  libdispatch.dylib             	0x34ac42e0 _dispatch_call_block_and_release + 8
32  libdispatch.dylib             	0x34acc724 _dispatch_queue_drain + 1464
33  libdispatch.dylib             	0x34ac6aa8 _dispatch_queue_invoke + 80
34  libdispatch.dylib             	0x34acdf9c _dispatch_root_queue_drain + 392
35  libdispatch.dylib             	0x34acf3be _dispatch_worker_thread3 + 90
36  libsystem_pthread.dylib       	0x34c28db2 _pthread_wqthread + 666
37  libsystem_pthread.dylib       	0x34c28b04 start_wqthread + 4
----------------------

Comments

  1. Ingo Muschenetz 2015-09-19

    If possible, do you suspect a set of Titanium code that might cause this? [~cng], any thoughts? It is also possible this is an Apple bug. See: http://stackoverflow.com/questions/26167407/thread-crashed-com-apple-nsurlsession-work
  2. Chee Kiat Ng 2015-09-20

    Hi I like to ask if you are using the com.appcelerator.urlsession module? Or the Ti.Network.HTTPClient methods? And also, have you used 5.0.0 SDK?
  3. kazuaki konno 2015-09-20

    Hi, We are not using urlsession mudule. We are using HTTPClient method. Not using 5.0.0 SDK.
  4. Chee Kiat Ng 2015-09-21

    Hi, Then it's most likely related to the Apple bug commented earlier. we do not use nsurlsession on our httpclient pre-5.1.0.
  5. kazuaki konno 2015-09-21

    Hi, It means 5.1.0 should solve this problem?
  6. Chee Kiat Ng 2015-09-22

    I cannot guarantee since it's really an apple bug, but sure it's worthwhile to try.

JSON Source