Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by Aleksandar204 · May 29, 2020 at 08:39 AM · memory managementmemory usagememory leak

GfxDriver memory issue on PC [SOLVED]

Edit: Upgrading project to version 2020.1b10 solves the problem

I'm making a game that needs a day/night cycle and i created a script that just slowly turns the directional light by 0.5 degrees every couple of frames. I noticed that after a few minutes the game freezes for a few seconds or just crashes. Looking at the memory profiler I noticed that GfxDriver was constantly taking more and more memory and only stopped when i paused the game or disabled the rotation of the directional light. Below that, it says that every time the light moves, a new texture is created. Are those shadowmasks or something? Is there anyhing that can delete those old textures to free up memory? Resources.UnloadUnusedAssets(); doesn't help and neither does System.GC.Collect(); (found those two in the anwers from simmilar questions)

Info about the project(idk what here is useful, im still learning stuff):

Unity version 2019.3.5f1

HDRP 7.1.8

All lighting is set to realtime

8GB DDR4 RAM

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image SteenPetersen · May 29, 2020 at 05:15 AM 0
Share

Hi @Aleksandar204

I would really need to take a look at some code in order to assist you. I understand that updating to 2020 has helped alleviate the issue but please do post the code as this should not happen. I think that you may have some sort of the endless loop running somewhere that is causing the issue. It is extremely rare that you would want to call GC.Collect().

avatar image Aleksandar204 SteenPetersen · May 29, 2020 at 06:37 PM 0
Share

Here's the code that caused this:

 void Update()
     {
         if(move > 10)
         {
             transform.rotation *= Quaternion.Euler(Vector3.right / 50);
             
             move = 0;
         }
         move += Time.deltaTime * speed;
             
     }


This is the only code attached to the directional light in question. I remember seeing the pachnotes for 2020.1 beta and I saw this: Graphics - General: AsyncGPUReadback.Request never releases unused allocated memory (1234193) so maybe this is what fixed it.

avatar image SteenPetersen Aleksandar204 · May 29, 2020 at 06:54 PM 0
Share

good find, I think you are correct =)

$$anonymous$$aybe post an answer to your own question and mark it correct so others can find it.

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Aleksandar204 · May 30, 2020 at 09:39 AM

Problem is solved by upgrading to Unity version 2020.1b10 (or later). The bug in question was specified here

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

203 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

What is the correct way to store circular references in Unity? 1 Answer

Run out of memory in build 1 Answer

Memory usage increase when voxels deleted?! 0 Answers

Clear Color32[] array from memory? 0 Answers

OPEN WORLD GAME QUESTION 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges