Unity-Technologies / GenericFrameRecorder

This GitHub package is DEPRECATED. Please get the new Unity Recorder from the Asset Store (https://assetstore.unity.com/packages/essentials/unity-recorder-94079) Use the editor builtin Bug Reporter to report issues. You can track and vote for issues on the Issue Tracker (https://issuetracker.unity3d.com)
MIT License
534 stars 66 forks source link

Recording seems to trigger a memory leak #92

Open artyom-zuev opened 5 years ago

artyom-zuev commented 5 years ago
What happened?

Whenever recording is enabled, the following four errors repeat in the play mode log:

Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak

To Debug, enable the define: TLA_DEBUG_STACK_LEAK in ThreadsafeLinearAllocator.cpp. This will output the callstacks of the leaked allocations

NullReferenceException: Object reference not set to an instance of an object UnityEditor.Recorder.MediaRecorder.RecordFrame (UnityEngine.Recorder.RecordingSession session) (at Assets/Unity Technologies/Recorder/Extensions/MovieRecorder/Recorder/Editor/MediaRecorder.cs:240) UnityEngine.Recorder.RecordingSession.RecordFrame () (at Assets/Unity Technologies/Recorder/Framework/Core/Engine/RecordingSession.cs:131)

A Native Collection has not been disposed, resulting in a memory leak. It was allocated at C:\Work\Unity Projects\PhantomBrigadeCinematics\Assets\Unity Technologies\Recorder\Extensions\MovieRecorder\Audio\Editor\AudioInput.cs:75.

This was not the case in Unity 2018.1.1f1, so this might be caused by some recent engine changes.

Is it reproduceable?

Yes.

Released package version / tag?

Release 0.2 from the Asset Store.

Unity version, operating system, target platform (standalone windows, mac, iOS, PS4...)?

2018.2.1f1

artyom-zuev commented 5 years ago

Since its been a very long while since last release but commits continued all this time, this might be something that was already fixed in the repository - in that case, I'd appreciate if someone would point me to a commit where this was fixed.