Search Unity

Game freeze in DetailRenderer::Render() on iOS

Discussion in 'iOS and tvOS' started by jxfzlmb002, Oct 15, 2019.

  1. jxfzlmb002

    jxfzlmb002

    Joined:
    Oct 12, 2019
    Posts:
    2
    We update Unity from 2017.5.2 to 2019.2.1, the terrain detail seems not work stably.
    When camera move fast, the game will freeze randomly for seconds. Sometimes it will recover to nomal after several second, sometimes it just stuck forever.
    In 2017.5, this will not happen. With terrain detail disabled, stop happen. Reduce other object in scene will reduce the chance of freeze, but still happen.
    I tried change the resolution of grass and per patch param, change the grass mesh, redraw the grass texture, still happen.

    I use xcode profile, get this:

    The red arrows point out the freeze time. Main thread and Gfx thread is full load.
    upload_2019-10-15_20-47-31.png

    The main thread stack.
    upload_2019-10-15_20-49-0.png

    The gfx thread stack
    upload_2019-10-15_20-50-2.png

    Looks like it stuck in waiting job queue, but i can't figure out what it is, or how to walkaround.
    Thanks for any help!
     
  2. jxfzlmb002

    jxfzlmb002

    Joined:
    Oct 12, 2019
    Posts:
    2
    Update:
    When I disable multithread render, the freeze won't happen again. It's a way to walk around, but make cpu load high.
    Anyone got a better solution?