Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

VisualEffect.Stop() or setting Spawn Rate = 0 causes crash on Android.

Discussion in 'Visual Effect Graph' started by Lance-Grooms, Sep 25, 2020.

  1. Lance-Grooms

    Lance-Grooms

    Joined:
    Mar 24, 2016
    Posts:
    26
    Desired effect: Stop spawning and let existing particles die out naturally.
    Tried two methods: VisualEffect.Stop() or setting Spawn Rate = 0 via an exposed parameter (or a vary low rate like 0.1f). Both methods failed on Android.
    Observed effect: Works fine in editor. On Android (Pixel 2 and 3 tested), the app crashes once all existing particles are gone. (In other works, at some random point in the future. Very rough debugging session.)


    2020/09/24 21:01:18.392 10902 10926 Info Unity ******************** Stopping True

    After stopping, a few seconds later I get one or more of these:

    2020/09/24 21:01:20.692 10902 10955 Warn Adreno-GSL <gsl_ldd_control:549>: ioctl fd 58 code 0xc040094a (IOCTL_KGSL_GPU_COMMAND) failed: errno 71 Protocol error
    2020/09/24 21:01:20.692 10902 10955 Warn Adreno-GSL <log_gpu_snapshot:458>: panel.gpuSnapshotPath is not set.not generating user snapshot

    And then these:

    2020/09/24 21:01:21.682 10902 10955 Warn Adreno-GSL <gsl_ldd_control:549>: ioctl fd 58 code 0xc040094a (IOCTL_KGSL_GPU_COMMAND) failed: errno 35 Resource deadlock would occur
    2020/09/24 21:01:21.682 10902 10955 Warn Adreno-GSL <log_gpu_snapshot:458>: panel.gpuSnapshotPath is not set.not generating user snapshot

    At which point the screen freezes up.

    This is such an obvious edge case and common use case, I'm guessing I'm doing something wrong? And if not, what's the best work-around?
     
  2. PaulDemeulenaere

    PaulDemeulenaere

    Unity Technologies

    Joined:
    Sep 29, 2016
    Posts:
    107
    Hello,

    Indeed, it seems to be an obvious case and we don't have report (yet ?) about this issue in VFX.

    Are you using the default particles system ? Did you try to switch the blending mode from alpha to additive (it disables the sorting and indirect drawing, it could eventually help us to reduce the scope of this issue) ?

    Otherwise, can you submit your repro project through the bug report tool ?
     
  3. linfuqing

    linfuqing

    Joined:
    May 11, 2015
    Posts:
    156
    I have the same issue.
    And it's find if I turn alpha to additive.
    My VEG version is 10.9.0