frankvHoof93 / TikTokLiveSharp

Port of TikTok live library for C#
https://vanhoof.dev
Other
140 stars 28 forks source link

Random crashes during streams #12

Closed frankvHoof93 closed 8 months ago

frankvHoof93 commented 1 year ago

Unity will sometimes crash during a stream (hard crash).

frankvHoof93 commented 1 year ago

Identified: These crashes seem to be related to texture-downloads, as the crash-log will often include a "(Unity) DownloadHandlerTexture::OnFinishReceiveData" in their stack-trace. Currently testing with texture-downloads disabled.

Edit: Disabling texture-downloads in the sample-code seems to resolve this. Could also be related to the WebP-library?

frankvHoof93 commented 11 months ago

Still crashes even with extended try-catch added.

Stacktrace from crash:

0x00007FF63A11C5FD (Unity) DownloadHandlerTexture::OnFinishReceiveData 0x00007FF639DCB27D (Unity) UnityWebRequestProto<UnityWebRequestTransport,AtomicRefCounter,RedirectHelper,ResponseHelper,DownloadHandler,UploadHandler,CertificateHandler,HeaderHelper,AsyncOperation>::Finalize 0x00007FF639DC8268 (Unity) UnityWebRequestProto<UnityWebRequestTransport,AtomicRefCounter,RedirectHelper,ResponseHelper,DownloadHandler,UploadHandler,CertificateHandler,HeaderHelper,AsyncOperation>::Job_ExecuteUnityWebRequest 0x00007FF6394C3480 (Unity) JobQueue::Exec 0x00007FF6394C5791 (Unity) JobQueue::Steal 0x00007FF6394C38D5 (Unity) JobQueue::ExecuteJobFromQueue 0x00007FF6394C3EAF (Unity) JobQueue::ProcessJobs 0x00007FF6394C609F (Unity) JobQueue::WorkLoop 0x00007FF6396C6AF7 (Unity) Thread::RunThreadWrapper 0x00007FFF39117614 (KERNEL32) BaseThreadInitThunk 0x00007FFF3A9626F1 (ntdll) RtlUserThreadStart

frankvHoof93 commented 10 months ago

Potentially related to: https://issuetracker.unity3d.com/issues/downloadhandlertexture-crashes-if-it-downloads-invalid-texture-data

Could also be fixed in Unity 2021.3.21: https://forum.unity.com/threads/downloadhandlertexture-crash-on-unity-2021-3.1412661/

frankvHoof93 commented 8 months ago

Resolved (kind of. Resolved by Unity)