Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Started small scene, paused, about 30-45 minutes later PC ran out of memory and locked up

Discussion in 'Physics Previews' started by MostHated, Sep 10, 2019.

  1. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
    Hey there,
    I am not sure how and it would probably be hard to narrow down, but I have a small scene I have been working on and at the time it had one vehicle entity in it in which was being moved via a job. The vehicle has MeshRenderer, PhysicsShape, and PhysicsBody on it. I had the Physics Settings scene object from the Sample scene as well as the mouse interaction script. I had started the scene, spawned a vehicle and was just letting it roam around as I wanted to see how things would turn out after a while because I noticed when I had multiple vehicles, after a minute or so they would all start to nose dive at the same angle through the single ground plane collider I had as a floor.

    I started it up, but my wife needed my help with something so I paused it and headed up stairs, had dinner and had sat back down at the PC and had forgotten about it until the PC started to bug out, I looked at my memory usage and it was at 99-100%. I tried to catch the stop button in time, but the PC killed my user session before I could.

    I mostly just wanted to report the incident so that it was known. I am pretty sure it was because of the recent addition of physics to my project, as I let my system run with 50,000 vehicles for an hour the other day just to see how it would react and see if anything ended up bugging out and it held fine the whole time without any memory leaks or anything and I just added in the physics package and the few physics objects to my scene either yesterday or last night.

    Thanks,
    -MH
     
  2. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    Usually, I disable or better take out bunches of game objects that doesn´t trigger the bug until I get with one game object or component that trigger the bug. It can be as for example a join component with new parameters. Sometimes is difficult to debug some problems when take time. But is the only way I found to be sure before making a bug report. If you make a difference between projects you can look if some components parameters have changed and exclude does that are the same.
     
  3. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
    Oh, I am with you, I am just more surprised that this occurred while everything the editor was paused. I tested after it happened to make sure systems were paused when the editor was and it certainly didn't look like they should have still been running, but I don't know exactly what ends up happening behind the scenes.
     
  4. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    It can be more than one issue. By default, Unity + Windows 10 + other running is using 8Gb ram. If Windows make an update, it goes up.

    How much ram do you have installed on your PC?
    Can you post here Hardware characteristics?

    By the way 50,000, vehicles I wish a screenshot!! lol
     
    Last edited: Sep 10, 2019
  5. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
    My system specs are as follows. Updates are done manually. At the time this occurred, nothing else was happening on my system.

    Code (CSharp):
    1. OS: Ubuntu 19.04 x86_64
    2. Host: MS-7B79 2.0
    3. Kernel: 5.0.0-27-generic
    4. Uptime: 2 days, 7 hours, 21 mins
    5. Packages: 3653 (dpkg), 14 (flatpak), 10 (snap)
    6. Shell: zsh 5.5.1
    7. Resolution: 1920x1080, 2560x1080, 1920x1080
    8. DE: GNOME 3.32.2
    9. WM: GNOME Shell
    10. WM Theme: Pop
    11. Theme: vimix-dark-laptop-ruby [GTK2/3]
    12. Icons: Adwaita [GTK2/3]
    13. Terminal: alacritty
    14. Terminal Font: Source Code Pro
    15. CPU: AMD Ryzen 5 2600 (12) @ 3.400GHz
    16. GPU: NVIDIA GeForce RTX 2070
    17. Memory: 7266MiB / 32175MiB


    Here was running with 50k
    https://i.imgur.com/a91Ky6O.gifv

    Then here was a screenshot with 100k



    Then a random one with the physics in place running in editor.

    https://i.imgur.com/sQMS10P.gifv
     
    Last edited: Sep 10, 2019