mrayy / mrayGStreamerUnity

GStreamer Integration with Unity using a Native plugin
MIT License
111 stars 38 forks source link

Crash!!!! #46

Open QiaoJingjing opened 1 year ago

QiaoJingjing commented 1 year ago

In the recent use process, I always randomly encountered flashbacks, and it was found to be related to gstreamer by catching exceptions, what may be the reason for this sending?

========== OUTPUTTING STACK TRACE ==================

0x00007FFFA6B79F8B (nvwgf2umx) OpenAdapter12 0x00007FFFA5C3DF80 (nvwgf2umx) NVDEV_Thunk 0x00007FFFA640EA31 (nvwgf2umx) NVDEV_Thunk 0x00007FFFA63FDE77 (nvwgf2umx) NVDEV_Thunk 0x00007FF8022B4057 (d3d11) CreateDirect3D11SurfaceFromDXGISurface 0x00007FFFC33743BB (GStreamerUnityPlugin) UnityPluginUnload 0x00007FFFC336FCF3 (GStreamerUnityPlugin) LogManager::~LogManager 0x00007FFFC336F320 (GStreamerUnityPlugin) mray_gst_customPlayerBlitImage 0x00007FFFC336ECBB (GStreamerUnityPlugin) mray::video::GstNetworkMultipleVideoPlayer::SetRecordToFile 0x00007FF6C7CEF402 (Unity) GfxDevice::InsertCustomMarkerCallback 0x00007FF6C953E474 (Unity) GfxDeviceWorker::RunCommand 0x00007FF6C9544A2D (Unity) GfxDeviceWorker::RunExt 0x00007FF6C9544B48 (Unity) GfxDeviceWorker::RunGfxDeviceWorker 0x00007FF6C7C0A837 (Unity) Thread::RunThreadWrapper 0x00007FF81F8755A0 (KERNEL32) BaseThreadInitThunk 0x00007FF82134485B (ntdll) RtlUserThreadStart

========== END OF STACKTRACE ===========

mrayy commented 10 months ago

Something is wrong with the stack trace, I can't see how SetRecordToFile calls mray_gst_customPlayerBlitImage. Is this reproducable bug? please provide more context into how to reproduce this.

What is gstreamer/unity version you are running with?

QiaoJingjing commented 10 months ago

Thank you for your reply.

This is a relatively old problem, and my initial test results at the time were related to port occupancy, when starting gstreamer did not release the associated resources properly, there is a high probability of this problem occurring when the same port is used again. Now I've released resources step by step, and each time I start gstreamer, I reacquire an unused port, significantly reducing the probability of a Crash. Occasionally, of course, this happens.

gstreamer version:1.20.1 Unity version 2021.3.4f1c1