Search Unity

webGL out of memory error....

Discussion in 'Editor & General Support' started by explainet, Apr 10, 2018.

  1. explainet

    explainet

    Joined:
    Apr 10, 2018
    Posts:
    12
    Hi i am not sure if im in the right forum group or not.
    Here we go, i have been playing this MMO game Vikings War Of Clans for a little over a year now,
    and im getting sick and tired of getting this error all the time,
    i have tried to play the game on Edge, Chrome, Firefox, Opera, Vivaldi, Facebook Gameroom, and even Plariums own pc game app, all of them give this same error when playing...

    The game starts fine, loads in and all that, then about an hour or so or if i seach the map a lot, then this error crashes the game...
    the plarium support just keep telling me to clear my cache and reload the game.
    But i have played other unity webGL games that i can play all day long without that error and without beeing
    forced to reload the game at all...
    and it's like they are just ignoring the problem.
    I really like to play this game and that's why i have been talking with plarium support lile hundreds of times by now and the just keep saying that i need to clear the cache witch have no effect on the problem at all....

    i just wonder if there is anyone in here, some smart heads who might know something about it...

    Sincerely. Bjørn Hansen.....
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    This is a problem that needs to be addressed by the game's developer. If you were the developer I'd direct you to this doc page for some basic info, though you might also find it interesting regardless:

    https://docs.unity3d.com/Manual/webgl-memory.html

    As far as from the player's perspective, the only thing I can suggest is to make sure you are running the game from a 64 bit browser. 32 bit browsers are restricted to 32 bit memory allocation sizes, which is fairly small by today's standards. You could also specifically try Fire Fox 64 bit, since FF supports Large-Allocation HTTP headers, and you can cross your fingers that the developer has enabled that on their web server.

    Note that often the default download for a browser installer will be for the 32 bit version, since that will work on both 32 bit and 64 bit operating systems, and you may need to do a little digging for the 64 bit version.
     
    Last edited: Apr 10, 2018
    explainet likes this.
  3. explainet

    explainet

    Joined:
    Apr 10, 2018
    Posts:
    12
    i am running the game with Chrome 64bit, Firefox 64bit, Vivaldi 64bit, and Opera 64bit.

    and i keep telling the Plarium support that the Dev's need to fix this problem, but they keep telling me that i need to clear the browser cache to fix the problem but the problem keep coming up after an 30 minutes to an hour playing after clearing the cache.... it's frustrating that they won't listen to me at all
     
  4. explainet

    explainet

    Joined:
    Apr 10, 2018
    Posts:
    12
  5. explainet

    explainet

    Joined:
    Apr 10, 2018
    Posts:
    12
    they are just giving standard answers back when you confront them with this issue...
    Web games like that should delete oldest data when playing to prevent that issue....
     
  6. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    As I mentioned, this is a problem that the developer of the game needs to address in order to resolve the problem. This isn't an issue inherent to Unity or Unity WebGL builds.
     
    explainet likes this.
  7. explainet

    explainet

    Joined:
    Apr 10, 2018
    Posts:
    12
    i just wan't confirmation on that it is not the players fault...
    Vikings have been running for like 4 - 5 years or so now.
    and this thing is still an issue...
    and speaking with plarium, the Dev of the game keeps claiming that the fault is on the users side and not theirs....
     
  8. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    The only thing left I could think of that could still be the player's fault would be if your computer physically doesn't have enough memory installed to run the game.
     
    Rispat-Momit and explainet like this.
  9. explainet

    explainet

    Joined:
    Apr 10, 2018
    Posts:
    12
    Screenshot_19.jpg
    Should'nt have any problems here then....
     
  10. sledgeman

    sledgeman

    Joined:
    Jun 23, 2014
    Posts:
    389
    It is more a dev. prob, because you have to develop the build for a webGL a bit more different than for a mobile. He said, try out the mobile vers. It sounds that he ported the mobile vers. to the webGL vers. in 1:1 . This mostly don´t work well.

    Also i have to say, that Unitys webGL is barely OK, but it isn´t that good as other solutions. Even if you optimize your build for webGL, you can run into this probs. And a dev should build it for 32bit, because he want to reach the most users. So its not easy to have good webGL content made by Unity. This is somwhow really sad ! :(
     
    explainet likes this.
  11. tsibiski

    tsibiski

    Joined:
    Jul 11, 2016
    Posts:
    599
    Its clear that the game is poorly handling memory usage. Seems like a memory leak building up over time. So even allocating more memory may not necessarily do more than just increase the time before the game crashes.

    The responses there show that the person(s) responding to you know absolutely nothing about development, and just have a list of boilerplate responses that they refused to deviate from, or the person(s) just refuse to address the issue.

    In this case, I'd recommend writing a review that explains this, and shows their responses. If they cannot be bothered to respond to you when you try to do them a favor, maybe they will actually address the issue when new players would avoid the game because they see your negative experience as an eventuality for them.
     
    explainet likes this.
  12. explainet

    explainet

    Joined:
    Apr 10, 2018
    Posts:
    12

    Ty for that response...
    well im really bad at making Reviews for games, as im danish and my english is pretty bad, my speaking english is terrible while my typing is better and i use google translate a lot, my understanding when i read english i much much better...
    But i allready think that a lot of ppl have done reviews of the game but that is mostly on the mobile app that dos'nt have to many bugs at all.
    there is more the 5 mil of players in Vikings so it is odd that they havent listened to any of them...
     
  13. explainet

    explainet

    Joined:
    Apr 10, 2018
    Posts:
    12
    i have 22weeks and 6days of ingame gametime in this game...
    started playing it in the start of January 2017 and this issue have been there all that time...
     
  14. explainet

    explainet

    Joined:
    Apr 10, 2018
    Posts:
    12
    it's a shame cause it's a fun and good war game but that error is taking a good load of all the fun in the game and i almost had it with this...
    my mobile playing friends have no problems but i refuse to play games on a mobile...
    and i also have spend a huge amount of money on this web account and it can not be bound to a google play account to transfer it to a mobile og tablet device...
     
  15. explainet

    explainet

    Joined:
    Apr 10, 2018
    Posts:
    12
    it's almost like PLARIUM refuse to spend the money on fixing the thing and running from the responsibility
    of doing the best for their players...
     
  16. explainet

    explainet

    Joined:
    Apr 10, 2018
    Posts:
    12
    Screenshot_20.jpg

    they also have a really Bad Bad Bad repute here....
     
  17. sofia_helfrich

    sofia_helfrich

    Joined:
    May 28, 2018
    Posts:
    1
    Hello,

    Thank god I finally found someone who has the exact same problem as me... I was hoping that maybe you found a solution in the meantime?
    I don't understand much about webGL/javascript/unity stuff... :(

    Thank you!
    Sofia.
     
    explainet likes this.
  18. explainet

    explainet

    Joined:
    Apr 10, 2018
    Posts:
    12
    Well to answer your question, no. there is no workaround of any kind. it's a game code problem that plarium need to fix before it goes away...
    And to be honest, i stopped playing after spending about 9.000 USD on the game, and after this last patch, now this problem is even worse then before...
    And telling plarium support that this is a problem is like talking to a closed door.
    i have told them about this many times and they kinda don't get it... so my 9000 USD investment in my town is just one big waste...
    Sorry to say....
     
  19. allanstrand

    allanstrand

    Joined:
    Aug 18, 2018
    Posts:
    1
    Hi I have exact the same problem
    webGL out of memory error....
    on pc i7 8GB ram chrome, also used bluestack but now hyper-v problem after last update? its bad loosing army,city because of this, on phone it works perfect though but not so nice to use all the time...Needs to be fixed !!!
     
  20. SBPTechTN

    SBPTechTN

    Joined:
    Jul 5, 2019
    Posts:
    3
    webgl is by default set to 256 mb memory try to add more in the player settings
     
  21. grobonom

    grobonom

    Joined:
    Jun 23, 2018
    Posts:
    335
    yes :)

    where ?

    There's no mem space field ?
    and seriously.... 256Mb ( laugh my a*s off )

    I'm really considering leaving this piece of S*** ( webgl ) apart and compile towards real platforms !
    webgl is a junk-joke !!! XD
     
  22. SBPTechTN

    SBPTechTN

    Joined:
    Jul 5, 2019
    Posts:
    3
    click file
    Build settings
    player settings
    publishing settings
     
  23. DarkVerse

    DarkVerse

    Joined:
    Jan 9, 2017
    Posts:
    57
    I am getting this after upgrading to 2019.2
    and there is no mem space field under Player Settings/Publishing Settings.

    Is there any way to increase this memory allocation in 2019.2?
     
    grobonom likes this.
  24. SBPTechTN

    SBPTechTN

    Joined:
    Jul 5, 2019
    Posts:
    3
    They are moved to webassembly that does not require hard memory limit i thinks .
    https://blogs.unity3d.com/ru/2018/08/15/webassembly-is-here/
     
  25. DarkVerse

    DarkVerse

    Joined:
    Jan 9, 2017
    Posts:
    57
    Ok, so if it is using webassembly now but I am still getting this out of memory error on loading then is there anything I can do?
     
  26. grobonom

    grobonom

    Joined:
    Jun 23, 2018
    Posts:
    335
    i found none :/ therefore i stopped compiling towards webgl ;)
     
  27. DarkVerse

    DarkVerse

    Joined:
    Jan 9, 2017
    Posts:
    57
    I did find a way to do it but I am not in my office so will post details tomorrow. However, I am having other issues with WebGL, mainly to do with addressable assets and performance...not to mention debugging is hell... I am very close to dropping the idea of WebGL builds too.
     
    grobonom likes this.
  28. grobonom

    grobonom

    Joined:
    Jun 23, 2018
    Posts:
    335
    hi @DarkVerse

    Yes it's evenmore a shame that some years ago there was the perfect solution of the webplayer plugin that ran in a browser as fast as on a native platform.

    U3D argues that it's now impossible to do because webplayer was a plugin.
    Then i don't understand why flash is still needed in some browsers ( and installable ) for running some apps....

    Anyway, i'm close to forget about all this, throwing away the webgl solution ( whis isn't one by the way ) wich is useless for anything else than small demos/apps because far too restrictive....

    Happy unitying :)
     
  29. DeltaPiSystems

    DeltaPiSystems

    Joined:
    Jul 26, 2019
    Posts:
    30
    Could you explain how you managed to increase memory for WebGL
     
  30. DarkVerse

    DarkVerse

    Joined:
    Jan 9, 2017
    Posts:
    57
    Sorry for the late reply, I have been on leave.

    I increased the memory by adding a script in an Editor folder with the following class definition...

    using UnityEditor;
    using UnityEngine;

    [InitializeOnLoad]
    class BuildSettings
    {
    static BuildSettings()
    {
    //WebGL
    PlayerSettings.WebGL.linkerTarget = WebGLLinkerTarget.Wasm;
    PlayerSettings.WebGL.threadsSupport = false;
    PlayerSettings.WebGL.memorySize = 1024;
    }
    }
     
    virtualbob, M4R5 and DeltaPiSystems like this.
  31. Black_Raptor

    Black_Raptor

    Joined:
    Nov 3, 2014
    Posts:
    181
    Where do you add this script ? Thanks
     
  32. DarkVerse

    DarkVerse

    Joined:
    Jan 9, 2017
    Posts:
    57
    Anywhere in your project. Create a folder called Editor and put it in there.
     
    virtualbob likes this.
  33. Jeff-Kesselman

    Jeff-Kesselman

    Joined:
    Apr 5, 2010
    Posts:
    99
    I just did an extensive bit of research on this.

    Short answer, WASM memory handling sucks and it doesn't matter if you are on a 64 bit browser.

    Max available is 2GB. Chrome based browsers can get to 4GB but Unity doesn't support that and you can't make it do it because the 2GB limit is built into their code that deploys on the browser.

    So, you will never be able to do a serious 3D application on WASM until the WASM vms are extended to 64 bit addressing, or at least paging multiple 32bit memory spaces/