iOS-game crashes at the WWW-queries when off wi-fi

Hello!

The game periodically crashes on iOS when you turn off the Internet!
To reproduce this error is difficult, sometimes it’s 5 minutes, sometimes 5 hours.

At the moment, the error is reproduced on such devices:

  1. iPod touch 5 (iOS 8.2); (the app crashes more often).
  2. iPhone 5 (iOS 9.2.1);
  3. iPhone 4 (iOS 7.1.2);
  4. iPad 2 (iOS 7.1.2).
    All symbolicated crashlogs are in the attachments!

Error from logs:
“task_set_exception_ports” and “Service exited due to signal: Segmentation fault: 11”:

Oct 26 17:57:53    iPod-Touch ReportCrash[1379] <Error>: task_set_exception_ports(B07, 400, D03, 0, 0) failed with error (4: (os/kern) invalid argument)
Oct 26 17:57:53    iPod-Touch ReportCrash[1379] <Notice>: ReportCrash acting against PID 1140
Oct 26 17:57:54    iPod-Touch ReportCrash[1379] <Notice>: Formulating crash report for process mygame222222[1140]
Oct 26 17:57:54    iPod-Touch mediaserverd[35] <Notice>: '' com.publisher.game.mygame222222(pid = 1140) setting DiscoveryMode = DiscoveryMode_None, currentDiscoveryMode = DiscoveryMode_None
Oct 26 17:57:54    iPod-Touch com.apple.xpc.launchd[1] (UIKitApplication:com.publisher.game.mygame222222[0xbc9b][1140]) <Notice>: Service exited due to signal: Segmentation fault: 11
Oct 26 17:57:55    iPod-Touch SpringBoard[42] <Warning>: Application 'UIKitApplication:com.publisher.game.mygame222222[0xbc9b]' crashed.
Oct 26 17:57:55    iPod-Touch UserEventAgent[17] <Warning>: id=com.publisher.game.mygame222222 pid=1140, state=0
Oct 26 17:57:55    iPod-Touch ReportCrash[1379] <Notice>: Saved report to /var/mobile/Library/Logs/CrashReporter/mygame222222_2016-10-26-175753_iPod-Touch.ips
Oct 26 17:57:56    iPod-Touch coreduetd[1383] <Warning>: [Warning] Services all disappeared, removing all dependent devices

Error from symbolicated crashlog:
“EXC_BAD_ACCESS (SIGSEGV)” and “KERN_INVALID_ADDRESS”:

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x70000018
Triggered by Thread:  35

Filtered syslog:
None found

Breadcrumb Trail: (reverse chronological seconds)
3812   GC Framework: startAuthenticationForExistingPrimaryPlayer
......
......
.....
Thread 35 name:  Dispatch queue: com.unity3d.WebOperationQueue :: NSOperation 0x19f351a0 (QOS: LEGACY)
Thread 35 Crashed:
0   mygame222222                      0x005c37b2 WWW::FeedUnityWebStream(bool) (WWW.h:96)
1   mygame222222                      0x0088b4ae iPhoneWWWDownloadBuffer::OnCompleteContent() (iPhoneWWW.mm:64)
2   mygame222222                      0x00853422 UnityReportWWWFinishedLoadingData (TransportiPhone.cpp:260)
3   mygame222222                      0x0002d050 -[UnityWWWConnectionDelegate connection:didFailWithError:] (WWWConnection.mm:239)
4   CFNetwork                         0x25c20de0 __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke + 56
5   CFNetwork                         0x25c20d98 -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 184
6   CFNetwork                         0x25c20ebc -[NSURLConnectionInternal _withConnectionAndDelegate:] + 36
7   CFNetwork                         0x25bfcf5c _NSURLConnectionDidFail(_CFURLConnection*, __CFError*, void const*) + 84
8   CFNetwork                         0x25b9c7ce ___ZN27URLConnectionClient_Classic17_delegate_didFailEP9__CFErrorU13block_pointerFvvE_block_invoke + 86
9   CFNetwork                         0x25b9b04e ___ZN27URLConnectionClient_Classic18_withDelegateAsyncEPKcU13block_pointerFvP16_CFURLConnectionPK33CFURLConnectionClientCurrent_VMaxE_block_invoke_2 + 70
10  libdispatch.dylib                 0x25187dc2 _dispatch_client_callout + 22
11  libdispatch.dylib                 0x2518f65a _dispatch_block_invoke + 450
12  CFNetwork                         0x25ad31e2 RunloopBlockContext::_invoke_block(void const*, void*) + 18
13  CoreFoundation                    0x254fd5f8 CFArrayApplyFunction + 36
14  CFNetwork                         0x25ad30ca RunloopBlockContext::perform() + 182
15  CFNetwork                         0x25ad2f94 MultiplexerSource::perform() + 216
16  CFNetwork                         0x25ad2e28 MultiplexerSource::_perform(void*) + 48
17  CoreFoundation                    0x255ad256 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
18  CoreFoundation                    0x255ace46 __CFRunLoopDoSources0 + 454
19  CoreFoundation                    0x255ab1ae __CFRunLoopRun + 806
20  CoreFoundation                    0x254fdbb8 CFRunLoopRunSpecific + 516
21  CoreFoundation                    0x254fd9ac CFRunLoopRunInMode + 108
22  Foundation                        0x25d357ac -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 268
23  Foundation                        0x25d8437c -[NSRunLoop(NSRunLoop) run] + 80
24  mygame222222                      0x0002e226 __UnitySendWWWConnection_block_invoke_2 (WWWConnection.mm:361)
25  Foundation                        0x25dee52c __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 8
26  Foundation                        0x25d4fefe -[NSBlockOperation main] + 146
27  Foundation                        0x25d422ee -[__NSOperationInternal _start:] + 774
28  Foundation                        0x25df07ec __NSOQSchedule_f + 192
29  libdispatch.dylib                 0x25191f96 _dispatch_queue_drain + 1762
30  libdispatch.dylib                 0x2518af2e _dispatch_queue_invoke + 282
31  libdispatch.dylib                 0x25193324 _dispatch_root_queue_drain + 400
32  libdispatch.dylib                 0x25193192 _dispatch_worker_thread3 + 94
33  libsystem_pthread.dylib           0x25320e0c _pthread_wqthread + 1024
34  libsystem_pthread.dylib           0x253209fc start_wqthread + 8

I run the game and leave it for a long time. WWW-Requests - only Unity Analytics., which is called every 5 minutes.

I think these requests (Unity Analytics) break the game:

2016-10-28 14:28:19.414 mygame222222[474:110334] MyDebug.url: https://api.uca.cloud.unity3d.com/v1/events
2016-10-28 14:28:21.015 mygame222222[474:110334] MyDebug.url: https://api.uca.cloud.unity3d.com/v1/events
2016-10-28 14:28:51.014 mygame222222[474:110334] MyDebug.url: https://api.uca.cloud.unity3d.com/v1/events
2016-10-28 14:29:51.015 mygame222222[474:110334] MyDebug.url: https://api.uca.cloud.unity3d.com/v1/events
2016-10-28 14:31:51.013 mygame222222[474:110334] MyDebug.url: https://api.uca.cloud.unity3d.com/v1/events
2016-10-28 14:36:51.015 mygame222222[474:110334] MyDebug.url: https://api.uca.cloud.unity3d.com/v1/events
2016-10-28 14:41:51.015 mygame222222[474:110334] MyDebug.url: https://api.uca.cloud.unity3d.com/v1/events
2016-10-28 14:46:51.016 mygame222222[474:110334] MyDebug.url: https://api.uca.cloud.unity3d.com/v1/events
.......

I don’t want to disable Unity Analytics because I use Unity IAP.

  1. How to solve the problem???
  2. Maybe we should rewrite the class \Classes\Unity\WWWConnection.mm and make a hotfix???
    An example on c#:
if (wi_fi_status == false && url.Contains("api.uca.cloud.unity3d.com"))  return;

Please help! This is important issue!

Similar problems:

Unity 5.4.2.
Xcode 8.0.
Windows 10.

Best,
Nolex.

2834738–206657–Symbolicated_ipad2.crash.txt (63.3 KB)
2834738–206658–Symbolicated_iphone4.crash.txt (58.8 KB)
2834738–206659–Symbolicated_iphone5.crash.txt (84.1 KB)
2834738–206660–Symbolicated_ipod5.crash.txt (75.3 KB)

Again reproduced the bug. This time in xcode. iPod touch 5.

There are logs with an request to Unity Analytics.
I have added debug logs in the \Classes\Unity\WWWConnection.mm

Have you submitted a bug report?

No, not submitted.
The error is very difficult to reproduce. I think the team Unity is easier to check the function of “WWW::FeedUnityWebStream(bool) (WWW.h:96)” for errors.

Hi @Nolex ,
I believe we have narrowed down the issue and have come up with a resolution. Please apply the attached patch to the WWWConnection.mm file in your Xcode project. If you still run into this afterwards feel free to message me directly or post here and mention me.
Cheers,
Chris

2856881–208906–WWWConnection.mm.diff.zip (1.17 KB)

1 Like

If you prefer, you can just unzip this and drop the file attached here.

2856883–208908–WWWConnection.mm.zip (4.39 KB)

1 Like

Hi @christophergoy , that’s great to hear you’ve found a solution. In what version (release or patch) of Unity will this fix be included?

Thanks Chris, we encounter the same issue here. I have applied your patch.

Hi @christophergoy ,
Thank you very much for the answer! I’ll try the patch and will write later about the results!

Hi @hsallander ,
It looks like it will go into 5.3.7 p3 and 5.4.3 p2.
5.3.7 p3 will be released on Dec 7th
5.4.3 p2 will be released on Nov 30th
Cheers,
Chris

Hi @christophergoy ,
I tested the new patch. The problem is not resolved. :frowning:

The game has been running for ~12 hours on 4 my devices.
During this time the game twice crashed on the iPhone 4 (iOS 7.1.2).

Crash #1:

Incident Identifier: 2E7E2956-B230-4A82-80B1-5472CCDEA59E
CrashReporter Key:   c22ba828f7932bdf2815acc5381180abf640076a
Hardware Model:      iPhone3,3
Process:             mygame222222 [156]
Path:                /var/mobile/Applications/0D3A5C02-55B8-473E-A446-397E0CE87964/mygame222222.app/mygame222222
Identifier:          com.publisher.game.mygame222222
Version:             1.0 (1.0)
Code Type:           ARM (Native)
Parent Process:      launchd [1]

Date/Time:           2016-11-21 16:54:56.172 +0200
OS Version:          iOS 7.1.2 (11D257)
Report Version:      104

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0xff000000
Triggered by Thread:  33
.......
.......
.......
.......
Thread 33 Crashed:
0   ???                               0xff000000 0 + -16777216
1   mygame222222                      0x0084518e iPhoneWWWDownloadBuffer::OnCompleteContent() (iPhoneWWW.mm:64)
2   mygame222222                      0x0080f716 UnityReportWWWFinishedLoadingData (TransportiPhone.cpp:260)
3   mygame222222                      0x0004543c -[UnityWWWConnectionDelegate connection:didFailWithError:] (WWWConnection.mm:251)
4   Foundation                        0x2ddf1fc2 __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke + 54
5   Foundation                        0x2ddf1f06 -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 206
6   Foundation                        0x2ddf2c50 -[NSURLConnectionInternal _withConnectionAndDelegate:] + 60
7   Foundation                        0x2de7e0b8 _NSURLConnectionDidFail + 84
8   CFNetwork                         0x2d118302 ___ZN27URLConnectionClient_Classic17_delegate_didFailEP9__CFErrorU13block_pointerFvvE_block_invoke + 86
9   CFNetwork                         0x2d116cf6 ___ZN27URLConnectionClient_Classic18_withDelegateAsyncEPKcU13block_pointerFvP16_CFURLConnectionPK33CFURLConnectionClientCurrent_VMaxE_block_invoke_2 + 54
10  CoreFoundation                    0x2d3e58f0 CFArrayApplyFunction + 36
11  CFNetwork                         0x2d0ae6ba RunloopBlockContext::perform() + 182
12  CFNetwork                         0x2d0ae578 MultiplexerSource::perform() + 220
13  CFNetwork                         0x2d0ae40c MultiplexerSource::_perform(void*) + 48
14  CoreFoundation                    0x2d47d20a __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
15  CoreFoundation                    0x2d47c6da __CFRunLoopDoSources0 + 206
16  CoreFoundation                    0x2d47aece __CFRunLoopRun + 622
17  CoreFoundation                    0x2d3e5ebe CFRunLoopRunSpecific + 522
18  CoreFoundation                    0x2d3e5ca2 CFRunLoopRunInMode + 106
19  Foundation                        0x2ddd91ea -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 254
20  Foundation                        0x2de2a0a0 -[NSRunLoop(NSRunLoop) run] + 80
21  mygame222222                      0x00046672 __UnitySendWWWConnection_block_invoke_2 (WWWConnection.mm:383)
22  Foundation                        0x2ddf63c6 -[NSBlockOperation main] + 130
23  Foundation                        0x2dde65aa -[__NSOperationInternal _start:] + 770
24  Foundation                        0x2de8a76c __NSOQSchedule_f + 60
25  libdispatch.dylib                 0x3814c9aa _dispatch_async_redirect_invoke$VARIANT$up + 110
26  libdispatch.dylib                 0x3815d920 _dispatch_root_queue_drain + 224
27  libdispatch.dylib                 0x3815db20 _dispatch_worker_thread2 + 56
28  libsystem_pthread.dylib           0x3828cbd2 _pthread_wqthread + 298
29  libsystem_pthread.dylib           0x3828ca98 start_wqthread + 8

Crash #2:

Incident Identifier: 864DCEE7-7818-42CB-B3DE-FA69334FBD8A
CrashReporter Key:   c22ba828f7932bdf2815acc5381180abf640076a
Hardware Model:      iPhone3,3
Process:             mygame222222 [215]
Path:                /var/mobile/Applications/9DC7201E-2EF7-4589-895A-BECBFAAB68D0/mygame222222.app/mygame222222
Identifier:          com.publisher.game.mygame222222
Version:             1.0 (1.0)
Code Type:           ARM (Native)
Parent Process:      launchd [1]

Date/Time:           2016-11-22 04:49:15.179 +0200
OS Version:          iOS 7.1.2 (11D257)
Report Version:      104

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Subtype: KERN_PROTECTION_FAILURE at 0x39f3b064
Triggered by Thread:  34
..........
..........
..........
Thread 34 Crashed:
0   ???                               0x39f3b064 0 + 972271716
1   mygame222222                      0x0086d18c iPhoneWWWDownloadBuffer::OnCompleteContent() (iPhoneWWW.mm:63)
2   mygame222222                      0x00837714 UnityReportWWWFinishedLoadingData (TransportiPhone.cpp:260)
3   mygame222222                      0x0006d438 -[UnityWWWConnectionDelegate connection:didFailWithError:] (WWWConnection.mm:250)
4   Foundation                        0x2ddf1fc0 __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke + 52
5   Foundation                        0x2ddf1f02 -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 202
6   Foundation                        0x2ddf2c4c -[NSURLConnectionInternal _withConnectionAndDelegate:] + 56
7   Foundation                        0x2de7e0b4 _NSURLConnectionDidFail + 80
8   CFNetwork                         0x2d118300 ___ZN27URLConnectionClient_Classic17_delegate_didFailEP9__CFErrorU13block_pointerFvvE_block_invoke + 84
9   CFNetwork                         0x2d116cf4 ___ZN27URLConnectionClient_Classic18_withDelegateAsyncEPKcU13block_pointerFvP16_CFURLConnectionPK33CFURLConnectionClientCurrent_VMaxE_block_invoke_2 + 52
10  CoreFoundation                    0x2d3e58ee CFArrayApplyFunction + 34
11  CFNetwork                         0x2d0ae6b6 RunloopBlockContext::perform() + 178
12  CFNetwork                         0x2d0ae576 MultiplexerSource::perform() + 218
13  CFNetwork                         0x2d0ae408 MultiplexerSource::_perform(void*) + 44
14  CoreFoundation                    0x2d47d208 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
15  CoreFoundation                    0x2d47c6d6 __CFRunLoopDoSources0 + 202
16  CoreFoundation                    0x2d47aeca __CFRunLoopRun + 618
17  CoreFoundation                    0x2d3e5eba CFRunLoopRunSpecific + 518
18  CoreFoundation                    0x2d3e5c9e CFRunLoopRunInMode + 102
19  Foundation                        0x2ddd91e6 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
20  Foundation                        0x2de2a09c -[NSRunLoop(NSRunLoop) run] + 76
21  mygame222222                      0x0006e66e __UnitySendWWWConnection_block_invoke_2 (WWWConnection.mm:383)
22  Foundation                        0x2ddf63c4 -[NSBlockOperation main] + 128
23  Foundation                        0x2dde65a6 -[__NSOperationInternal _start:] + 766
24  Foundation                        0x2de8a768 __NSOQSchedule_f + 56
25  libdispatch.dylib                 0x3814c9a6 _dispatch_async_redirect_invoke$VARIANT$up + 106
26  libdispatch.dylib                 0x3815d91c _dispatch_root_queue_drain + 220
27  libdispatch.dylib                 0x3815db1c _dispatch_worker_thread2 + 52
28  libsystem_pthread.dylib           0x3828cbd0 _pthread_wqthread + 296
29  libsystem_pthread.dylib           0x3828ca94 start_wqthread + 4

All symbolicated crashlogs are in the attachments!

Best,
Nolex.

2859789–209221–Symbolicated_iphone4_new_www.crash.txt (60.1 KB)
2859789–209222–Symbolicated_iphone4_new_www2.crash.txt (60.1 KB)

A new crash on iPod touch 5 (iOS 9.3.5):

Incident Identifier: 560BEEFE-2E2C-4694-B2E1-2CB84FDE0B15
CrashReporter Key:   2f1e427691dc3aecfc2d4233443a4e4428777d44
Hardware Model:      iPod5,1
Process:             mygame222222 [881]
Path:                /private/var/containers/Bundle/Application/7B3B680A-5B94-47C6-AA8F-374B03707AFE/mygame222222.app/mygame222222
Identifier:          com.publisher.game.mygame222222
Version:             1.0 (1.0)
Code Type:           ARM (Native)
Parent Process:      launchd [1]

Date/Time:           2016-11-22 10:04:06.06 +0200
Launch Time:         2016-11-22 10:03:26.26 +0200
OS Version:          iOS 9.3.5 (13G36)
Report Version:      104

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x20000018
Triggered by Thread:  2
..........
..........
..........
Thread 2 name:  Dispatch queue: com.unity3d.WebOperationQueue :: NSOperation 0x1b9541d0 (QOS: LEGACY)
Thread 2 Crashed:
0   mygame222222                      0x005c7362 WWW::FeedUnityWebStream(bool) (WWW.h:96)
1   mygame222222                      0x0088818e iPhoneWWWDownloadBuffer::OnCompleteContent() (iPhoneWWW.mm:64)
2   mygame222222                      0x00852716 UnityReportWWWFinishedLoadingData (TransportiPhone.cpp:260)
3   mygame222222                      0x0008843c -[UnityWWWConnectionDelegate connection:didFailWithError:] (WWWConnection.mm:251)
4   CFNetwork                         0x244a3324 __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke + 56
5   CFNetwork                         0x244a32dc -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 184
6   CFNetwork                         0x244a3400 -[NSURLConnectionInternal _withConnectionAndDelegate:] + 36
7   CFNetwork                         0x2447f030 _NSURLConnectionDidFail(_CFURLConnection*, __CFError*, void const*) + 84
8   CFNetwork                         0x2441e02a ___ZN27URLConnectionClient_Classic17_delegate_didFailEP9__CFErrorU13block_pointerFvvE_block_invoke + 86
9   CFNetwork                         0x2441c8b6 ___ZN27URLConnectionClient_Classic18_withDelegateAsyncEPKcU13block_pointerFvP16_CFURLConnectionPK33CFURLConnectionClientCurrent_VMaxE_block_invoke_2 + 70
10  libdispatch.dylib                 0x239cd80e _dispatch_client_callout + 22
11  libdispatch.dylib                 0x239d6dbe _dispatch_block_invoke$VARIANT$mp + 446
12  CFNetwork                         0x2434eb06 RunloopBlockContext::_invoke_block(void const*, void*) + 18
13  CoreFoundation                    0x23d6ec60 CFArrayApplyFunction + 36
14  CFNetwork                         0x2434e9ee RunloopBlockContext::perform() + 182
15  CFNetwork                         0x2434e8b8 MultiplexerSource::perform() + 216
16  CFNetwork                         0x2434e750 MultiplexerSource::_perform(void*) + 48
17  CoreFoundation                    0x23e21dfe __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
18  CoreFoundation                    0x23e219ec __CFRunLoopDoSources0 + 452
19  CoreFoundation                    0x23e1fd5a __CFRunLoopRun + 794
20  CoreFoundation                    0x23d6f228 CFRunLoopRunSpecific + 520
21  CoreFoundation                    0x23d6f014 CFRunLoopRunInMode + 108
22  Foundation                        0x245b8044 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 268
23  Foundation                        0x24606a4c -[NSRunLoop(NSRunLoop) run] + 80
24  mygame222222                      0x00089672 __UnitySendWWWConnection_block_invoke_2 (WWWConnection.mm:383)
25  Foundation                        0x24671678 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 8
26  Foundation                        0x245d25f2 -[NSBlockOperation main] + 146
27  Foundation                        0x245c4bc8 -[__NSOperationInternal _start:] + 768
28  Foundation                        0x24673930 __NSOQSchedule_f + 192
29  libdispatch.dylib                 0x239da422 _dispatch_queue_drain$VARIANT$mp + 1758
30  libdispatch.dylib                 0x239d9a60 _dispatch_queue_invoke$VARIANT$mp + 284
31  libdispatch.dylib                 0x239dc15c _dispatch_root_queue_drain + 396
32  libdispatch.dylib                 0x239dbfcc _dispatch_worker_thread3 + 96
33  libsystem_pthread.dylib           0x23b91b28 _pthread_wqthread + 1024
34  libsystem_pthread.dylib           0x23b91718 start_wqthread + 8

2859863–209227–Symbolicated_ipod5_new_www.crash.txt (83.1 KB)

Hi @Nolex ,
I will keep investigating. Thank you for your crash reports.
Cheers,
Chris

2 Likes

We are exactly facing the same issue, more than 5K+ crash reports so for after upgrading Unity from 5.3 to 5.4.

Crashed: com.unity3d.WebOperationQueue :: NSOperation 0x17424e4c0 (QOS: DEFAULT)
0  gamename                       0x101be8110 plcrash::async::dwarf_cfa_state_iterator<unsigned long long, long long>::next(unsigned int*, plcrash::async::plcrash_dwarf_cfa_reg_rule_t*, unsigned long long*) + 9260488
1  gamename                       0x100ccddf4 WWW::FeedUnityWebStream(bool) (WWW.h:96)
2  gamename                       0x100f9fbd4 iPhoneWWWDownloadBuffer::OnCompleteContent() (iPhoneWWW.mm:64)
3  gamename                       0x100f6c940 UnityReportWWWFinishedLoadingData (TransportiPhone.cpp:260)
4  gamename                       0x10003aee8 -[UnityWWWConnectionDelegate connection:didFailWithError:] (WWWConnection.mm:239)
5  CFNetwork                      0x18a986788 __65-[NSURLConnectionInternal _withConnectionAndDelegate:hushed:nlyActive:]_block_invoke + 80
6  CFNetwork                      0x18a986718 -[NSURLConnectionInternal _withConnectionAndDelegate:hushed:nlyActive:] + 200
7  CFNetwork                      0x18a9868d8 -[NSURLConnectionInternal _withConnectionAndDelegate:] + 56
8  CFNetwork                      0x18a9455d0 _NSURLConnectionDidFail(_CFURLConnection*, __CFError*, void const*) + 76
9  CFNetwork                      0x18a8aed84 ___ZN27URLConnectionClient_Classic17_delegate_didFailEP9__CFErrorU13block_pointerFvvE_block_invoke + 112
10 CFNetwork                      0x18a8ac960 ___ZN27URLConnectionClient_Classic18_withDelegateAsyncEPKcU13block_pointerFvP16_CFURLConnectionPK33CFURLConnectionClientCurrent_VMaxE_block_invoke_2 + 108
11 libdispatch.dylib              0x188fd11c0 _dispatch_client_callout + 16
12 libdispatch.dylib              0x188fdcb24 _dispatch_block_invoke_direct + 376
13 CFNetwork                      0x18a963eb4 RunloopBlockContext::_invoke_block(void const*, void*) + 36
14 CoreFoundation                 0x18a01f9a8 CFArrayApplyFunction + 68
15 CFNetwork                      0x18a963d98 RunloopBlockContext::perform() + 136
16 CFNetwork                      0x18a9650c0 MultiplexerSource::perform() + 312
17 CFNetwork                      0x18a964e2c MultiplexerSource::_perform(void*) + 64
18 CoreFoundation                 0x18a0f4278 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
19 CoreFoundation                 0x18a0f3bc0 __CFRunLoopDoSources0 + 524
20 CoreFoundation                 0x18a0f17c0 __CFRunLoopRun + 804
21 CoreFoundation                 0x18a020048 CFRunLoopRunSpecific + 444
22 Foundation                     0x18ab31a8c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
23 Foundation                     0x18ab86210 -[NSRunLoop(NSRunLoop) run] + 88
24 gamename                       0x10003be54 __UnitySendWWWConnection_block_invoke_2 (WWWConnection.mm:362)
25 Foundation                     0x18ac0a754 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 16
26 Foundation                     0x18ab4f2c8 -[NSBlockOperation main] + 96
27 Foundation                     0x18ab3f8c4 -[__NSOperationInternal _start:] + 620
28 Foundation                     0x18ac0cb00 __NSOQSchedule_f + 228
29 libdispatch.dylib              0x188fd11c0 _dispatch_client_callout + 16
30 libdispatch.dylib              0x188fdf444 _dispatch_queue_serial_drain + 928
31 libdispatch.dylib              0x188fd49a8 _dispatch_queue_invoke + 652
32 libdispatch.dylib              0x188fe138c _dispatch_root_queue_drain + 572
33 libdispatch.dylib              0x188fe10ec _dispatch_worker_thread3 + 124
34 libsystem_pthread.dylib        0x1891da2b8 _pthread_wqthread + 1288
35 libsystem_pthread.dylib        0x1891d9da4 start_wqthread + 4
1 Like

Hi @InspiredSquare and @Nolex ,
There was a potential race condition between a native class in Unity having it’s destructor called on it and the callback for the NSURLConnection delegate getting invoked. This has been resolved on the native side and will be coming out in a patch release. Unfortunately that means there is no workaround I can post for you here. My apologies. Once I know which patch release this fix will go into I will post it here for you.
Cheers,
Chris

2 Likes

Hi again @christophergoy , I just noticed there’s a new patch release (5.4.3p2) out now, and according to the release notes it fixes “several crashes with regards to WWW and WebRequest.”, and points to this issue in the issue tracker. Is that the fix for the issues discussed in this forum thread as well?

Hi @hsallander ,
Yes, unfortunately it seems that the issue is still happening. I haver been testing another fix and believe it will resolve this issue (finally). I apologize for the inconvenience. I will update this thread once I know which patch release the fix is going into.
Cheers,
Chris

1 Like

Would it be an alternative to just not send events to unity analytics? I’d rather not have people crash than unity analytics.

Hi @Skjalg ,
The issue is not specific to Unity Analytics, so disabling it will not solve the issue. I don’t know if it will make it less frequent or not. I have my PRs ready to go and it should get into the patch next patch release.
Cheers,
Chris

1 Like

We’re working on an update for our app right now, hoping to upload that later today or tomorrow morning. When will 5.4.3p3 be out, because if it is out tomorrow or wednesday we might delay it for that reason alone.