Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by bartozwe · Mar 05, 2018 at 03:40 PM · unity 5crashwebrequestapplication.quit

UnityWebRequest seems to crash application when active on Application.Quit()?

Our application on startup creates a number of UnityWebRequests to download some data. If we quit the application right after we've launched it, and the requests are still active, we seem to experience a crash. Looking at the crash dump and with Unity's symbols loaded, it seems to point at some issue related to the UnityWebRequestManager.

The exception states: "The thread tried to read from or write to a virtual address for which it does not have the appropriate access".

To try and fix the issue we've explicitly been trying to Abort all active UnityWebRequests on application quit, but this has not resolved the problem.

We're currently on Unity 5.6.5p1.

The assembly shown via crash dumps is the following:

 00007FF6115694E0  lea         rcx,[UnityWebRequestManager::m_ActiveDownloadScriptHandlerLock (07FF61190C500h)]  
 00007FF6115694E7  jmp         Mutex::~Mutex (07FF610B909B0h)  
 00007FF6115694EC  int         3  
 00007FF6115694ED  int         3  
 00007FF6115694EE  int         3  
 00007FF6115694EF  int         3  
 00007FF6115694F0  sub         rsp,28h  
 00007FF6115694F4  mov         rax,qword ptr [UnityWebRequestManager::m_Requests (07FF61190C4A8h)]  
 00007FF6115694FB  mov         rdx,qword ptr [rax]  
 00007FF6115694FE  mov         qword ptr [rax],rax  
 00007FF611569501  mov         rax,qword ptr [UnityWebRequestManager::m_Requests (07FF61190C4A8h)]  
 00007FF611569508  mov         qword ptr [rax+8],rax  
 00007FF61156950C  mov         rcx,qword ptr [UnityWebRequestManager::m_Requests (07FF61190C4A8h)]  
 00007FF611569513  mov         qword ptr [UnityWebRequestManager::m_Requests+8h (07FF61190C4B0h)],0  
 00007FF61156951E  cmp         rdx,rcx  
 00007FF611569521  je          `memory_pool_impl<56>::get_pool'::`2'::`dynamic atexit destructor for 'pool''+45Fh (07FF61156954Fh)  
 00007FF611569523  mov         qword ptr [rsp+20h],rbx  
 00007FF611569528  nop         dword ptr [rax+rax]  
 00007FF611569530  mov         rbx,qword ptr [rdx]  <-------- LOCATION OF THE CRASH
 00007FF611569533  mov         rcx,rdx  
 00007FF611569536  call        operator delete[] (07FF610CCD7F0h)  
 00007FF61156953B  mov         rcx,qword ptr [UnityWebRequestManager::m_Requests (07FF61190C4A8h)]  
 00007FF611569542  mov         rdx,rbx  
 00007FF611569545  cmp         rbx,rcx  
 00007FF611569548  jne         `memory_pool_impl<56>::get_pool'::`2'::`dynamic atexit destructor for 'pool''+440h (07FF611569530h)  
 00007FF61156954A  mov         rbx,qword ptr [rsp+20h]  
 00007FF61156954F  add         rsp,28h  
 00007FF611569553  jmp         operator delete[] (07FF610CCD7F0h)  
 00007FF611569558  int         3  
 00007FF611569559  int         3  
 00007FF61156955A  int         3  
 00007FF61156955B  int         3  
 00007FF61156955C  int         3  
 00007FF61156955D  int         3  
 00007FF61156955E  int         3  
 00007FF61156955F  int         3  
 00007FF611569560  sub         rsp,28h  

Any ideas what may cause this issue? Are UnityWebRequests supposed to gracefully handle application quits, or is there something we should do? Or am I misinterpreting the assembly shown?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by jcaron · Jul 05, 2018 at 09:29 AM

I'm having a similar problem on Android, even is the WebRequest is completed. I also tried Disposing the WebRequest before quitting, same result. It seems to be related to the cache system.

 public class TestWebRequest : MonoBehaviour {
 
     UnityWebRequest request;
     void Start () {
         request = UnityWebRequest.GetAssetBundle("https://storage.googleapis.com/<validurlhere>", 0);
         request.Send();
     }
     
     void Update () {
         if (request.isDone)
             Application.Quit();
     }
 }
 

here is the stack trace on Android:

 07-05 10:43:57.489 14011 14111 F libc    : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x28 in tid 14111 (ReadCacheIndex)
 07-05 10:43:57.578 14130 14130 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
 07-05 10:43:57.578 14130 14130 F DEBUG   : Build fingerprint: 'samsung/j5xnltexx/j5xnlte:7.1.1/NMF26X/J510FNXXS2BRA3:user/release-keys'
 07-05 10:43:57.578 14130 14130 F DEBUG   : Revision: '4'
 07-05 10:43:57.578 14130 14130 F DEBUG   : ABI: 'arm'
 07-05 10:43:57.579 14130 14130 F DEBUG   : pid: 14011, tid: 14111, name: ReadCacheIndex  >>> com.magnificgames.magnific <<<
 07-05 10:43:57.579 14130 14130 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x28
 07-05 10:43:57.579 14130 14130 F DEBUG   :     r0 8b68d3c4  r1 00000000  r2 8fcd6050  r3 00000000
 07-05 10:43:57.579 14130 14130 F DEBUG   :     r4 00000000  r5 8b68d830  r6 ffffe244  r7 00000028
 07-05 10:43:57.579 14130 14130 F DEBUG   :     r8 ffffe244  r9 8b68d88c  sl 8cb47b70  fp 00000014
 07-05 10:43:57.579 14130 14130 F DEBUG   :     ip 94b1bf84  sp 8b68d3a8  lr 93b289c0  pc 93b8ad74  cpsr a00f0010
 07-05 10:43:57.606 14130 14130 F DEBUG   : 
 07-05 10:43:57.606 14130 14130 F DEBUG   : backtrace:
 07-05 10:43:57.607 14130 14130 F DEBUG   :     #00 pc 00739d74  /data/app/com.magnificgames.magnific-2/lib/arm/libunity.so (_ZNK10FileSystem10ToAbsoluteEPKc+12)
 07-05 10:43:57.607 14130 14130 F DEBUG   :     #01 pc 006d79bc  /data/app/com.magnificgames.magnific-2/lib/arm/libunity.so (_Z18IsDirectoryCreatedRKN4core12basic_stringIcNS_20StringStorageDefaultIcEEEE+64)
 07-05 10:43:57.607 14130 14130 F DEBUG   :     #02 pc 0056b9b4  /data/app/com.magnificgames.magnific-2/lib/arm/libunity.so (_ZN5Cache22ReadCacheIndexThreadedEPv+380)
 07-05 10:43:57.607 14130 14130 F DEBUG   :     #03 pc 00688c7c  /data/app/com.magnificgames.magnific-2/lib/arm/libunity.so (_ZN6Thread16RunThreadWrapperEPv+84)
 07-05 10:43:57.607 14130 14130 F DEBUG   :     #04 pc 00047b93  /system/lib/libc.so (_ZL15__pthread_startPv+22)
 07-05 10:43:57.607 14130 14130 F DEBUG   :     #05 pc 00019fb1  /system/lib/libc.so (__start_thread+6)
Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image jcaron · Jul 05, 2018 at 09:29 AM 0
Share

using WWW.LoadFromCacheOrDownload also end up with the same Fatal Error on quitting the app.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

154 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

what does unity mean by "Issue TrimJob to reduce GI Cache size to maximum 10GB" in Editor.txt file 1 Answer

Unity 5.1.0f3 crashing at splash screen 2 Answers

Unity 5 crash on startup 1 Answer

Unity 5 64bit startup crash (win 10) 5 Answers

Couldn't find Crashlytics GameObject 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges