Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

[5.3.1p1] WWW.isDone hangs in iOS

Discussion in 'iOS and tvOS' started by AlienMe, Jan 1, 2016.

  1. subbu5280

    subbu5280

    Joined:
    Oct 1, 2015
    Posts:
    5
    No luck on Unity 3D 5.3.2 p2 @christophergoy , i have to replace WWWConnection.mm.Then its work. I can expect this issue will fix on Unity3D 5.3.2 p3. is it right?
     
  2. christophergoy

    christophergoy

    Unity Technologies

    Joined:
    Sep 16, 2015
    Posts:
    735
    Hi @amsmntparks, My changes are still slowly making their way into a release. I apologize for that. The issue is still in the latest release.
    Thanks,
    Chris
     
  3. Grinchi

    Grinchi

    Joined:
    Apr 19, 2014
    Posts:
    121
    @christophergoy i am using unity 5.3.2p2 and when calling www it is not gives me response but when i changed your mm class it worked. can you confirm that this is same bug ?
     
  4. christophergoy

    christophergoy

    Unity Technologies

    Joined:
    Sep 16, 2015
    Posts:
    735
    Hello @StormBringerStudios,
    Yes, this is the same bug. Thank you, and everyone else, for your patience. The fixes are coming soon.
    Chris
     
  5. GuyTidhar

    GuyTidhar

    Joined:
    Jun 24, 2009
    Posts:
    320
    Does this error: "NETWORK_EVENT_DATA_STALL_AT_APP_LAYER" in xcode iOS device log has to do with this issue?

    I get quite a lot of freezes that seem to revolve around WWW, but it's hard to tell where excatly.
     
  6. GuyTidhar

    GuyTidhar

    Joined:
    Jun 24, 2009
    Posts:
    320
    The WWWConnection.mm does not fix my freeze case. So it's not related.

    Just another fantastic show stopper related to anything unity 5.3...

    Wow. Just wow. I've failed case 768390.
     
  7. christophergoy

    christophergoy

    Unity Technologies

    Joined:
    Sep 16, 2015
    Posts:
    735
    Hi @GuyTidhar,
    There are fixes on their way to a patch release. I will verify that the fixes going in also cover your case. Thank you for filing a bug.
    Cheers,
    Chris
     
  8. GuyTidhar

    GuyTidhar

    Joined:
    Jun 24, 2009
    Posts:
    320
    Hi @christophergoy
    Glad to hear that - thanks.

    Forgive me for getting cynical there, but I'm a long time Unity developer, and honestly Unity 5 and specifically now 5.3+ is the worst release Unity came up with. This affects the jobs and projects of huge number of people around the world and the jiggling needed to handle the Unity tech issues are causing people to waist weeks of works on the tool instead of on the content which is the exact opposite of what Unity should be about. It's getting to a point where I'm not sure Unity should be used as a cross-platform game development tool because it can't handle the technical changes fast enough.

    I'm not claiming this is any easy task for you! but is Unity sure this wonderful cross-platform tool can really keep being what it was?
     
  9. christophergoy

    christophergoy

    Unity Technologies

    Joined:
    Sep 16, 2015
    Posts:
    735
    Hey @GuyTidhar,
    I understand your frustration. We are working as best we can to come up with a way to stabilize Unity for future releases. This has been a large issue for users with the most recent releases. I apologize personally, and on behalf of Unity. Please know that we are truly working to solve this issue. While words do not help your project, hopefully we can show you with action, that these words hold weight.
    Thanks,
    Chris
     
    pahe likes this.
  10. GuyTidhar

    GuyTidhar

    Joined:
    Jun 24, 2009
    Posts:
    320
    @christophergoy I'm sure you are! thanks again.

    By the way - once you do solve the issue I have stumbled upon, if it will be just a code replacement such as the file you've posted before, could you post it prior to the patch/release? The reasoning is testing earlier and knowing whether I can wait for an upcoming patch or do I have to rollback to 5.2.3 (this might be something unity should consider to enable on general bases).
     
  11. christophergoy

    christophergoy

    Unity Technologies

    Joined:
    Sep 16, 2015
    Posts:
    735
    @GuyTidhar,
    I will certainly let you know if there is a workaround that is possible before the patch release.
     
  12. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    Hey, we just faced this issue (FB images fail to download) after we upgraded to 5.3.2... The WWWConnection.mm file attached here seems to work for us. Awaiting an official fix.

    Can anyone comment how can such a major issue make its way into an officially released version? it's VERY HARD for us to trust any new versions of the engine and makes upgrading very very difficult.
     
    pahe likes this.
  13. GuyTidhar

    GuyTidhar

    Joined:
    Jun 24, 2009
    Posts:
    320
    I second that - I think we all would want to know some strategic project management update is in the works in order to avoid such issues for future releases. It's been ~two month into 5.3+ and too many people can not upgrade yet, or even worse need the upgrade and are running after their tail hoping the update is working only to find out its not - and rolling back (it's a cross-platform - in our case we need to test 3 platforms x different devices/browsers x different os versions!!!!).

    By the way - project management-wise while it is never a good idea to try an update on its early days, if you don't try that once in a while, an issue you might have might never be known to you guys in Unity. After the last couple of month with Unity 5.3+ I am positive many people are saying - "I'm not upgrading until 'everyone' says the upgrade is working", so less and less people will update Unity about bugs, making the future upgrades even worse!

    Only by a strategic change, can Unity change this for the better.
     
  14. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    I think that it's ABSOLUTELY MANDATORY to test versions as early as possible ! so at least you have a basic concept of whether things are working or not.
    Also, the major problem (for me) is that you have no idea when upgrading, what things are currently broken. This means that it's a trial and error effort.
     
  15. christophergoy

    christophergoy

    Unity Technologies

    Joined:
    Sep 16, 2015
    Posts:
    735
    Hello @GuyTidhar @liortal,
    The stability issues with the last few releases of Unity are definitely priority number 1 right now. There are many internal discussions and a strategic plan in the works that is centered around this. The the regressions in 5.2 and 5.3 have been unacceptable. You both have valid points that have been mentioned in our discussions and are being addressed. Developers shouldn't have to worry about 'what things are currently broken.' And that is why we are tirelessly working for better stability. I know these are only words from one developer at Unity, but please know that this is in the front of everyone's mind and it is our mission to make this right.
    Cheers,
    Chris
     
  16. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    @christophergoy BTW - for such an issue i think it should be fairly simple to write a set of tests that will verify this scenario.

    You could set up a local HTTP server (.NET already has all the classes in place for that) that will be configured to return fake responses (e.g: redirect, 404, 200, 500, etc). Each test will configure this server class with the expected result and will run a WWW coroutine against it to see if it completes, responds with the expected output, etc..

    This shouldn't be that hard, and from what i've been reading it looks like you have a test framework that executes on devices, so you could run that on iOS devices to gather the results. I think this is a must, if not already done.
     
  17. christophergoy

    christophergoy

    Unity Technologies

    Joined:
    Sep 16, 2015
    Posts:
    735
    Hi all,
    Fixes have been confirmed to hit patch release 5.3.2p4.
    @liortal, tests were in place, but apparently not enough :(. I have written more to cover the cases brought up here and for general code coverage.
    Cheers,
    Chris
     
    GuyTidhar likes this.
  18. GuyTidhar

    GuyTidhar

    Joined:
    Jun 24, 2009
    Posts:
    320
    @christophergoy so is 5.3.2p4 coming?
     
  19. christophergoy

    christophergoy

    Unity Technologies

    Joined:
    Sep 16, 2015
    Posts:
    735
    Hey @GuyTidhar,
    As far as I know it is being released today. I will keep you updated if I hear anything to the contrary.
    Thanks,
    Chris
     
  20. GuyTidhar

    GuyTidhar

    Joined:
    Jun 24, 2009
    Posts:
    320
    @christophergoy half a day after last day but there doesn't seem to be an update...:(
     
  21. christophergoy

    christophergoy

    Unity Technologies

    Joined:
    Sep 16, 2015
    Posts:
    735
    Hey @GuyTidhar,
    I just saw that two regressions were found and the patch release has been delayed. It looks like the new target is for Friday the 19th. Sorry to keep you waiting.
    Cheers,
    Chris
     
  22. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    Lucky for us it's not Friday the 13th :)
     
    christophergoy likes this.
  23. christophergoy

    christophergoy

    Unity Technologies

    Joined:
    Sep 16, 2015
    Posts:
    735
    Hey all,
    Unity 5.3.2p4 has been posted up on the patch release site. Please let me know if you run into this issue.
    Thanks,
    Chris
     
    GuyTidhar likes this.
  24. GuyTidhar

    GuyTidhar

    Joined:
    Jun 24, 2009
    Posts:
    320
    @christophergoy thanks for the update mate.

    Our initial tests look good (iOS, Android and WebGL). Hope we won't bump into more surprises.
    Do note there still seem to be issues with the sprite packing. Many times I need to clear the sprite atlases folder after switching platforms to fix an issue that makes the builds include extra size and make some textures or shaders corrupt in the build (I get black areas and bad fonts at certain areas).
     
    Last edited: Feb 20, 2016
    christophergoy likes this.
  25. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    wow, I feel like an idiot.. I just spent 6 hours trying to debug this problem on iOS using 5.3.2p2.. thinking the entire time it was something I was doing wrong, but nope... found this and presto works like a charm.

    There has got to be a better way to deal with these kinds of issues for us.. how am I to know that if I'm using 5.x.x version of Unity on iOS X.X with xCode X.X, that a little thing like this will cost me hours of head banging frustration and code rework.

    argh!.. @$^@%&WSDFG
     
  26. christophergoy

    christophergoy

    Unity Technologies

    Joined:
    Sep 16, 2015
    Posts:
    735
    Hey @tswalk,
    Sorry about your wasted time :(. The forum is a good place to see if other people are having similar issues, and I see you are not new to it. I cannot recommend a full proof way to know, but I think if you are spending more than an hour on an issue that might be because of unity, you could check the forum just in case. Please let me know if you run into any other issues with this.
    Cheers,
    Chris
     
  27. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    haha, I know man... someone please smack me. But I almost "always" think.. "this is my fault, what did I do wrong" :D
     
  28. Sparrowfc

    Sparrowfc

    Joined:
    Jan 31, 2013
    Posts:
    100
    @christophergoy meet the same problem in 5.3.7 / 5.3.4 / 5.3.6, can't believe this thread is created over a year!
    I'm gona try your script, hope it works.

    @christophergoy I see the WWWConnection.mm of 5.3.7p4 has already merge most of your fixed script in compare with the one of 5.3.0. But the bug still existed. I can't repo that in a steady way, but it will certainly happen sooner or later, and when that happened, the log shows all the WWW.isdone remains false forever. And I've been remove all the WWW.Dispose long time ago. Any thoughts on that?
     
    Last edited: Apr 28, 2017
  29. christophergoy

    christophergoy

    Unity Technologies

    Joined:
    Sep 16, 2015
    Posts:
    735
    Hey there is a fix being back ported. It essentially removes the manual run loop and sets the delegate queue on the NSURLConnection. I can post the patch here later today. Sorry for the troubles.
    Cheers,
    Chris
     
  30. Sparrowfc

    Sparrowfc

    Joined:
    Jan 31, 2013
    Posts:
    100
    Thank god, I'm counting on you! We've test our game online for several month on Android, and finally ready to publish for both Android and iOS these days, now we've been stalled by this issue for nearly a week. It's there a new script of WWWConection.mm that can fixed this issue, we may won't be able to wait for next patch release. Really appreciated!
     
    Last edited: Apr 29, 2017
  31. christophergoy

    christophergoy

    Unity Technologies

    Joined:
    Sep 16, 2015
    Posts:
    735
    Hey @Sparrowfc,
    Here is the diff file for WWWConnection.mm that I mentioned earlier. This code has a bad run loop implementation, which could cause WWWConnection threads to get stuck for several reasons. Please use the latest version of the WWWConnection.mm file that came with whatever patch release you have. All fixes from forum posts that were valuable have actually made it into patch releases. After you are sure you have the latest version of WWWConnection.mm, apply this patch to it. Let me know how it goes.
    Cheers,
    Chris
     

    Attached Files:

  32. Sparrowfc

    Sparrowfc

    Joined:
    Jan 31, 2013
    Posts:
    100
    o m
    so much thanks to u chris! currently we roll back to 5.3.2p4 which certainly fixed that issue. gona try merge your script tomorrow, after all, later is better :)

    UPDATE: @christophergoy I've merged the file into 5.3.7p4 and everything goes well for now. I guess it's solved!:D
     
    Last edited: May 2, 2017
    christophergoy likes this.
  33. fourdesire

    fourdesire

    Joined:
    Sep 26, 2014
    Posts:
    17
    Hi @christophergoy, I still have this issue while loading resource from streamingassets by WWW on many version of Unity ex: 2017.3, 2017.2.2f1. It hangs at isDone that always be false and no error
     
  34. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,642
    This bug will be fixed soon.
     
  35. fourdesire

    fourdesire

    Joined:
    Sep 26, 2014
    Posts:
    17
    Hi @Aurimas-Cernius is there a temporary solution to the issue? Almost every version of Unity 2017 has this issue includes 2017.4. However we cannot rollback to Unity 5 due to serval other issues of Unity. The crash and freeze of WWW, UnityWebRequest is dragging our user retention rate down and get lots of customer complains. Plz help thank you @@
     
  36. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    as a workaround, can you avoid using isDone and use other properties (like progress) to see if download completes ?
     
  37. fourdesire

    fourdesire

    Joined:
    Sep 26, 2014
    Posts:
    17