- Home /
Unity www class crashes on iOS 64 bit
I just built an application for iOS 64 bit using unity 5.1, xcode 6.4. I'm calling a Rest API with some headers inside. But the application crashes on this www call.
The crash point is somewhere in FeedUnityWebStream which is an assembly file, hence no help from crash point. Crash log has some entries of CFNetwork library.
This API has been working fine on 32 bit build.
Please help
Api Call
string url = "http://gamelootnetwork.com/apis/RestServer.php/";
WWWForm form = new WWWForm();
form.AddField("method","imatrixLogin" );
form.AddField("imatrix_id", strEmail);
form.AddField("password", strPassword);
WWW www = new WWW(url, form);
loading = DashUpUtil.showLoadingIndicator(transform.parent);
StartCoroutine(WaitForRequest(www));
Crash Log
Incident Identifier: B99794F3-44F8-4569-8B85-4DD43A00A2D0 CrashReporter Key: 01fb558dcc66147392c762d8463e5c11b693f6b5 Hardware Model: iPad4,4 Process: lootflyer [4089] Path: /private/var/mobile/Containers/Bundle/Application/66682A15-3FFA-4C58-8DDB-7D85A800BFBE/lootflyer.app/lootflyer Identifier: com.gamelootnetwork.lootflyer Version: 1.1 (1.1) Code Type: ARM-64 (Native) Parent Process: launchd [1]
Date/Time: 2015-07-14 17:14:17.480 +0500 Launch Time: 2015-07-14 17:13:45.889 +0500 OS Version: iOS 8.1.2 (12B440) Report Version: 105
Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x00000001bb27beb8 Triggered by Thread: 0
Thread 0 name: main Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 libobjc.A.dylib 0x00000001946cfbd0 objc_msgSend + 16 1 lootflyer 0x0000000100e9b258 WWW::FeedUnityWebStream(bool) (WWW.cpp:236) 2 CFNetwork 0x0000000183746e6c 65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]block_invoke + 76 3 CFNetwork 0x0000000183746dfc -[NSURLConnectionInternal withConnectionAndDelegate:onlyActive:] + 204 4 CFNetwork 0x0000000183746f78 -[NSURLConnectionInternal withActiveConnectionAndDelegate:] + 56 5 CFNetwork 0x000000018361b8e0 ZN27URLConnectionClient_Classic26_delegate_didFinishLoadingEU13block_pointerFvvE_block_invoke + 100 6 CFNetwork 0x00000001836e453c _ZN27URLConnectionClient_Classic18_withDelegateAsyncEPKcU13block_pointerFvP16_CFURLConnectionPK33CFURLConnectionClientCurrent_VMaxE_block_invoke_2 + 100 7 CFNetwork 0x0000000183607b50 RunloopBlockContext::_invoke_block(void const*, void*) + 72 8 CoreFoundation 0x0000000183b84aa8 CFArrayApplyFunction + 64 9 CFNetwork 0x00000001836079fc RunloopBlockContext::perform() + 132 10 CFNetwork 0x00000001836078b0 MultiplexerSource::perform() + 308 11 CFNetwork 0x00000001836076dc MultiplexerSource::perform(void*) + 64 12 CoreFoundation 0x0000000183c5a9e8 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 20 13 CoreFoundation 0x0000000183c59c8c CFRunLoopDoSources0 + 260 14 CoreFoundation 0x0000000183c57d3c _CFRunLoopRun + 708 15 CoreFoundation 0x0000000183b850a0 CFRunLoopRunSpecific + 392 16 GraphicsServices 0x000000018cceb5a0 GSEventRunModal + 164 17 UIKit 0x00000001884ba3bc UIApplicationMain + 1484 18 lootflyer 0x0000000100086254 main (main.mm:40) 19 libdyld.dylib 0x0000000194d2aa04 start + 0
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager Thread 1: 0 libsystem_kernel.dylib 0x0000000194e28c94 kevent64 + 8 1 libdispatch.dylib 0x0000000194d1097c _dispatch_mgr_invoke + 272 2 libdispatch.dylib 0x0000000194d033b0 _dispatch_mgr_thread + 48
Thread 2: 0 libsystem_kernel.dylib 0x0000000194e43c78 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x0000000194edd390 _pthread_wqthread + 988 2 libsystem_pthread.dylib 0x0000000194edcfa4 start_wqthread + 0
Thread 3: 0 libsystem_kernel.dylib 0x0000000194e43c78 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x0000000194edd390 _pthread_wqthread + 988 2 libsystem_pthread.dylib 0x0000000194edcfa4 start_wqthread + 0
Thread 4 name: GC Finalizer Thread 4: 0 libsystem_kernel.dylib 0x0000000194e43078 __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x0000000194edefe0 _pthread_cond_wait + 620 2 lootflyer 0x00000001016a396c il2cpp::os::posix::PosixWaitObject::Wait(unsigned int, bool) (PosixWaitObject.cpp:128) 3 lootflyer 0x0000000101683644 FinalizerThread(void*) (gc.cpp:35) 4 lootflyer 0x000000010169f1bc il2cpp::os::Thread::RunWrapper(void*) (Thread.cpp:83) 5 lootflyer 0x00000001016a7170 il2cpp::os::ThreadImpl::ThreadStartWrapper(void*) (ThreadImpl.cpp:91) 6 libsystem_pthread.dylib 0x0000000194edfe7c _pthread_body + 160 7 libsystem_pthread.dylib 0x0000000194edfdd8 _pthread_start + 156 8 libsystem_pthread.dylib 0x0000000194edcfac thread_start + 0
Thread 5 name: BatchDeleteObjects Thread 5: 0 libsystem_kernel.dylib 0x0000000194e28eb8 semaphore_wait_trap + 8 1 libdispatch.dylib 0x0000000194d0ea4c _dispatch_semaphore_wait_slow + 252 2 lootflyer 0x0000000101014264 ThreadedStreamBuffer::HandleReadOverflow(unsigned int&, unsigned int&) (ThreadedStreamBuffer.cpp:291) 3 lootflyer 0x0000000100f6c534 BatchDeleteStep2Threaded(void*) (BatchDeleteObjects.cpp:93) 4 lootflyer 0x00000001010138b4 Thread::RunThreadWrapper(void*) (Thread.cpp:40) 5 libsystem_pthread.dylib 0x0000000194edfe7c _pthread_body + 160 6 libsystem_pthread.dylib 0x0000000194edfdd8 _pthread_start + 156 7 libsystem_pthread.dylib 0x0000000194edcfac thread_start + 0
Thread 6 name: AsyncReadManager Thread 6: 0 libsystem_kernel.dylib 0x0000000194e28eb8 semaphore_wait_trap + 8 1 libdispatch.dylib 0x0000000194d0ea4c _dispatch_semaphore_wait_slow + 252 2 lootflyer 0x000000010102766c AsyncReadManagerThreaded::ThreadEntry() (AsyncReadManagerThreaded.cpp:85) 3 lootflyer 0x000000010102746c AsyncReadManagerThreaded::StaticThreadEntry(void*) (AsyncReadManagerThreaded.cpp:53) 4 lootflyer 0x00000001010138b4 Thread::RunThreadWrapper(void*) (Thread.cpp:40) 5 libsystem_pthread.dylib 0x0000000194edfe7c _pthread_body + 160 6 libsystem_pthread.dylib 0x0000000194edfdd8 _pthread_start + 156 7 libsystem_pthread.dylib 0x0000000194edcfac thread_start + 0
Thread 7 name: UnityWorker Thread 7: 0 libsystem_kernel.dylib 0x0000000194e28eb8 semaphore_wait_trap + 8 1 libdispatch.dylib 0x0000000194d0ea4c _dispatch_semaphore_wait_slow + 252 2 lootflyer 0x00000001010133c8 CappedSemaphore::WaitForSignal() (CappedSemaphore.h:63) 3 lootflyer 0x0000000101012db8 JobQueue::ProcessJobs(void*, bool*) (JobQueue.cpp:573) 4 lootflyer 0x00000001010125f8 JobQueue::WorkLoop(void*) (JobQueue.cpp:579) 5 lootflyer 0x00000001010138b4 Thread::RunThreadWrapper(void*) (Thread.cpp:40) 6 libsystem_pthread.dylib 0x0000000194edfe7c _pthread_body + 160 7 libsystem_pthread.dylib 0x0000000194edfdd8 _pthread_start + 156 8 libsystem_pthread.dylib 0x0000000194edcfac thread_start + 0
Thread 8: 0 libsystem_kernel.dylib 0x0000000194e28eb8 semaphore_wait_trap + 8 1 lootflyer 0x000000010160e4f4 algThreadJobQueueThreadFunc + 32 2 libsystem_pthread.dylib 0x0000000194edfe7c _pthread_body + 160 3 libsystem_pthread.dylib 0x0000000194edfdd8 _pthread_start + 156 4 libsystem_pthread.dylib 0x0000000194edcfac thread_start + 0
Thread 9 name: UnitySubstanceThread Thread 9: 0 libsystem_kernel.dylib 0x0000000194e28eb8 semaphore_wait_trap + 8 1 libdispatch.dylib 0x0000000194d0ea4c _dispatch_semaphore_wait_slow + 252 2 lootflyer 0x0000000100f26efc SubstanceSystem::ThreadMain(void*) (Semaphore.h:22) 3 lootflyer 0x00000001010138b4 Thread::RunThreadWrapper(void*) (Thread.cpp:40) 4 libsystem_pthread.dylib 0x0000000194edfe7c _pthread_body + 160 5 libsystem_pthread.dylib 0x0000000194edfdd8 _pthread_start + 156 6 libsystem_pthread.dylib 0x0000000194edcfac thread_start + 0
Thread 10: 0 libsystem_kernel.dylib 0x0000000194e28eb8 semaphore_wait_trap + 8 1 lootflyer 0x00000001012bea58 FMOD_OS_Semaphore_Wait(FMOD_OS_SEMAPHORE*) + 12 2 lootflyer 0x00000001012da7bc FMOD::Thread::callback(void*) + 60 3 libsystem_pthread.dylib 0x0000000194edfe7c _pthread_body + 160 4 libsystem_pthread.dylib 0x0000000194edfdd8 _pthread_start + 156 5 libsystem_pthread.dylib 0x0000000194edcfac thread_start + 0
Thread 11 name: AURemoteIO::IOThread Thread 11: 0 libsystem_kernel.dylib 0x0000000194e28e7c mach_msg_trap + 8 1 libsystem_kernel.dylib 0x0000000194e28cf4 mach_msg + 68 2 AudioToolbox 0x00000001832997b8 AURemoteIO::IOThread::Run() + 112 3 AudioToolbox 0x000000018329cf9c AURemoteIO::IOThread::Entry(void*) + 8 4 AudioToolbox 0x00000001831bcdd8 CAPThread::Entry(CAPThread*) + 140 5 libsystem_pthread.dylib 0x0000000194edfe7c _pthread_body + 160 6 libsystem_pthread.dylib 0x0000000194edfdd8 _pthread_start + 156 7 libsystem_pthread.dylib 0x0000000194edcfac thread_start + 0
Thread 12: 0 libsystem_kernel.dylib 0x0000000194e43570 __semwait_signal + 8 1 libsystem_c.dylib 0x0000000194d6592c nanosleep + 212 2 libsystem_c.dylib 0x0000000194d65848 usleep + 64 3 lootflyer 0x00000001012be5b8 FMOD_OS_Time_Sleep(unsigned int) + 16 4 lootflyer 0x00000001012da7a8 FMOD::Thread::callback(void*) + 40 5 libsystem_pthread.dylib 0x0000000194edfe7c _pthread_body + 160 6 libsystem_pthread.dylib 0x0000000194edfdd8 _pthread_start + 156 7 libsystem_pthread.dylib 0x0000000194edcfac thread_start + 0
Thread 13: 0 libsystem_pthread.dylib 0x0000000194ee3e08 DYLD-STUB$$_platform_memmove + 4 1 libsystem_pthread.dylib 0x0000000194edd4dc pthread_mutex_lock + 308 2 CoreFoundation 0x0000000183c5a184 CFRunLoopDoSource1 + 472 3 CoreFoundation 0x0000000183c580dc _CFRunLoopRun + 1636 4 CoreFoundation 0x0000000183b850a0 CFRunLoopRunSpecific + 392 5 CoreFoundation 0x0000000183bd71f8 CFRunLoopRun + 108 6 CoreMotion 0x000000018458298c 0x184540000 + 272780 7 libsystem_pthread.dylib 0x0000000194edfe7c _pthread_body + 160 8 libsystem_pthread.dylib 0x0000000194edfdd8 _pthread_start + 156 9 libsystem_pthread.dylib 0x0000000194edcfac thread_start + 0
Thread 14 name: UnityPreload Thread 14: 0 libsystem_kernel.dylib 0x0000000194e28eb8 semaphore_wait_trap + 8 1 libdispatch.dylib 0x0000000194d0ea4c _dispatch_semaphore_wait_slow + 252 2 lootflyer 0x0000000100f72704 PreloadManager::Run() (Semaphore.h:22) 3 lootflyer 0x0000000100f726b0 PreloadManager::Run(void*) (PreloadManager.cpp:174) 4 lootflyer 0x00000001010138b4 Thread::RunThreadWrapper(void*) (Thread.cpp:40) 5 libsystem_pthread.dylib 0x0000000194edfe7c _pthread_body + 160 6 libsystem_pthread.dylib 0x0000000194edfdd8 _pthread_start + 156 7 libsystem_pthread.dylib 0x0000000194edcfac thread_start + 0
Thread 15 name: com.apple.NSURLConnectionLoader Thread 15: 0 libsystem_kernel.dylib 0x0000000194e28e7c mach_msg_trap + 8 1 libsystem_kernel.dylib 0x0000000194e28cf4 mach_msg + 68 2 CoreFoundation 0x0000000183c59ecc CFRunLoopServiceMachPort + 196 3 CoreFoundation 0x0000000183c57e20 __CFRunLoopRun + 936 4 CoreFoundation 0x0000000183b850a0 CFRunLoopRunSpecific + 392 5 CFNetwork 0x000000018368a4e4 +[NSURLConnection(Loader) resourceLoadLoop:] + 436 6 Foundation 0x0000000184b75c08 NSThread_main + 1068 7 libsystem_pthread.dylib 0x0000000194edfe7c _pthread_body + 160 8 libsystem_pthread.dylib 0x0000000194edfdd8 _pthread_start + 156 9 libsystem_pthread.dylib 0x0000000194edcfac thread_start + 0
Thread 16 name: com.apple.CFSocket.private Thread 16: 0 libsystem_kernel.dylib 0x0000000194e43498 __select + 8 1 CoreFoundation 0x0000000183c5f8c4 __CFSocketManager + 656 2 libsystem_pthread.dylib 0x0000000194edfe7c _pthread_body + 160 3 libsystem_pthread.dylib 0x0000000194edfdd8 _pthread_start + 156 4 libsystem_pthread.dylib 0x0000000194edcfac thread_start + 0
Thread 0 crashed with ARM Thread State (64-bit): x0: 0x000000017025f110 x1: 0x0000000188c31a22 x2: 0x0000000100d6c924 x3: 0x0000000000000010 x4: 0x0000000000000000 x5: 0x0000000000000000 x6: 0x00000001700ce018 x7: 0x0000000000000a80 x8: 0x0000000101c43000 x9: 0x00000001bb27bea8 x10: 0x0000000135864170 x11: 0x000000150000001f x12: 0x0000000135864330 x13: 0xbaddaaa9bb27bead x14: 0x0000000000000000 x15: 0x0000000000000001 x16: 0x00000001946cfbc0 x17: 0x0000000100086f1c x18: 0x0000000000000000 x19: 0x0000000134772190 x20: 0x000000016fd7e580 x21: 0x0000000000000001 x22: 0x0000000000000001 x23: 0x0000000188c258a0 x24: 0x0000000170215640 x25: 0x000000016fd7e578 x26: 0x000000019533eb82 x27: 0x000000019534ae0c x28: 0x0000000000000000 fp: 0x000000016fd7e620 lr: 0x0000000100e9b25c sp: 0x000000016fd7e570 pc: 0x00000001946cfbd0 cpsr: 0x20000000
In case you haven't already, be sure to officially report this as a bug (in addition to posting here to help narrow down cause/find workarounds) so that it can be fixed in Unity itself.
@faizie Was this ever resolved? I'm getting a similar crash using 5.3.4p1 under some pretty specific circumstances, though my crash is happening in a different thread and has slightly more stack available above FeedUnityWebStream.
For me the problem was that I had disabled ARC in Xcode. When I enabled it in build settings, the problem was solved. Go to "Build Settings", Look for "Apple LLV$$anonymous$$ 7.0 - Language - Objective C" Under that menu, select "Yes" for "Objective-C Automatic Reference Counting"
Answer by Brijs · Jun 10, 2016 at 12:09 PM
Add -ObjC in linker flag and enable ARC in build Settings.
If you get some other errors because of ARC enabled then....
You can disable ARC for a specific class using the -fno-objc-arc compiler flag. In Xcode, go to Target --> Build Phases tab --> Compile Sources group.
Double-click the file for which you want to set the flag, enter -fno-objc-arc in the pop-up panel, then click Done.
Answer by g8minhquan · Jun 10, 2016 at 01:27 AM
(This might not a direct answer to your question) I've been using Best HTTP instead of Unity's WWW for about 2 years. Never had any issue with it so far.
Your answer
Follow this Question
Related Questions
WWW post request failing on 64 bit iOS 0 Answers
iOS 64bit build with WebRequest.Create() 1 Answer
64 bit build iOS in Unity free 1 Answer
IL2CPP Build error with enum or coroutine. 0 Answers
IL2CPP - RPC doesn't work 1 Answer