You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that changing any user script while the player is running will cause the Unity editor to crash or hang until the kinect device is disconnected. I think this is something to do with the disposal and rejoining of the kinect driver thread, probably as it is still accessing a native plugin? Unfortunately my c# threading / GC knowledge is fairly limited so I cant immediately see what is wrong with the current code / method.
To reproduce crash:
make a new empty c# script / monobehaviour
run the app
make a minor change to the script file and return to the editor.
Editor crashes or hangs until the azure kinect is disconnected from the computer.
This happens regardless of the user settings for player behaviour on script changes.
unity 2019.3.14f1
The text was updated successfully, but these errors were encountered:
I try to avoid it too but sometimes forget. The crash still happens if you disable script recompilation while running (and select stop play first, or recompile after stop) which seems odd.
My implementation with OnEnable and OnDisable seems to get around the issue for now but I wish there were more places to read about what unity does when a script file changes or how to properly / safely integrate external API's like the Azure Kinect.Sensor
Thanks
keijiro
changed the title
Unity Editor crashes on recompile from script change.
Unity Editor crashes on script recompilation while playing
Oct 7, 2021
Hi Keijiro.
It seems that changing any user script while the player is running will cause the Unity editor to crash or hang until the kinect device is disconnected. I think this is something to do with the disposal and rejoining of the kinect driver thread, probably as it is still accessing a native plugin? Unfortunately my c# threading / GC knowledge is fairly limited so I cant immediately see what is wrong with the current code / method.
To reproduce crash:
This happens regardless of the user settings for player behaviour on script changes.
unity 2019.3.14f1
The text was updated successfully, but these errors were encountered: