Burst builds crashing on throw System.Exception in 2020.1

Wasn’t sure the best place to ask about this but I know the burst team monitors this forum.

Is is expected with burst 1.3.3 for exceptions to hard crash in builds? throw with and without any arguments to System.Exception causes a crash.

All exceptions in burst will cause a crash at runtime, has been the case as long as I remember.

Probably not desirable but not really a deal breaker.

Yes this is the expected behaviour. Burst aborts when encountering exceptions in builds for performance reasons.

Exceptions in DOTS are not used for error handling. If you need to handle errors you should return error codes / return values. Exceptions are used in the editor for handling incorrect input to methods (Coding errors) in the player we log the exception and abort.

1 Like

It seems strange to me that burst would incur a penalty for the feature, if the path isn’t even hit. If there is a technical reason even just not worth the effort fine. If it’s an attempt to save users from themselves which I can’t help but suspect given past history, I’d rather not see that. DOTS not using exceptions makes perfect sense. End user scenarios is a different thing really.

Supporting exceptions in Burst would result in:

  • Slower generated bursted code
  • Significantly larger bursted code in deployment
  • Setting up jmp tables in burst on some platforms has real measurable cost in jobs
3 Likes