-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Big Memory Leak on Windows [Bug] #401
Comments
I should mention, we destroy the CaptureFromTexture object between each recording. And add the component again when it is time to record another. |
Hi We also run in this memory problem on windows. Is there any update on above? |
Not at the moment. |
Hi @JavenRT and @richard12121212, Apologies this has taken a while to look into. I'm testing using Unity 6 (6000.0.31f1), D3D12, latest AVPro Movie Capture (5.3.3 - albeit debug build) and our 'Demo01-TextureCapture' scene in editor. So far I'm not seeing any obvious memory leak - either by making multiple captures within the same play session or play/capture/stop/play/capture/stop etc.. A few questions whilst I keep digging:
Apologies for all the questions but trying to narrow it down.. Cheers, |
@RichRH This turned out to be user error for us we believe. It was found that we had two active Cinemachine brains in the scene which seems to cause the leak. Since fixing this we have not encountered the issue. At the time I had found that it was memory not managed by Unity so it's possible it's still related to this package but not something that can be encountered during normal use. If it helps we did try the latest package available when the bug was reported and we did also disable audio but neither fixed the issue. |
Thanks for the confirmation @JavenRT - good to know no longer an issue for you. Would be great if you could provide any further information (as listed above) @richard12121212.. Cheers, |
yes it seems to happen when we select bigger resolutions for multiple recording streams. |
Unity Version
2023.1.20f1
AVPro Movie Capture Version
5.2.4
Which platform(s) are you using?
Windows
Which OS version(s) are you using?
Windows 11
Which rendering API(s) are you using?
Direct3D 12
Hardware
Processor: 13th Gen Intel(R) Core(TM) i9-13900HX 2.20 GHz
Installed RAM: 32.0 GB (31.7 GB usable)
System type: 64-bit operating system, x64-based processor
Which capture component are you using?
Capture From Texture
Capture mode
Realtime
Which output mode are you using?
Video file
Video codecs
H264
Audio source
Unity
Audio codecs
AAC
Any other component configuration
Frame Rate: 30
Source Texture: camera.targetTexture
Camera Render Resolution: HD_1920x1080
Output Target: Video File
The issue
We use a video recorder script that creates videos using this package, the videos are tours of a room and an audio clip is played through unity over the top. This functions perfectly fine on our Mac platform. On Windows however, it only works well the first time, if a second video is recorded we incur a memory leak of a few hundred mb every second, until we reach max memory and the application crashes. This occurs in builds, but also in editor. On occasion the leak does stop however the accrued memory is not released at any point. Additionally we have had builds were this issue was not present. After memory profiling we can see the memory is classed as untracked memory, meaning it must not be managed by the Unity Memory Management API (attached). It appears in private and system heap. We initially used an older version of the package but after trying the newest one 5.2.4, the issue persisted.
Log output
No response
The text was updated successfully, but these errors were encountered: