Skip to content
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

Memory leak with _supportHotSwapping turned on #26

Open
winson129 opened this issue Nov 25, 2020 · 0 comments
Open

Memory leak with _supportHotSwapping turned on #26

winson129 opened this issue Nov 25, 2020 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@winson129
Copy link

If I have "support hot swapping" turned on, memory goes up by about 40/MBs a second. Looking into the code a bit, the offending line is AVProLiveCameraPlugin.UpdateDevicesConnected(); in the Update method. This is all fine if I don't turn on/off my webcam while it's running. But once the scene is running, turning on/off my webcam and calling this line will cause the memory usage to go up forever until the scene is stopped. It doesn't come back down either even after it's stopped until the Unity Editor is closed completely. My project requires the hot swapping feature as we needed to handle the case where a camera is plugged in after the scene is played, so any help on this would be much appreciated. Thank you very much in advance.

  • Unity version: 2018.3.12 and 2020.1.14 (tried on both versions)
  • AVPro Live Camera version: 2.9
  • Operating system version: Windows 10
  • Hardware/webcam model: I am using a MSI laptop and this is a built in webcam with the device name: "HD Webcam"
  • Video mode (resolution, frame-rate, etc): 1280x720, 10fps

Steps to reproduce the behavior:

  1. I had my built-in webcam turned off.
  2. Open one of the demo scenes from the asset store. I chose the "GUIDemo" scene.
  3. Select the LiveCameraManager gameobject and toggle on "support hot swapping" from the inspector.
  4. Play the scene in Unity editor.
  5. Press FN + F6 on my keyboard to turn on the built-in webcam to simulate plugging in a webcam.
  6. Now RAM usage goes up by about 40/MBs a second in the task manager until I stop the scene.

There are no error logs whatsoever. It doesn't log anything except "[AVProLiveCamera] version 2.9.0 initialised." in the console.

@winson129 winson129 added the bug Something isn't working label Nov 25, 2020
@AndrewRH AndrewRH self-assigned this Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants