Search Unity

Question Bursted jobs exception handling on linux

Discussion in 'Burst' started by wangshut, Oct 9, 2022.

  1. wangshut

    wangshut

    Joined:
    Aug 10, 2022
    Posts:
    3
    Our server is developed by unity, using job system and burst, running on linux. But there was a problem: when some bursted jobs throw exception, the whole server app will be aborted, and we just want the job thrown exception to be terminated, not the whole server app. Is there a way to do that?
     
  2. tim_jones

    tim_jones

    Unity Technologies

    Joined:
    May 2, 2019
    Posts:
    287
    Hi @wangshut - it's expected that in player builds, an exception in a Burst-compiled job or function pointer will bring down the whole app / game. Having looked at our docs though, I think we could make that clearer, so we'll look at that.
     
  3. wangshut

    wangshut

    Joined:
    Aug 10, 2022
    Posts:
    3
    Thank you for the reply. I had known that the whole app will bring down when Burst-complied job thrown exceptions. I just want to find a method of control flow, as when a job thrown exceptions, I can just stop the running job, but not the whole app, because our app is used as a server on linux for multiple clients, we try to avoid it crash as less as possible.
     
  4. tim_jones

    tim_jones

    Unity Technologies

    Joined:
    May 2, 2019
    Posts:
    287
    @wangshut thank you for the feedback - we will take a look at whether we could add some sort of exception handling for server builds, since as you say it's generally undesirable to bring down the whole app just because of an exception in one job. The team is pretty busy at the moment though so I can't promise when that will be looked at.
     
  5. wangshut

    wangshut

    Joined:
    Aug 10, 2022
    Posts:
    3
    Really happy to hear that! And look foward to it!