(26-02-2020, 04:05 PM)jp715 Wrote: Did you get the message "libOni.dll caused an Access Violation" in your error log? If so, I think I had a similar issue, although mine was caused by switching gameobject from active to not active, then back to active.
I think it was caused by the SortedPoints array of the SkinnedCloth component not being properly initialized before the updater/solver tried to use it to run BeginStep or SubStep. The order of operations can be a little hard to track, since LateFixedUpater uses coroutines. I don't know if this will help for your problem, but my fix was to enable/disable the gameobject with the cloth attached in a coroutine, after waiting for the end of a frame, this seemed to make sure that the skinned cloth component had time to fully run through one update/late update cycle to make sure everything was fully initialized.
Thanks for the info. Yes, I did get that message in the error.log:
libOni.dll caused an Access Violation (0xc0000005)
in module libOni.dll at 0033:3b4d3d76.
I can't tell for sure if your suggestion is related to my problem. I've narrowed down my case to occurring when deactivating gameobjects with obi cloth, but doing so in a coroutine after WaitForEndOfFrame does not fix the problem. It still randomly crashes.