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

Unity consuming 100% CPU after assigning probePositions a few times (Case 1098735)

Discussion in '2018.3 Beta' started by hippocoder, Nov 7, 2018.

  1. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Hi,

    I assign probe positions in code after building up a list. But in recent betas I've noticed each time I assign an array of probes, Unity gets progressively higher CPU usage until it becomes unresponsive.

    Each time I assign probePositions with probeList.ToArray(), Unity consumes another 20% of CPU time that never goes away.

    So after a few runs of the tool, it reaches 100% and eventually requires task manager to kill it. I have tried assigning random probes from a Vector3[] array and it doesn't occur! It's really quite an odd bug and I'm casting feelers out to see if anyone else is having this problem? It also occurs in 2019.1 beta 8.

    Stressful and I'm struggling to create a repro for it.
     
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    HUH!

    I believe I've found it, finally. when checking the probe positions by logging a few thousand (!) of them I noticed a bunch of NaN positions were in the array. These will cause Unity CPU time to rise and never fall.

    (Case 1098735)
     
    Peter77 likes this.
  3. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,132
    You got a reply from QA.