Search Unity

Bug Why Unity has a stroke every time I try to change shaders?

Discussion in 'Editor & General Support' started by Alixar, Feb 24, 2021.

  1. Alixar

    Alixar

    Joined:
    Mar 13, 2019
    Posts:
    50
    I'm on Unity 2020.2.6f1 (but I had the same issue all along with 2020.2). I just can't change most of the shaders unless I wait for 3-4 minutes, if I switch focus to use those 3 minutes for something better then I have redo the whole process again.

    Is there any way to make the dropdown work as it's supposed to? That is: you click and it opens is less than a geological era?

    upload_2021-2-24_18-52-23.png

    Thank you
     
  2. Havokki

    Havokki

    Joined:
    Jun 28, 2015
    Posts:
    118
    https://forum.unity.com/threads/lots-of-busy-hold-on-etc.833644/
    There's a long discussion about these "Hold on" progress bars. Apparently many people are having this issue, but not all, since we for example migrated all our projects to 2020.x and we have yet to see this issue. So it could be some specific situation that causes it.

    Have you tried checking the profiler? Open that, change it's target to editor and try changing the shader. Maybe that will give some light to the issue. Then you should report a bug.
     
  3. Alixar

    Alixar

    Joined:
    Mar 13, 2019
    Posts:
    50
    Thanks for pointing me to the right thread, I feel less alone now. The profiler doesn't seem to help, both the local instance and the one launched as separate process just freeze for the entire duration of the "Hold on" progress bar, I did a few test but the iteration time is quite long, around 3m and 20s per click.

    upload_2021-2-25_14-6-21.png
     
  4. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,452
    Does it show that long frame afterwards or just drop it? Or in which way does it not help? Does it help to look at that long frame in Hierarchy view (as opposed to Timeline view)?
     
  5. Alixar

    Alixar

    Joined:
    Mar 13, 2019
    Posts:
    50
    Hi Martin,

    I managed to find it after a few tries on frame 130, please see below. I saved the trace if you'd want to look at it (let me know I can send it to you if you'd like) but it doesn't look very informative as it stops on a DoDispatch();

    upload_2021-2-25_14-28-20.png
     
    MartinTilo likes this.
  6. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,452
    If you turn on "Deep Profile" you could get more information on this. It might be worth filing a bug report on this as it looks like something that should be investigated by us and likely get at least some more Profiler Markers to clarify what is going on here, without needing of Deep Profiling.

    For that bug report, attaching the profiler data would be helpful :)
     
  7. Alixar

    Alixar

    Joined:
    Mar 13, 2019
    Posts:
    50
    I went deep into the rabbit hole and it looks like... It's something inside ShaderUtil.GetAllShaderInfo().
    Is there a way to open a bug without submitting the entire project by any chance?

    Thanks for your support @MartinTilo

    upload_2021-2-25_18-22-19.png
     
  8. Alixar

    Alixar

    Joined:
    Mar 13, 2019
    Posts:
    50
    Bug submitted, I'll update this post if there's any news!
     
    MartinTilo likes this.