Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

No More "Cool" Features Please Until Crippling Stuff Is Addressed

Discussion in 'General Discussion' started by Games-Foundry, Nov 15, 2012.

  1. shaderop

    shaderop

    Joined:
    Nov 24, 2010
    Posts:
    942
    +1
     
  2. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Do as I do: Do not use Mecanim.
     
  3. Games-Foundry

    Games-Foundry

    Joined:
    May 19, 2011
    Posts:
    632
    Not to mention the lack of animation events in Mechanim ( that took another developer to launch a non-Unity supported third-party asset store component ). Instantly rendered the main 4.0 launch feature utterly unusable for us. I'm sure we weren't alone.
     
  4. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Simon, if you aren't getting any traction maybe its better to raise these issues directly to the executives, and failing that with a post in Gamasutra or some other prominent games development news site.

    Unity Technologies hiding behind "Commercially Sensitive" seems a little too convenient. Defining a high level approach and timeline of whats being done to address an issue that is impacting customers and their customers (and harming the reputation of Unity in the process) doesn't seem particularly commercially sensitive to me.

    Good luck,

    John A
     
  5. Games-Foundry

    Games-Foundry

    Joined:
    May 19, 2011
    Posts:
    632
    I have expert blogger status with Gamasutra so it'd go straight onto the front page, but I'm giving UT the benefit of the doubt and some time to make a response. Unity is a great product, and I really don't want to have to blow the whistle on this nonsense.
     
    Last edited: Jun 11, 2013
  6. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    I agree with your stance, it does seem to have been a long time coming though :)
     
  7. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,614
    Do you have any direct channels of communication with them?

    At work, when we email the reps we know at Unity we always get a response of some kind within 24 hours.
     
  8. Games-Foundry

    Games-Foundry

    Joined:
    May 19, 2011
    Posts:
    632
    I'll send this to our rep if I can find his email.

    UPDATE:
    Email sent to Akouvi 11/06/2013 04:27am GMT recommending it be brought to the attention of UT's senior management.

    I don't hold out much hope because the last time I raised this thread with him on 21/11/2012 nothing happened after I received a confirmation from him on 04/12/2012 - 2 weeks later. I also bumped another post several times and got no response. Wall of silence.

    That time I let it slide, this time I can't. Not now it's potentially affecting our top line and reputation.
     
    Last edited: Jun 11, 2013
  9. Games-Foundry

    Games-Foundry

    Joined:
    May 19, 2011
    Posts:
    632
    11/06/2013 05:31 GMT - I have tweeted this thread to David Helgason, UT's CEO in the hope he passes it on to the relevant member of Senior Management.

    UPDATE:
    David has replied via twitter and asked someone in Europe to look into this so that he can come back with a reply. My guess he's at E3 late in the evening so I appreciate him taking the time to respond as quickly as he did.

    Note to UT: Happy to provide test keys for you to download the game from Steam, as well as anonymous customer crash reports and machine specifications should you require them.
     
    Last edited: Jun 11, 2013
  10. Forge Vault

    Forge Vault

    Joined:
    Feb 18, 2012
    Posts:
    214
    @simon - if the memory leak only occurs on specific computers then maybe it's not all doom and gloom. All you need to do is figure out the external catalyst and flag your game incompatible with what ever the catalyst may be.

    If your convinced the issue is entirely within unity, just call them up and ask for the source code so you can resolve the issue yourself. Don't tweet them or email them, call them.
     
  11. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    They won't give you the source code like that at the price at which they license it!
    Edit: if i'm wrong i'd be happy to fix bugs in exchange for free source access, hell i'd be happy to port the whole mess to 64 bit too :)
     
  12. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    In Unity 4.2 we have spent some time optimizing the existing GC. These are changes that we can do without breaking .NET version compatibility. There was some gain on some content but it very much depends on the game. The technique used is still the same, so it doesn't change anything on the scale of things.

    We also have a team of 4 people working on a long term solution for GC Mono. Currently we still can't give an update on it, but it's pretty exciting and it's of very high importance to the company and we have put quite a few resources on it.
    Trust me, we are 100% aware of the GC being a problem for our customers. While it is with a bunch of work possible to make games that allocate very little GC memory and have no hiccups. Doing that requires a lot of work from our customers and we would rather have it that you don't have to worry about it at all. Instead the GC should be faster incremental and never take more than 2ms per frame. That is our long term goal and we are working on getting there as fast as we can. At the same time we have to build stuff in a way that is maintainable, robust and a good solution going forward and works for more than just one use case / game. Doing that takes time, but just know that it is very important for us to fix.



    In Unity 4.3 we will have some optimizations for the terrain engine. As part of the upgrade the GC allocations in the Terrain have been removed.

    We also have a 64 bit editor that we are hoping to ship soon.


    I have trouble getting a complete overview of what functions you guys think we should make alternative versions for that do not allocate memory:

    * Physics.RaycastAll and other casting functions in Physics
    * gameObject.GetComponents<> style functions

    For new code we usually write API's like this:

    Code (csharp):
    1.  
    2. int ParticleSystem.particleCount;
    3. // Returns the number of particles in the array
    4. int ParticleSystem.GetParticles (Particle[] buffer);
    5.  
    So I think an API where you can allocate the RaycastHit yourself with a reasonable maximum size would solve it?
    Code (csharp):
    1.  
    2. int Physics.RaycastAll (RaycastHIt[] hits);
    3.  
    Makes sense?

    It would be super helpful if you can provide a full list of the API points that actually need to have non-allocating versions of it.


    Lastly there seems to be an out of memory issue you are running into? Is there a bug report on it? It would be very helpful to get a bug report with repro steps on how to create the issue. Without that its very difficult for us to follow up on it.
     
    Last edited: Jun 11, 2013
  13. Forge Vault

    Forge Vault

    Joined:
    Feb 18, 2012
    Posts:
    214
    Businesses are generally cooperative when there's a critical flaw in their product that affects the revenue of another business. In any case, It doesn't hurt to call them up and talk to them directly.
     
  14. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    That doesn't seem like enough to me? I think unity's feature set is decent, there shouldn't be a team of 4 people on porting to new mono, there should be a team of (all your engineers - 4) working on latest mono + 64 bit + bugfixes! Unity is ancient, max of 3GB of ram is ancient and i can barely use it for anything without getting a crash as i'm trying to work on non ancient things, import > 8K normal map? crash. Import large .obj file? crash. There are a solid dozens of crash that affect me regularly on the editor and i'm losing faith for improvement, we've seen 64 bit internal editor long ago, why is it not out yet? Why are there candy features still being worked on instead of a code freeze to bring stability? And most of all, why do you mention breaking .net version comatibility, is there even a single customer that would suffer from migrating? Migrating .net upward is nearly 100% compatible!

    I really think the best thing unity could do is to really (as in literally) freeze all dev, fork and fix things, and not resume any dev untill your on a more technologically mature stable stack!

    And god please don't make alternate API calls! If it's possible to do without allocation it should be done and simply obsolete the function for 1 minor version with a warning not to upgrade before fixing obsolete code and immediately remove it, letting people bite themselves is worse than forcing them to change code.

    Also the best way would be for you to manage memory and not for anyone to provide the buffer, you could do this with working with your own arrays, and returning enumerables (not the underlying, potentially larger than the result set) array that iterates over the correct section. The reason this is good is because
    1) The user doesn't need to pass the buffer, you manage it
    2) You can pre allocate a large enough buffer and use subsections
    3) Your users have only 1 function to call if you fix your current code to return enumerables implemented this way , this means no breaking api changes (need to recompile due to type change or if you're ussing array specific methods), the API doesn't break the allocation issues are fixed!
     
  15. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,614
    9 mothers can't make a baby in 1 month.
     
    Last edited: Jun 11, 2013
  16. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    As you might know there is a webplayer which requires binary compatibility.

    So you are saying a static buffer that gets reused between multiple enumerators?

    What if the user calls:
    Code (csharp):
    1.  
    2. var myResult = Physics.RaycastAll ();
    3. var myResult2 = Physics.RaycastAll ();
    4.  
    5. foreach (var results in myResult)
    6.    ...
    7. foreach (var results in myResult2)
    8.    ...
    9.  
    In that case myResult would contain the results of the second raycast?

    I can see how this works when you are writing game code and you can control the usage of the API but it doesn't sound like a robust API in the general case to me.

    Because in order to ship a 64 bit editor we have to actually have everything working, including all middleware integrations.
    The biggest amount of work came from that there is no cross platform 64 bit version of Webkit that we could use. So we had to switch to a Firefox based webkit integration instead.

    Other details like being able to run DX11 shader compilation from Mac To PC took quite some time to get right.
     
  17. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    +1
     
  18. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Big -1, random quotes don't applie here, 9 mothers can't make a baby in 1 month, but 150 devs can actually stop writing code that is hindering bug fixes and that's what code freezes are about, beside i doubt that only one tiny chunk is affected, so each team should have a code freeze and freeze their own mess, so yes, 10 teams can fix 100 bugs in a month if each of 10 bugs relate to one team's work.
     
  19. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Nope myResult would still contain the same result as before.
    You'd simply not be indexing the same area of the array because each time it would give you a different item, with diferent indexes over the same array.
    For raycasts it's diffferent as there's no sense in caching them (there's no sense in unity keeping the result if it's for immediate consumption?), the example i gave above was for shared data like particles.

    Also this is exactly the type of feature that should never take priority over stability / bugfix/ critical technical features like 64 bits, so the ability to compile shaders from mac, which you can't even run / test on mac and for which you must have windows to debug, actually took time to get right that could've been better spent, that's exactly the type of feature i wish you would "not" implement, potentially at all, but in any case not before you have exactly 0 critical (crash to desktop / unmanaged errors / random throws etc) bugs left and major technical features (64 bit) done!

    The webplayer requires binary compatbility, sure but if you plan on never breaking it you may as well dump it as it won't last a few more years! You can do like .net, ship both the current and old version in the same packages, so someone doing a unity 4.5 (fixed all bugs / updated .net yada yada) would get told "please update your web player", people using older games wouldn't be affected, and if they update they could still play old games.
     
  20. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    I was thinking about the Mono thing, i doubt putting another 4ppl on that will increase the speed of work with 100%, more like a few % probably.

    "In Unity 4.3 we will have some optimizations for the terrain engine"
    I hope that includes speeding up grass recalculations since thats horribly slow at the moment even if i just change a single terrain vertice : p
     
  21. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Now this (being able to restrict GC to set ms, is absolutely lovely. Yes please. This is professional development, being able to budget things. Really great work, I am very happy with this. I hope of course, this works on mobile as well :)
     
  22. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    That sure sounds nice feature wise, however i'd rather have them migrate to the latest mono latest gc first, else it's either
    1) Going to slow down migrating to latest mono or
    2) Going to require re developing it again later
    Unless mono hasn't changed it's GC since the current unity's mono version?
     
  23. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Unity uses version 2.6 of mono, the current version of mono is 3.0.4 and there have been a lot of GC changes
    Mono 2.8 got SGen a new faster GC http://www.mono-project.com/Release_Notes_Mono_2.8
    Mono 3.0 SGen gets a new task management system to allow scaling across multiple CPU's/threads http://www.mono-project.com/Release_Notes_Mono_3.0
    Mono 3.0.3 SGen has a concurrent GC that can reduce max pauses. still being worked on http://schani.wordpress.com/2012/12/21/sgen-concurrent-mark/

    It seems to be an ongoing problem with Mono's GC, the last link has the best info on the problem.
     
  24. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
  25. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Mono 3.04 also seems to have added a big boost to the GC with the cementing feature.
    I wonder what version will UT is aiming for, also it seems that the old GC is still the default one?
     
  26. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    I hope the lesson learned would be that they don't aim for a version, but for the latest version "plus" continuous integration with mono latest!
     
  27. shaderop

    shaderop

    Joined:
    Nov 24, 2010
    Posts:
    942
    +1 because common sense > trite platitudes.
     
  28. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
  29. Games-Foundry

    Games-Foundry

    Joined:
    May 19, 2011
    Posts:
    632
    Crickey, I only put my head down for a few hours and come back to this.

    Joachim, there's already been a lot of discussion over in the long running thread http://forum.unity3d.com/threads/140673-Garbage-Collection-Allocations-and-Third-Party-Assets-in-the-Asset-Store/page7?p=1096191&viewfull=1#post1096191 including ideas for how the API can be improved to avoid unnecessary allocations and allow us to pass in predefined arrays/lists. Lucas Meijer asked us to submit all the API functions that were causing allocations as bug reports. Here are a few:

    http://forum.unity3d.com/threads/14...-Store/page7?p=1096191&viewfull=1#post1096191

    http://forum.unity3d.com/threads/14...-Store/page7?p=1096230&viewfull=1#post1096230

    http://forum.unity3d.com/threads/14...-Store/page8?p=1097312&viewfull=1#post1097312

    http://forum.unity3d.com/threads/14...-Store/page8?p=1097418&viewfull=1#post1097418

    Other community members went on to post other functions so you'd have to read the thread.

    Slow garbage collection, while a pain in the ass, can be mitigated through avoiding unnecessary allocations and object pooling. Given Unity have a million+ users, how many millions of man hours worldwide could have been saved if this had been addressed sooner? The biggest issue for us is the Unity API as demonstrated in this screenshot ( it's now several months old as I've been sat on it should I need it, which just so happens to be now ):

    $API.jpg

    As you can see, the extensive use of foreach loops ( which cause allocation ) and creation of arrays is the primary offender.

    So while slow gc does need addressing, it is far more important for us at least that the API be rewritten, including support to pass in pre-defined arrays or lists, and a halt to the practice of using sealed classes, a practice that has prevented the community from fixing problems such as this.

    I will address the Dynamic Heap Allocator out of memory crash in my next post as I will need time to collate a number of customer crash reports and system specs to use as examples.
     
    Last edited: Jun 11, 2013
  30. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    I'm not sure the tradeof of losing 10 bytes per foreach vs maintaining foreach free code is worth it, however it's an issue on a per frame basis for sure but 2 things come to mind:
    - ArrayList? Seriously? Who uses those?
    - Roll your own internal enumerator for internal collections, on those have the restriction that only 1 enumerator per list can be used at once that way share the same single enumerator per list instead of returning new ones in get enumerator
    Basically replace GetEnumerator(){return new blaEnumerator();} with GetEnumerator(){this.CurrentEnumerator.Reset(); return this.CurrentEnumerator}
    That way you'd allocate 4.8kb internally once, instead of per frame, at pretty much no cost and with very minor changes, this doesn't require a technology change and should be very quick to do (a few man hours tops, and i'm being nice!)
     
  31. Games-Foundry

    Games-Foundry

    Joined:
    May 19, 2011
    Posts:
    632
    You'll have to give me 30 minutes as my brain is still waking up. In the meantime I'll start posting output_log.txt files for this Dynamic Heap Allocator out of memory error as well as links to show it has been a reported problem for over a year.

    For the first one I'll include the normal debug info that is common in output_log files, and for subsequent ones I'll clip it out for brevity:

    As mentioned, this error specifically happens when we load an asset bundle containing assets for each cut scene cinematic, and specifically at the line that tries to load the stereo wav soundtrack for the cinematic.


    Code (csharp):
    1.  
    2. Initialize engine version: 4.1.2f1 (911c7369eeac)
    3. GfxDevice: creating device client; threaded=1
    4. Direct3D:
    5.     Version:  Direct3D 9.0c [aticfx32.dll 8.17.10.1191]
    6.     Renderer: ATI Radeon HD 5700 Series
    7.     Vendor:   ATI
    8.     VRAM:     1018 MB (via DXGI)
    9.     Caps:     Shader=30 DepthRT=1 NativeDepth=1 NativeShadow=1 DF16=1 DF24=1 INTZ=1 RAWZ=0 NULL=1 RESZ=1 SlowINTZ=1
    10. Begin MonoManager ReloadAssembly
    11. Platform assembly: C:\Program Files\Steam\steamapps\common\Folk Tale\Folk Tale_Data\Managed\UnityEngine.dll (this message is harmless)
    12. Loading C:\Program Files\Steam\steamapps\common\Folk Tale\Folk Tale_Data\Managed\UnityEngine.dll into Unity Child Domain
    13. Platform assembly: C:\Program Files\Steam\steamapps\common\Folk Tale\Folk Tale_Data\Managed\Assembly-CSharp-firstpass.dll (this message is harmless)
    14. Loading C:\Program Files\Steam\steamapps\common\Folk Tale\Folk Tale_Data\Managed\Assembly-CSharp-firstpass.dll into Unity Child Domain
    15. Platform assembly: C:\Program Files\Steam\steamapps\common\Folk Tale\Folk Tale_Data\Managed\Assembly-CSharp.dll (this message is harmless)
    16. Loading C:\Program Files\Steam\steamapps\common\Folk Tale\Folk Tale_Data\Managed\Assembly-CSharp.dll into Unity Child Domain
    17. Platform assembly: C:\Program Files\Steam\steamapps\common\Folk Tale\Folk Tale_Data\Managed\Assembly-UnityScript-firstpass.dll (this message is harmless)
    18. Loading C:\Program Files\Steam\steamapps\common\Folk Tale\Folk Tale_Data\Managed\Assembly-UnityScript-firstpass.dll into Unity Child Domain
    19. Platform assembly: C:\Program Files\Steam\steamapps\common\Folk Tale\Folk Tale_Data\Managed\Assembly-UnityScript.dll (this message is harmless)
    20. Loading C:\Program Files\Steam\steamapps\common\Folk Tale\Folk Tale_Data\Managed\Assembly-UnityScript.dll into Unity Child Domain
    21. Platform assembly: C:\Program Files\Steam\steamapps\common\Folk Tale\Folk Tale_Data\Managed\ProBuilderCore.dll (this message is harmless)
    22. Loading C:\Program Files\Steam\steamapps\common\Folk Tale\Folk Tale_Data\Managed\ProBuilderCore.dll into Unity Child Domain
    23. Platform assembly: C:\Program Files\Steam\steamapps\common\Folk Tale\Folk Tale_Data\Managed\Ionic.Zip.Reduced.dll (this message is harmless)
    24. Loading C:\Program Files\Steam\steamapps\common\Folk Tale\Folk Tale_Data\Managed\Ionic.Zip.Reduced.dll into Unity Child Domain
    25. Platform assembly: C:\Program Files\Steam\steamapps\common\Folk Tale\Folk Tale_Data\Managed\JsonFx.Json.dll (this message is harmless)
    26. Loading C:\Program Files\Steam\steamapps\common\Folk Tale\Folk Tale_Data\Managed\JsonFx.Json.dll into Unity Child Domain
    27. Platform assembly: C:\Program Files\Steam\steamapps\common\Folk Tale\Folk Tale_Data\Managed\Flow.dll (this message is harmless)
    28. Loading C:\Program Files\Steam\steamapps\common\Folk Tale\Folk Tale_Data\Managed\Flow.dll into Unity Child Domain
    29. Platform assembly: C:\Program Files\Steam\steamapps\common\Folk Tale\Folk Tale_Data\Managed\FreeImageNET.dll (this message is harmless)
    30. Loading C:\Program Files\Steam\steamapps\common\Folk Tale\Folk Tale_Data\Managed\FreeImageNET.dll into Unity Child Domain
    31. Platform assembly: C:\Program Files\Steam\steamapps\common\Folk Tale\Folk Tale_Data\Managed\SteamworksManaged.dll (this message is harmless)
    32. Loading C:\Program Files\Steam\steamapps\common\Folk Tale\Folk Tale_Data\Managed\SteamworksManaged.dll into Unity Child Domain
    33. - Completed reload, in  0.492 seconds
    34. <RI> Initializing input.
    35.  
    36. <RI> Input initialized.
    37.  
    38. desktop: 1680x1050 60Hz; virtual: 1680x1050 at 0,0
    39. Platform assembly: C:\Program Files\Steam\steamapps\common\Folk Tale\Folk Tale_Data\Managed\System.Core.dll (this message is harmless)
    40. Platform assembly: C:\Program Files\Steam\steamapps\common\Folk Tale\Folk Tale_Data\Managed\System.dll (this message is harmless)
    41. Platform assembly: C:\Program Files\Steam\steamapps\common\Folk Tale\Folk Tale_Data\Managed\UnityScript.Lang.dll (this message is harmless)
    42. Platform assembly: C:\Program Files\Steam\steamapps\common\Folk Tale\Folk Tale_Data\Managed\Boo.Lang.dll (this message is harmless)
    43.  
    44. [...snip...]
    45.  
    46. (Filename: C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 54)
    47.  
    48. SYSTEM HAS 3327MB RAM FREE
    49.  
    50. *****FOLLOWING WARNING GETS SPAMMED SO MANY TIMES ITS PAINFUL! UT PLEASE REMOVE IN 4.3*****
    51. SetLODs: Attempting to force a LOD outside the number available LODs
    52.  
    53. (Filename:  Line: 80)
    54.  
    55. DynamicHeapAllocator out of memory - Could not get memory for large allocationCould not allocate memory: System out of memory!
    56. Trying to allocate: 13684946B with 4 alignment. MemoryLabel: Audio
    57. Allocation happend at: Line:312 in
    58. Memory overview
    59.  
    60.  
    61. [ ALLOC_TEMP_THREAD ] used: 30736B | peak: 0B | reserved: 65536B
    62.  
    63. [ ALLOC_DEFAULT ] used: 87999792B | peak: 0B | reserved: 97759186B
    64.  
    65. [ ALLOC_GFX ] used: 151198964B | peak: 0B | reserved: 153837738B
    66.  
    67. [ ALLOC_CACHEOBJECTS ] used: 23956472B | peak: 0B | reserved: 26214400B
    68.  
    69. [ ALLOC_TYPETREE ] used: 96408B | peak: 0B | reserved: 1048576B
    70.  
    71. [ ALLOC_PROFILER ] used: 67480B | peak: 0B | reserved: 4194304B
    72. Could not allocate memory: System out of memory!
    73. Trying to allocate: 13684946B with 4 alignment. MemoryLabel: Audio
    74. Allocation happend at: Line:312 in
    75. Memory overview
    76.  
    77.  
    78. [ ALLOC_TEMP_THREAD ] used: 30736B | peak: 0B | reserved: 65536B
    79.  
    80. [ ALLOC_DEFAULT ] used: 87999792B | peak: 0B | reserved: 97759186B
    81.  
    82. [ ALLOC_GFX ] used: 151198964B | peak: 0B | reserved: 153837738B
    83.  
    84. [ ALLOC_CACHEOBJECTS ] used: 23956472B | peak: 0B | reserved: 26214400B
    85.  
    86. [ ALLOC_TYPETREE ] used: 96408B | peak: 0B | reserved: 1048576B
    87.  
    88. [ ALLOC_PROFILER ] used: 67480B | peak: 0B | reserved: 4194304B
    89.  
    90.  
    91. (Filename:  Line: 885)
    92.  
    93. Crash!!!
    94.   ERROR: Error while initializing dbghelp.dll, GetLastError: 'The operation completed successfully.' (Address: 00000000)
    95.  
    96. ========== OUTPUTING STACK TRACE ==================
    97.  
    98.   ERROR: Error while initializing dbghelp.dll, GetLastError: 'The operation completed successfully.' (Address: 00000000)
    99.  

    error.log:

    Code (csharp):
    1.  
     
    Last edited: Jun 11, 2013
  32. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    That was the one good thing about c++ you could easily control the memory, if it cant find any memory couldnt it simply not allocate it not crash the game.
     
  33. Games-Foundry

    Games-Foundry

    Joined:
    May 19, 2011
    Posts:
    632
    output_log.txt

    Code (csharp):
    1.  
    2. Initialize engine version: 4.1.2f1 (911c7369eeac)
    3. GfxDevice: creating device client; threaded=1
    4. Direct3D:
    5.     Version:  Direct3D 9.0c [nv4_disp.dll 6.14.12.8026]
    6.     Renderer: NVIDIA GeForce GTX 560
    7.     Vendor:   NVIDIA
    8.     VRAM:     1024 MB (via registry)
    9.     Caps:     Shader=30 DepthRT=1 NativeDepth=1 NativeShadow=1 DF16=0 DF24=0 INTZ=1 RAWZ=0 NULL=1 RESZ=0 SlowINTZ=0
    10.  
    11. [...snip...]
    12.  
    13. <RI> Initializing input.
    14. <RI> Input initialized.
    15. desktop: 1280x1024 60Hz; virtual: 1280x1024 at 0,0
    16.  
    17. DynamicHeapAllocator out of memory - Could not get memory for large allocationCould not allocate memory: System out of memory!
    18. Trying to allocate: 27559476B with 4 alignment. MemoryLabel: Audio
    19. Allocation happend at: Line:312 in
    20. Memory overview
    21.  
    22.  
    23. [ ALLOC_TEMP_THREAD ] used: 30736B | peak: 0B | reserved: 65536B
    24.  
    25. [ ALLOC_DEFAULT ] used: 106003397B | peak: 0B | reserved: 116026208B
    26.  
    27. [ ALLOC_GFX ] used: 151157392B | peak: 0B | reserved: 153959816B
    28.  
    29. [ ALLOC_CACHEOBJECTS ] used: 45870344B | peak: 0B | reserved: 48234496B
    30.  
    31. [ ALLOC_TYPETREE ] used: 99424B | peak: 0B | reserved: 1048576B
    32.  
    33. [ ALLOC_PROFILER ] used: 80108B | peak: 0B | reserved: 4194304B
    34. Could not allocate memory: System out of memory!
    35. Trying to allocate: 27559476B with 4 alignment. MemoryLabel: Audio
    36. Allocation happend at: Line:312 in
    37. Memory overview
    38.  
    39.  
    40. [ ALLOC_TEMP_THREAD ] used: 30736B | peak: 0B | reserved: 65536B
    41.  
    42. [ ALLOC_DEFAULT ] used: 106003397B | peak: 0B | reserved: 116026208B
    43.  
    44. [ ALLOC_GFX ] used: 151157392B | peak: 0B | reserved: 153959816B
    45.  
    46. [ ALLOC_CACHEOBJECTS ] used: 45870344B | peak: 0B | reserved: 48234496B
    47.  
    48. [ ALLOC_TYPETREE ] used: 99424B | peak: 0B | reserved: 1048576B
    49.  
    50. [ ALLOC_PROFILER ] used: 80108B | peak: 0B | reserved: 4194304B
    51.  
    52.  
    53. (Filename:  Line: 885)
    54.  
    55. Crash!!!
    56.  
    57.  
    error.log

    Code (csharp):
    1.  
    2. Unity Player [version: Unity 4.1.2f1_911c7369eeac]
    3.  
    4. Folk Tale.exe caused an Access Violation (0xc0000005)
    5.   in module Folk Tale.exe at 001b:007dc1a5.
    6.  
    7. Error occurred at 2013-06-09_121052.
    8. C:\Programme\Steam\steamapps\common\Folk Tale\Folk Tale.exe, run by [snip].
    9. 82% memory in use.
    10. 3071 MB physical memory [530 MB free].
    11. 0 MB paging file [2261 MB free].
    12. 2048 MB user address space [87 MB free].
    13. Write to location 00000000 caused an access violation.
    14.  
    15. Context:
    16. EDI:    0x5c957670  ESI: 0x0147fe60  EAX:   0x0003490c
    17. EBX:    0x01a48634  ECX: 0x00000000  EDX:   0x00000034
    18. EIP:    0x007dc1a5  EBP: 0x0147fd78  SegCs: 0x0000001b
    19. EFlags: 0x00010206  ESP: 0x0147fd48  SegSs: 0x00000023
    20.  
    21. Bytes at CS:EIP:
    22. 66 0f 7f 01 66 0f 7f 41 10 66 0f 7f 41 20 66 0f
    23.  
    24. Stack:
    25. 0x0147fd48: 01a48634 00000000 00453437 00000000 4.......74E.....
    26. 0x0147fd58: 00000000 01a48634 5c957670 0147fe60 ....4...pv.\`.G.
    27. 0x0147fd68: 5c95763c 0147fe60 01a48634 01a48634 <v.\`.G.4...4...
    28. 0x0147fd78: 0147fd90 0045441e 5c957670 00000000 ..G..DE.pv.\....
    29. 0x0147fd88: 05710fac 5e6fe180 0147fea4 0063f96f ..q...o^..G.o.c.
    30. 0x0147fd98: 0147fe60 05301bb0 5c7a9590 5c7a9598 `.G...0...z\..z\
    31. 0x0147fda8: 00cd38d8 6c270ca4 182e6334 0147fdd0 .8....'l4c....G.
    32. 0x0147fdb8: 00670387 00cd390c 00404e44 00cd2a38 ..g..9..DN@.8*..
    33. 0x0147fdc8: 00cd3938 6c270ca4 0147fde8 00403bd0 89....'l..G..;@.
    34. 0x0147fdd8: 6c270c9c 0147fe08 68c99e38 68c99e04 ..'l..G.8..h...h
    35. 0x0147fde8: 0147fdf8 0040145a 00270ca4 00000013 ..G.Z.@...'.....
    36. 0x0147fdf8: 0147fea8 0045294b 00000014 5c915e48 ..G.K)E.....H^.\
    37. 0x0147fe08: 00cd38d8 0147fe50 004049b5 00000024 .8..P.G..I@.$...
    38. 0x0147fe18: 5c94eba8 5c880024 0001f368 05301b60 ...\$..\h...`.0.
    39. 0x0147fe28: 00000000 00cd38d8 5c94ebb8 03141d7c .....8.....\|...
    40. 0x0147fe38: 0147fe54 05301b60 00cd390c 00404e44 T.G.`.0..9..DN@.
    41. 0x0147fe48: 00cd2a38 00cd3938 5c94ebb8 0147fe8c 8*..89.....\..G.
    42. 0x0147fe58: 00635108 05301c64 71788ee4 7177ccc4 .Qc.d.0...xq..wq
    43. 0x0147fe68: 71795cc4 05712ca0 0000001f 00019000 .\yq.,q.........
    44. 0x0147fe78: 003131f4 01d5b854 0147ff00 00000000 .11.T.....G.....
    45. 0x0147fe88: 00000000 00000000 00000000 00800101 ................
    46. 0x0147fe98: 00000000 05710fac 00800101 0147ff0c ......q.......G.
    47. 0x0147fea8: 0063a205 0100000c 5e5bd3ac 00000001 ..c.......[^....
    48. 0x0147feb8: 00000001 0147fef8 0147ff17 003131f4 ......G...G..11.
    49. 0x0147fec8: 05301b60 5e5d53dc 00000000 5c915e48 `.0..S]^....H^.\
    50. 0x0147fed8: 5c915e4c 5c915e4c 5c915e48 05710d6c L^.\L^.\H^.\l.q.
    51. 0x0147fee8: 05710d6c 0000000b 0000000c 05301bdc l.q...........0.
    52. 0x0147fef8: 7ff4c000 00000000 05301b60 0001f368 ........`.0.h...
    53. 0x0147ff08: 05710fac 0147ff74 005e3a19 5e70d778 ..q.t.G..:^.x.p^
    54. 0x0147ff18: 00000001 0147ff5c 0534b564 0534b584 ....\.G.d.4...4.
    55. 0x0147ff28: 0534b514 00000000 00000000 00000000 ..4.............
    56. 0x0147ff38: 0147ff2c 0147ff0c 0069cfb7 0147ffdc ,.G...G...i...G.
    57. 0x0147ff48: 7c839ab0 00000000 00000000 00000000 ...|............
    58. 0x0147ff58: 006705d3 5e5d53fc 3f666666 3f800000 ..g..S]^fff?...?
    59. 0x0147ff68: 00000000 00000001 5e5d53fc 0147ff98 .........S]^..G.
    60. 0x0147ff78: 005e2eb2 00000000 0534b514 0534b514 ..^.......4...4.
    61. 0x0147ff88: 0534b514 0147fb1c 0147ffdc 4d9735d8 ..4...G...G..5.M
    62. 0x0147ff98: 0147ffa0 005e38cb 0147ffb4 00670540 ..G..8^...G.@.g.
    63. 0x0147ffa8: 0534b514 00000000 0012fbf8 0147ffec ..4...........G.
    64. 0x0147ffb8: 7c80b729 0534b514 00000000 0012fbf8 )..|..4.........
    65. 0x0147ffc8: 0534b514 7ff4c000 c0000005 0147ffc0 ..4...........G.
    66. 0x0147ffd8: 0147f96c ffffffff 7c839ab0 7c80b730 l.G........|0..|
    67. 0x0147ffe8: 00000000 00000000 00000000 00670500 ..............g.
    68. 0x0147fff8: 0534b514 00000000                   ..4.....
    69.  
    70.  
     
  34. Games-Foundry

    Games-Foundry

    Joined:
    May 19, 2011
    Posts:
    632
    And so the crash reports keep coming. Different machine configs, 32-bit or 64-bit makes no difference, even with 8GB RAM ( Folk Tale consumes 1.5GB ).

    Very happy to provide the full crash folders to Unity.

    My skype is sdean3842 by the way UT.
     
    Last edited: Jun 11, 2013
  35. Games-Foundry

    Games-Foundry

    Joined:
    May 19, 2011
    Posts:
    632
  36. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    I'm starting to wonder if i've bet on the right engine, even though i have invested nearly 10K on asset store stuff :(
     
  37. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Everyone knows it a lot more fun working on new stuff than fixing old bugs! ; )
     
  38. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    But it's a lot less fun using a feature-full buggy soft than something solid for work :(
     
  39. Games-Foundry

    Games-Foundry

    Joined:
    May 19, 2011
    Posts:
    632
    And for the love of god, please don't say "but has anyone actually submitted a bug report?".

    If I as the only programmer on our team can provide one-to-one support to a customer base of tens of thousands of players that have arrived in just 12 days, monitoring feedback across two forums, facebook, email and twitter, working 4am-11pm every day, then I'm sure myself along with others here will not accept that shrink-wrapped get out of jail free card. A company the size of Unity Technologies with its funding should be monitoring all it's channels of customer engagement looking for problems in it's product.

    It's widely acknowledged that the Answers system is a failure, and that reporting bugs is often futile. We've established that the forums aren't really monitored properly, and the Unity backed away from being transparent after the UI debacle.

    Guys, many of us love and support Unity, but you really need to recognize a failing support culture when it's happening on your doorstep.

    Don't be scared off by my comments by the way, I'm actually very calm over the whole matter. All I'm sure many of us want in the Unity community is for things to improve and for our concerns to be noted and acted upon.
     
    Last edited: Jun 11, 2013
  40. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    +1

    Also 2 extra points:
    1) I have submited bug reports and the only thing i get out of it is an occasional "was it fixed by the latest version?" to wich the answer is always no, meaning they didn't try to repro it and just hope it will go away, even thought in the very bug report i gave all the info to repro it / offered to repro it on skype / offered remove access to debug it.
    2) There are very sensible threads with community anger getting zero response (like the thread about refunds on the asset store section, it's batshit insane that this received zero official response! it can't have been missed, it was getting bumped to the top non stop just like this thread right now so it can means 2 things : you voluntarily did not answer and bury it or you're not monitoring the forum at all even for massively active threads, i'm not even sure which one would be worse . . .
     
  41. aaronflippo

    aaronflippo

    Joined:
    Jun 7, 2012
    Posts:
    45
    Let me make sure I understand:

    - You have a game with a 1.5 GB memory footprint
    - You've listed no minimum specs for the game (that I can see)
    - Some customers are having out-of-memory issues, which as usual, manifest them selves in random ways in the form of failed memory allocations. For instance in the log above, a system with 3GB of memory is failing on a 26 MB audio allocation.
    - You think this is Unity's fault, and think they should stop ALL future development until they've fixed your issue.

    Maybe I'm grossly mis-understanding something here - but it sounds to me like you need to get ahold of your memory budgets, and figure out your minspec.
     
  42. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Yes you're grossly missunderstanding something, usually out of memory issues in managed environment aren't due to actually running out of memory, but out of contiguous memory that can be allocated, so if using unity api to load 26MB of data then you'll need a 26mb chunk available, if there's no 26mb chunk it will fail, and that could be due to memory fragmentation, extremely frequent allocations (like the one he shows in the profiler with 100s of objects allocated per frame, at 60FPS) "will" likely generate a lot of fragmentation in the long run, meaning you'll soon be unable to do anything without crashing even if you use little memory.
    1.5GB is actually very reasonable on desktop, no reason not to use that much, and even lowly 32 bit unity should handle that np unless unity itself needs the rest of the ram "or" allocates badly.
    Note that my knowledge is based on .net, so if i'm fully wrong on that it's different on mono, sorry for the bad info!
     
  43. Games-Foundry

    Games-Foundry

    Joined:
    May 19, 2011
    Posts:
    632
    Minimum specifications are listed on the store page and state 4GB for system memory.
    On 32-bit Windows machines by default an app can only address 2GB of memory ( unless you use bcdedit which we've already suggested as a fix ). We're well below that, and the crash still happens. 1.5GB + 26MB < 2GB.
    No, I didn't say anything about all future development needing to stop. Please read the 'Please note' section in the OP.
     
  44. Games-Foundry

    Games-Foundry

    Joined:
    May 19, 2011
    Posts:
    632
    Ronan are you aware of any solutions for defragging memory in Unity? What you've said makes a lot of sense. Shouldn't the gc do this?
     
  45. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    If it's the same as .net then no, actually memory is self defragmenting for the most case except for the LoH (large object heap) which is considered too expensive to defrag, i as many others have requested since long that microsoft add a way to defragment manually when required but so far it's a no go.
    In any case "all" of these problems would be solved by going to 64 bit (actually while there's no 64 bit editor there's a 64 bit player, did you test that? It may actually fix your problems if it's 64 bit all the way and not just for native code as you could adress a lot more memory and thus have space even if you can't "fit" new objects in old spaces)
     
  46. aaronflippo

    aaronflippo

    Joined:
    Jun 7, 2012
    Posts:
    45
    You've listed 4GB as a minspec - but the crash log you posted is from a PC with 3GB?

    "1.5GB + 26MB < 2GB."
    I think you don't understand how memory allocators work.

    My overall point is - you're pushing up against memory limits here, and out-of-memory issues are bound to manifest themselves in places you don't expect. That's just the nature of how memory works. It sounds like there are some valid issues with inappropriate allocations in the API, but it sounds like the best solution to your problem is going to be shrinking your memory budgets and/or enforcing your minspec.
     
  47. Games-Foundry

    Games-Foundry

    Joined:
    May 19, 2011
    Posts:
    632
    That's probably not an option as a large number of players still appear to be on 32-bit Windows. We've even seen a number of Windows 8 32-bit which just seems ridiculous. Further, I'm not sure Steam supports separate 32-bit and 64-bit builds.
     
  48. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Can't you have a launcher that launches the appropriate version depending on detected platform? It's not a real fix but it could fix it at least for the X64 customers.
    Are you actually using 1.5gig at the same time or is it a GC issue? What exactly is taking that much space?
     
  49. Games-Foundry

    Games-Foundry

    Joined:
    May 19, 2011
    Posts:
    632
    The work we did to reduce the memory footprint combined with the bcdedit which went live today has enabled a good percentage of players to enjoy the game when they could not previously. Going forward, there are additional changes we have planned to reduce the memory footprint. But right now, we have some players who have paid to play the game who cannot. It doesn't matter whether or not they read the minimum specification, if a game crashes, they blame the developer and shout loudly about it on forums, whether they are right to do so or not. That in turn can put off other potential customers. So we have to provide the very best support and try to get them up and running. Yes, worst case there is the fallback that their system is below minimum spec. But a dissatisfied customer will rarely come back, and will probably tell their friends.

    Our main concern is affected players with 4GB of memory who still cannot run the game, and that is why we are pursuing a resolution.
     
  50. Kwrky

    Kwrky

    Joined:
    Jun 11, 2013
    Posts:
    2
    Hi Simon,

    I apologize for replying with some fairly generic stuff but this is just something that came to mind. At the last Unite I went to one of the (UT) devs was discussing specifically how AssetBundle's come with some fairly hefty memory penalties due to how they are packaged. I took some notes but really can't remember much beyond them. The key issue they raised is that the way AssetBundles are decompressed can lead to large buffer allocation that does not get deallocated until the AssetBundle is Dispose() 'd. This buffer allocation is on a per decomp call, so parallel loading of assets can spike memory significantly.

    You may have already considered this, but just in case I thought I'd post it as it was fresh in my mind.