SuRGeoNix/Flyleaf

Memory Leakage

Closed this issue · 11 comments

【v3.7.48】Opening multiple streams in the same application results in a continuous increase in memory until the program crashes, log is not have error, but Opening single streams it is no problem.

Once again @cxgym by trying to describe an issue with 1 line and expecting me to understand it and fix it makes no sense.

I can only describe the problem I encountered because there is no valuable reference in the logs. Opening multiple streams in an application is normal if software is used to decode it. If I enable D3D hardware acceleration, it will run normally on some machines, while running on another machine will cause memory leakage. However, opening only one stream is not a problem

I suspect there is a thread safety issue here

Hope to give me tips, thanks.

Check this #450 and this #448

Is it because of a problem with the gpu driver?

GPU 0
Intel(R) Iris(R) Xe Graphics
Drive Version: 31.0.101.4953
Drive Date: 2023/11/7
DirectX Version: 12 (FL 12.1)
it is memory leakage

GPU 1
Intel(R) Iris(R) Xe Graphics
Drive Version: 27.20.100.8984
Drive Date: 2020/11/19
DirectX Version: 12 (FL 12.1)
it is right

From what other users said in the past is seems that is related with intel integrated graphics. Not sure if that's intel's issue or the combination of Intel/WPF. I was not able to reproduce it myself yet.

cxgym commented

Config.Decoder.ZeroCopy = FlyleafLib.ZeroCopy.Enabled;
It can indeed solve my problem. but it will affect other functions?

Thanks interesting. The only problem by forcing ZeroCopy it would be that you will have visible codec's padding pixels at the sides. (eg. full row of green pixels at the bottom of the frame). By checking the source code it seems that intel driver has the issue with the CopySubresourceRegion. Another open intel issue possible related is this https://community.intel.com/t5/Developing-Games-on-Intel/Memory-leaks-on-Intel-Iris-Xe-graphics/td-p/1585566