[Bug] Extreme building lag when finishing a component. [59783]

DreadlordDreadlord Members Join Date: 2015-03-31 Member: 202815Posts: 16 Advanced user
edited February 2018 in Subnautica Bug Reporting
Subnautica Version - 59783

Description - Lag that slowly builds up as you increase the base. Starts slowly and increases as your base continue to grow. I am up to 6-7 seconds on the freeze now.
This lag ONLY happens when you complete an item from 99% to 100% or when deconstructing from 100% to 99%
Exception: If you build anything from the external menu, like a solar panel or thermal reactor, there is NO lag spike.
Also, lag spike ONLY happens when building an object from 99% to 100%. There is no lag in the game otherwise at all.
I can start on an object and construct and deconstruct as much as I like without any lag. Going from 99% to 100% and the spike will hit.

Added: As I finished a reinforcement on a corridor I could see the seamoth despawn and respawn as the clamps grabbed hold of it and raise it up again. Not sure if this has anything to do with the problem, but having at least 3-4 moonpools over different distances away but still part of the same base could explain why this "update routine" takes longer and longer time?! If it is part of the problem this "update routine" will need some optimization.


Reproduction steps - Build a large base and watch how the time to finish a component increases.

Pictures or Video - https://clips.twitch.tv/BeautifulGiftedMooseDoritosChip (if you need a better video recorded that describes all of this, let me know)
Image of the time graph option when finishing the build: https://imgur.com/a/AyrwF
Post edited by Dreadlord on
paladdin
«1

Comments

  • ObraxisObraxis Subnautica Animator & Generalist, NS2 PersonSuper Administrators, Forum Admins, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, NS2 Playtester, Squad Five Silver, WC 2013 - Supporter, Subnautica Developer, Pistachionauts Join Date: 2004-07-24 Member: 30071Posts: 3,013 admin
    Please upload your saved game (to Google Drive/Dropbox/A Download Link) for us to download. Your saved games are located in your Subnautica Steam folder here: Subnautica\SNAppData\SavedGames (as folders numbered 'slot01234'). They have thumbnail pictures in the folders so you can recognize them.

    By doing this we can look at the game in our internal editor and try to figure out what's going on. Thanks

    If NS2 fails, follow my Nuke From Orbit Guide.

    NS2 Discord: https://discord.gg/0TKQwZWu7JEPeAgW

    Subnautica Discord: https://discord.gg/subnautica

    DreadlordSnailsAttack0x6A7232
  • DreadlordDreadlord Members Join Date: 2015-03-31 Member: 202815Posts: 16 Advanced user
    Hi @Obraxis
    Thank you for taking a look at this, as it is driving me nuts and stopping me from playing atm.
    You can find my save file here:
    https://drive.google.com/open?id=1wHxoqVZx2_gTZ4YIRQNW7r16vbzKN2Hr
    Basically just try to deconstruct or construct anything.
    If you need any additional information I will be available.
    SnailsAttack
  • CaiobrzCaiobrz BrazilMembers Join Date: 2018-02-01 Member: 236501Posts: 67 Advanced user
    Obraxis wrote: »
    By doing this we can look at the game in our internal editor and try to figure out what's going on. Thanks

    Every game I play, this also happens if my base get anywhere larger than some 10 modules. Is there anything we can do to prevent this from happening?

    Just for fun I was building a tunnel across the whole map but as I approached 1Km the hang up for each component was over 10 seconds so I gave up.

    It was on Freedom with "nocost" so the base had valid structural integrity and energy.
  • ObraxisObraxis Subnautica Animator & Generalist, NS2 PersonSuper Administrators, Forum Admins, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, NS2 Playtester, Squad Five Silver, WC 2013 - Supporter, Subnautica Developer, Pistachionauts Join Date: 2004-07-24 Member: 30071Posts: 3,013 admin
    Dreadlord wrote: »
    Hi @Obraxis
    Thank you for taking a look at this, as it is driving me nuts and stopping me from playing atm.
    You can find my save file here:
    https://drive.google.com/open?id=1wHxoqVZx2_gTZ4YIRQNW7r16vbzKN2Hr
    Basically just try to deconstruct or construct anything.
    If you need any additional information I will be available.

    I can't promise a fix, but we'll take a look. Thanks for the upload.

    If NS2 fails, follow my Nuke From Orbit Guide.

    NS2 Discord: https://discord.gg/0TKQwZWu7JEPeAgW

    Subnautica Discord: https://discord.gg/subnautica

  • DreadlordDreadlord Members Join Date: 2015-03-31 Member: 202815Posts: 16 Advanced user
    edited February 2018
    Thank you.

    Taking a look is good enough for me. Hope it is a easy to locate the bug with the info I have provided. I am available for testing and/or if you need more info.

    --
    Sath
    Post edited by Dreadlord on
  • KnorthKnorth Members Join Date: 2018-02-15 Member: 237662Posts: 4 Fully active user
    edited February 2018
    It isn't something wrong with your save. This happens to any save, getting worse for each habitat piece added to the world. You are entirely correct that it is an update routine, and the cause of the odd vehicle behavior.

    When a habitat piece is added or removed the game updates the data about the new or removed piece, then it deletes all habitat pieces in the entire world and recreates everything from the updated data. Each time this is done the games goes through a number or large and costly computations, such as, rebuilding the flood groups, hull integrity groups, and power groups. Additional work is done for each of the more complicated pieces, such as Scanner Rooms and Moonpools.

    Again, this is done for every habitat, every piece, in the entire game world, regardless of where or to what the new or removed piece actually connects!
  • 0x6A72320x6A7232 USMembers Join Date: 2016-10-06 Member: 222906Posts: 5,270 Advanced user
    Knorth wrote: »
    It isn't something wrong with your save. This happens to any save, getting worse for each habitat piece added to the world. You are entirely correct that it is an update routine, and the cause of the odd vehicle behavior.

    When a habitat piece is added or removed the game updates the data about the new or removed piece, then it deletes all habitat pieces in the entire world and recreates everything from the updated data. Each time this is done the games goes through a number or large and costly computations, such as, rebuilding the flood groups, hull integrity groups, and power groups. Additional work is done for each of the more complicated pieces, such as Scanner Rooms and Moonpools.

    Again, this is done for every habitat, every piece, in the entire game world, regardless of where or to what the new or removed piece actually connects!

    O.o How do you know this?
    UWE Community guidelines | Guide to play in VR with Google Cardboard or Gear | Increase Subnautica view distance | Useful info to post with error reports | Recovery of corrupted saved games | How to easily update your drivers
    Crashing, lag problems? Or maybe your old save didn't get the latest update? Upload your saved game folder to help the devs troubleshoot, then try clearing your cache directories | Automatic Cache cleaning tool here | How to use the Debug Console | How to play any version of Subnautica using Steam | Tips for Subnautica beginners | Why can't the devs "just fix it"? - a modding session for you to educate yourself with Want more frames? Try adding this to your launch options: -window-mode exclusive | Solve options not saving or black screens by deleting options file | Possible workaround for Pause / Menu Bug | Rescue a trapped Seamoth / PRAWN
    Slow loading / textures popping in? Try moving Subnautica to an SSD | How to switch Subnautica to Experimental mode (clear cache afterwards) | How to run chkdsk on your drive | How to verify integrity of your game cache (in the "Installation" section) | Blue screens or computer freezing up? Try this fix (updates a corrupted DX10 compatibility file in the graphics driver that sometimes doesn't get updated)
    Subnautica launches in a tiny window? Use Task Manager to Maximize it (Thanks FlippingPower) | How to place your Moonpool so it connects correctly (includes diagrams) | Want to hang out with fellow players and the devs? Subnautica Discord server ← swing on by! | SuspensionRailway's Modding Emporium Categorized list of mods, including 1st playthrough-friendly Hey, look, mods! ReShade mods Subnautica NexusMods | TERRAFORMING mod
    Humans don't crush at the depths you might think
    Joystick problems? | Xpadder | UJR / vJoy | JoyToKey | Get detailed info for troubleshooting: CPU-Z | GPU-Z | HWiNFO64 | Speccy | Pastebin | Recover the data on your crashed hard disk! | I'm a Total Geek
    Forum BBCode Rainbow text generator
  • KnorthKnorth Members Join Date: 2018-02-15 Member: 237662Posts: 4 Fully active user
    Using tools like those a modder might use. It is not my intention to break the EULA so I'll just leave it at that.

    Also, I was motivated to find out why.

    I love Subnautica, I can't get enough of it! I have a game with many small bases; simple three piece habitats with a Scanner Room and some way to power it. I have three "main" bases that are much larger. It's all completely unnecessary. I've finished the game so I decided to use Scanner Rooms to reveal 100% of the world, to make sure I haven't missed a thing.

    At the moment, my game freezes for ~12 seconds when modifying a habitat; I've been forced to halt my endeavor, it is too painful to continue.

    BTW, Your signature is absolutely awesome! All the links!
  • DreadlordDreadlord Members Join Date: 2015-03-31 Member: 202815Posts: 16 Advanced user
    Knorth wrote: »
    It isn't something wrong with your save. This happens to any save, getting worse for each habitat piece added to the world. You are entirely correct that it is an update routine, and the cause of the odd vehicle behavior.

    When a habitat piece is added or removed the game updates the data about the new or removed piece, then it deletes all habitat pieces in the entire world and recreates everything from the updated data. Each time this is done the games goes through a number or large and costly computations, such as, rebuilding the flood groups, hull integrity groups, and power groups. Additional work is done for each of the more complicated pieces, such as Scanner Rooms and Moonpools.

    Again, this is done for every habitat, every piece, in the entire game world, regardless of where or to what the new or removed piece actually connects!

    Yeah the save was for the devs to test and find out stuff.
    That is as much as I though. You can actually see if if you build something in the corridor and you see the moonpool. If the moonpool has a seamoth in it, you can see it despawn and re-spawn (indicating that the room is rebuildt) for each time an object is moving from finished state to unfinished or the other way around.
  • KnorthKnorth Members Join Date: 2018-02-15 Member: 237662Posts: 4 Fully active user
    The problem appears to be fixed in the experimental build!!

    Experimental Changes note that is probably related:
    59892 /main 2018-02-14 17:20:18 Igor Popov Reduced hitching when rebuilding a base
    0x6A7232
  • CaiobrzCaiobrz BrazilMembers Join Date: 2018-02-01 Member: 236501Posts: 67 Advanced user
    Knorth wrote: »
    It isn't something wrong with your save. This happens to any save, getting worse for each habitat piece added to the world. You are entirely correct that it is an update routine, and the cause of the odd vehicle behavior.

    When a habitat piece is added or removed the game updates the data about the new or removed piece, then it deletes all habitat pieces in the entire world and recreates everything from the updated data. Each time this is done the games goes through a number or large and costly computations, such as, rebuilding the flood groups, hull integrity groups, and power groups. Additional work is done for each of the more complicated pieces, such as Scanner Rooms and Moonpools.

    Again, this is done for every habitat, every piece, in the entire game world, regardless of where or to what the new or removed piece actually connects!

    If that is true, as a computer analyst I have to say that is probably one of the worst pieces of code I have seen in a while .... I always wondered how bad the code should be to hang so much on an i7 just to add a component to a list and add/subtract hull integrity and update possible list of flooded floors and/or energy surplus, but rebuilding the entire game is ... well, like you said, let's leave at that.
  • candymancancandymancan Members Join Date: 2018-02-16 Member: 237728Posts: 3 Fully active user
    edited February 2018
    I have the same problem. anytime i destroy or build something the game jerks on the last 1% and everything resets itself. Meaning the seamoth and prawlers fall out of the moonpool but then go right back in, my nuclear reactors shut down then turn back on.. all within a split second.


    Another bug i noticed is when you make your base bigger the newer buildings have stilts, your older buildings the stilts retract and go away making the base look silly...

    I have 16gb of ram, I7 4790k an SSD and a r9-290 tri-x...

    Why is everything resetting when you build something ? Like someone said above i guess its the code of the game.. im not a code writer at all.. but even i noticed everything resets itself when you build or remove something..

    This is a really cool game, and ive spent 10s of hours just building my base but it seems like there is a limit to how big you can make it.. And mine isnt really that big so this is kinda a bummer.. I have two moonbays, 5 general purpose buildings, and the rest are just corridors.

    Its 2018 not 2001 where things should be limited.. With how powerfull computers are being 4-8-16 cores and howe much memory we have youre buildings shouldnt be limited to say 50 stilts and then dissapear when you build something new
  • candymancancandymancan Members Join Date: 2018-02-16 Member: 237728Posts: 3 Fully active user
    I also noticed this stuttering bug or bad coding or whatever you guys call it, since it "Refreshes building" or rebuilds them.. The stilts on the buildings sometimes dissapear.. as i was expanding my base i noticed half my base the stilts were gone..

    I thought it was because i expanded too big.. but i built a general purpose building away as a guinea pig a few feet away from my base, as the building completed the game did its stutter at the last 1% and my stilts extended. I then added a new building connected to my base and as the 1% stutter came my stilts well some disspeared again.. So then i started to deconstruct my guinea pig building and the 1% stutter came.. and the stilts extended back down.

  • TheQwertiestTheQwertiest Members Join Date: 2018-02-17 Member: 237786Posts: 3 Fully active user
    Knorth wrote: »
    The problem appears to be fixed in the experimental build!!

    Experimental Changes note that is probably related:
    59892 /main 2018-02-14 17:20:18 Igor Popov Reduced hitching when rebuilding a base
    Second that. Stuttering is greatly reduced on experimental branch (from a few second to a few milliseconds) on my base.
  • 0x6A72320x6A7232 USMembers Join Date: 2016-10-06 Member: 222906Posts: 5,270 Advanced user
    Caiobrz wrote: »
    Knorth wrote: »
    It isn't something wrong with your save. This happens to any save, getting worse for each habitat piece added to the world. You are entirely correct that it is an update routine, and the cause of the odd vehicle behavior.

    When a habitat piece is added or removed the game updates the data about the new or removed piece, then it deletes all habitat pieces in the entire world and recreates everything from the updated data. Each time this is done the games goes through a number or large and costly computations, such as, rebuilding the flood groups, hull integrity groups, and power groups. Additional work is done for each of the more complicated pieces, such as Scanner Rooms and Moonpools.

    Again, this is done for every habitat, every piece, in the entire game world, regardless of where or to what the new or removed piece actually connects!

    If that is true, as a computer analyst I have to say that is probably one of the worst pieces of code I have seen in a while .... I always wondered how bad the code should be to hang so much on an i7 just to add a component to a list and add/subtract hull integrity and update possible list of flooded floors and/or energy surplus, but rebuilding the entire game is ... well, like you said, let's leave at that.

    @Caiobrz if you want to look at some of the code, head over to the Modding Discord and they can probably help you access it. IIRC it's C#
    UWE Community guidelines | Guide to play in VR with Google Cardboard or Gear | Increase Subnautica view distance | Useful info to post with error reports | Recovery of corrupted saved games | How to easily update your drivers
    Crashing, lag problems? Or maybe your old save didn't get the latest update? Upload your saved game folder to help the devs troubleshoot, then try clearing your cache directories | Automatic Cache cleaning tool here | How to use the Debug Console | How to play any version of Subnautica using Steam | Tips for Subnautica beginners | Why can't the devs "just fix it"? - a modding session for you to educate yourself with Want more frames? Try adding this to your launch options: -window-mode exclusive | Solve options not saving or black screens by deleting options file | Possible workaround for Pause / Menu Bug | Rescue a trapped Seamoth / PRAWN
    Slow loading / textures popping in? Try moving Subnautica to an SSD | How to switch Subnautica to Experimental mode (clear cache afterwards) | How to run chkdsk on your drive | How to verify integrity of your game cache (in the "Installation" section) | Blue screens or computer freezing up? Try this fix (updates a corrupted DX10 compatibility file in the graphics driver that sometimes doesn't get updated)
    Subnautica launches in a tiny window? Use Task Manager to Maximize it (Thanks FlippingPower) | How to place your Moonpool so it connects correctly (includes diagrams) | Want to hang out with fellow players and the devs? Subnautica Discord server ← swing on by! | SuspensionRailway's Modding Emporium Categorized list of mods, including 1st playthrough-friendly Hey, look, mods! ReShade mods Subnautica NexusMods | TERRAFORMING mod
    Humans don't crush at the depths you might think
    Joystick problems? | Xpadder | UJR / vJoy | JoyToKey | Get detailed info for troubleshooting: CPU-Z | GPU-Z | HWiNFO64 | Speccy | Pastebin | Recover the data on your crashed hard disk! | I'm a Total Geek
    Forum BBCode Rainbow text generator
  • SaradorieSaradorie Members Join Date: 2018-02-18 Member: 237847Posts: 7 Fully active user
    I have the same issue, however the lag only occours when building componants onto a large base i'm building. (Creating a pipeline from the lifeboat to the lava zone) Building an unconnected structure near my base has no lag, so I assume the lag is the result of calculating the structural integrity of the new whole base. I removed all my power producers with no affect on the lag, so I don't think that has anything to do with it.
  • romi1996romi1996 Ha NoiMembers Join Date: 2017-12-21 Member: 234531Posts: 10 Fully active user
    I have the same issue too , sometimes , I can see SEAMONTH re-dock into Moonpool
  • m0nk3nm0nk3n subnauticaMembers Join Date: 2018-02-11 Member: 237402Posts: 33 Advanced user
    Dreadlord wrote: »
    Subnautica Version - 59783

    Pictures or Video - https://clips.twitch.tv/BeautifulGiftedMooseDoritosChip (if you need a better video recorded that describes all of this, let me know)
    Image of the time graph option when finishing the build: https://imgur.com/a/AyrwF

    can u maybe take pictures of this mega build? i had\have the same idea that i wanna build all the way down to, or atleast a long way down towards the "end portal"..
  • subnautica1434subnautica1434 nowhereMembers Join Date: 2018-02-24 Member: 238197Posts: 7 Fully active user
    I saw this said "Newest DEVELOPER posts" so I would love to ask the date that subnautica will release on the ps4?
    PLEASE PLEASE PLEASE TELL US or I will do nothing but switch to Xbox but it is TOO MUCH MONEY!
    so please tell us the planned release date for subnautica on the Xbox.
  • DefenderX1DefenderX1 Members Join Date: 2017-07-23 Member: 231990Posts: 10 Fully active user
    Well, I guess we know what the culprit is. Any code that constantly concatenates upon itself is just asking for trouble. It's like having a potential infinite loop and thinking it's ok.

    I've also experienced this. I thought it'd be neat to continued IGP's endeavor of building a base at the bottom of the void. I did it, but omg it was painful. I got to the point where not only did I get a gave freeze of 15-20 seconds for every piece of base structure (modules, reinforcements, anything that changes the bases "structure") but also PLACING pieces became a slideshow of around .05 fps. (And no, that's not just a guess. That's based upon the fact that it took me ~20s from the point that I clicked a module piece like a hallway to when the frame would update.)
  • m0nk3nm0nk3n subnauticaMembers Join Date: 2018-02-11 Member: 237402Posts: 33 Advanced user
    think of it like a building block and that the base is the only entity in the game that grows kinda. everytime you build something the game have to build it into the game itself making the code bigger and bigger. so in a sense it's not really limited to an infinite loop, it would rather make the game more prone to crashes and worse; that the save game gets corrupted.
  • CaiobrzCaiobrz BrazilMembers Join Date: 2018-02-01 Member: 236501Posts: 67 Advanced user
    Just to let you all know this bug is REALLY fixed on the experimental batch. I am playing on it and I have a huge base over 100 modules and there is less than 1 second hang if I add/remove a module (were 10 seconds before)
  • DefenderX1DefenderX1 Members Join Date: 2017-07-23 Member: 231990Posts: 10 Fully active user
    m0nk3n wrote: »
    think of it like a building block and that the base is the only entity in the game that grows kinda. everytime you build something the game have to build it into the game itself making the code bigger and bigger. so in a sense it's not really limited to an infinite loop, it would rather make the game more prone to crashes and worse; that the save game gets corrupted.

    I wasn't likening the issue itself to an infinite an infinite loop. More to the knowledge your code could create one but not doing anything about it until there's an issue/someone complains.

    The devs must've known that this would be a potential issue with that design methodology. People have been creating crazy big bases for quite some time. It's gonna come back & bite them, it was just a matter of time.
  • DreadlordDreadlord Members Join Date: 2015-03-31 Member: 202815Posts: 16 Advanced user
    edited February 2018
    Caiobrz wrote: »
    Just to let you all know this bug is REALLY fixed on the experimental batch. I am playing on it and I have a huge base over 100 modules and there is less than 1 second hang if I add/remove a module (were 10 seconds before)

    Nice to know. Any word on when this will be patched out to live branch?
    Also, will it work on existing save games?
  • Base_builder_09782Base_builder_09782 Members Join Date: 2018-01-29 Member: 236135Posts: 27 Advanced user
    I have the same problem but on Xbox
  • QuigsterQuigster United StatesMembers Join Date: 2018-02-24 Member: 238188Posts: 5 Fully active user
    Having the same issue on PC here. Lag gets longer the larger the base is. Running about 10-12 seconds right now with any component change, and one huge lag that caused a crash to desktop.
  • DreadlordDreadlord Members Join Date: 2015-03-31 Member: 202815Posts: 16 Advanced user
    Still not fixed as of Update 84. Is this still in experimental?
    If so, will it be part of next update?
    I would love to keep on playing and streaming, but with more than 7 secs of freeze every time I do anything on the base, it is neither playable nor streamable.
  • QuigsterQuigster United StatesMembers Join Date: 2018-02-24 Member: 238188Posts: 5 Fully active user
    The update fixed it for me...for the most part. Still a slight lag at the end of constuction, or before starting destruction of a piece, but much better.
  • AnomalyDetectedAnomalyDetected Alterra Housing District: Planet VicaronMembers Join Date: 2017-04-19 Member: 229741Posts: 770 Advanced user
    Quigster wrote: »
    The update fixed it for me...for the most part. Still a slight lag at the end of constuction, or before starting destruction of a piece, but much better.

    This is happening because the base mechanics load the interior as a separate model. This is how they're all connecting. This creates lag on lower end PCs due to the swap of models, which can lag like hell on PCs with a lower end graphics card and CPU.

    As for fixes, I cannot help.
    ================Anom================
    "I'm ashamed, I'm to blame,
    Don't wanna think about it,
    Who I am, what I've done?
    How do I carry on?
    Wanna change, turn the page,
    Don't wanna think about it,
    How do I undo what's done?"
    - "Undone" Five Finger Death Punch
    ================Anom================
  • DreadlordDreadlord Members Join Date: 2015-03-31 Member: 202815Posts: 16 Advanced user
    Quigster wrote: »
    The update fixed it for me...for the most part. Still a slight lag at the end of constuction, or before starting destruction of a piece, but much better.

    This is happening because the base mechanics load the interior as a separate model. This is how they're all connecting. This creates lag on lower end PCs due to the swap of models, which can lag like hell on PCs with a lower end graphics card and CPU.

    As for fixes, I cannot help.

    Well if that was the case I wouldn't really have any issues. I have a strong pc that should not have any issues with running this game at all.
    Also if you read my original post you would see that I have no issues what so ever with anything except when I construct or deconstruct something.

    pc specs:
    Processor: Intel(R) Core(TM) i7-7800X CPU @ 3.50GHz (12 CPUs), ~3.5GHz
    Memory: 32768MB RAM
    gfx Chip type: GeForce GTX 1080 Ti
Sign In or Register to comment.