Sticky LUA PANIC FIX - Not enough memory

Discussion in 'Guides' started by nope, Aug 1, 2018.

  1. Yes.

  2. No.

  3. Haven't tried.

Results are only viewable after voting.
  1. nope

    nope User

    I AM NOT RESPONSIBLE FOR ANYTHING THAT HAPPENS TO YOUR GAME!
    BEFORE YOU START!

    To check how much RAM you have, hit Ctrl+Alt+Del>Task Manager>Performance>Memory.
    Your addons could be causing this problem for you, if it persists remove them.

    IF THIS DOESN'T WORK!

    There are alternative methods below the guide you can try.

    Step .1
    First go into steam and find Garry's Mod in your library, right click on it and find properties.


    [​IMG]


    Step .2
    After going into properties click SET LAUNCH OPTIONS



    [​IMG]


    Step .3
    There should now be a box that appears,
    to fix the LUA problem you need to type in one of the numbers corresponding to your ram.



    [​IMG]



    If you have 2GB of ram type in

    -heapsize 2097152

    If you have 4GB of ram type in

    -heapsize 4194304

    if you have 8GB of ram type in

    -heapsize 8388608

    After the command has been input launch Garry's Mod and go onto a server (ObeyServers) the problem should be fixed. If this didn't work and you still crash,
    Try typing in the next lower amount of ram, for example

    if you have 8GB type in the one for 4GB

    and if you have 4 you would type in for the one with 2

    Additional : 12GB OF RAM
    -heapsize 6291456

    16GB OF RAM
    If you have 16GB of ram the game shouldn't be crashing, i would recommend to check your ram, the -heapsize for 16GB would be -heapsize 16777216. if you have a higher amount of ram go onto a site that can calculate gigabytes into kilobytes, you can do this buy searching up, Bit Calculator. I used the first one. https://www.google.com/search?q=bit...0j69i57j0l3.2736j1j7&sourceid=chrome&ie=UTF-8

    Alternatives (DO IN ORDER) : (1) If this fix doesn't work further what I would do is Validate your Garry's mod files (Library>Right Click Gmod>Properties>Local Files>Verify integrity of game files.) this will not delete anything and will take a few minutes.

    (3)Try to put in the launch options "-dxlevel 98" if that does not work try 90 or 95.


    (LAST RESORT) Unsubscribe to all addons, then delete gmod folder and reinstall.

    (2) Right click the hl2.exe in garrysmod directory and run it in compatibility mode for windows 7 (If you're on W10)
    Set compatibility mode via the original .exe, dont be stupid..


    (4)Go to your C: Drive, or whatever drive you have Steam Installed on. Open it up.
    Go to Program Files>Steam>Steamapps>common>garrysmod
    Click on FactoryReset-Gmod

    A command prompt will open. To continue with resetting your game, you have to type Y to say yes. What this will do is reset your game to the base factory settings. (Reinstalling your game will not do this, this is why i recommend this over reinstalling your game.)

    ^^^ THIS WILL MEAN YOU HAVE TO DOWNLOAD OBEYSERVERS CONTENT AGAIN ALONG WITH ANYTHING THAT MIGHT BE REMOVED.

    Why addons could be causing this problem : "some addons written send a massive table to the player on join. This table got bigger the more the player played, so I found out about it because my more dedicated members were the ones with the issue. I suggest investigating addons that involve building up data over long periods of time like car dealers or things with inventories."

    THE SERVER YOU ARE JOINING COULD ALSO BE CAUSING THIS PROBLEM.
    I AM NOT RESPONSIBLE FOR ANYTHING THAT HAPPENS TO YOUR GAME!
     
    Last edited: Aug 1, 2018
  2. Rudy

    Rudy Server Founder/Owner Staff Member Owner

    You are awesome.
     
    • Like Like x 1
  3. nope

    nope User

    This guide has about 5 possible fixes to the problem, Do not PM me about anything, I will answer questions posted here ONLY.

    WOULD LIKE TO CLARIFY
    First off, Memory is not storage. (out of memory)
    In simplest terms, memory is like temporary storage that any processes can use.
    In this case, "we" likely have way too many addons running on the server/account. Get rid of some.


    NEED to make it clear that if this problem starts to happen on the server, Rudy you will have to remove some addons.
     
    Last edited: Aug 1, 2018
  4. nope

    nope User

    Rudy if this becomes a problem for the server you will have to remove addons, GMOD is 32 bit, alotted 4GB and if it tries to go over the 4GB it will crash and with it this error.

    This is my guess as to what would be happening if this became a server problem
    Sometimes gmod servers just have an INSANE amount of addons put into them. The addons by themselves might be optimized, but if you have a few hundred addons in a workshop collection plus gmodstore stuff, it's more than likely you will get this error.
     
    Last edited: Aug 1, 2018
  5. Rudy

    Rudy Server Founder/Owner Staff Member Owner

    I believe it might be the host. Our last host didn't have this problem. Who knows.
     
  6. nope

    nope User

    I'm going to guess when you had your old host you didn't have as many addons/customweps/custommodels, etc.
    Just saying if this became a problem what I would do is remove addons. And I don't feel like I need to say this cause i'm sure you understand but just incase, more addons/custommodels/customweps/ installed on the server the bigger the problem would become.
     
  7. Rudy

    Rudy Server Founder/Owner Staff Member Owner

    I found out the problem. It was UTime. Ever since we removed it, no one has been getting that error.
     
  8. nope

    nope User

    Of course! I'm so stupid for not realizing :(
     
  9. ScryptF0rt

    ScryptF0rt User

    UTime doesnt cause it... literally every other server has it and most do not cause Lua Panic errors.