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 in VR_Init #195

Open
Kegetys opened this issue Jul 17, 2016 · 6 comments
Open

Memory leak in VR_Init #195

Kegetys opened this issue Jul 17, 2016 · 6 comments

Comments

@Kegetys
Copy link

@Kegetys Kegetys commented Jul 17, 2016

VR_Init seems to leak memory every time it is called.

To repro execute the following:

while(true)
{
  EVRInitError err = VRInitError_None;
  vr::IVRSystem *pVRSystem = vr::VR_Init(&err, vr::VRApplication_Scene);
  vr::VR_Shutdown();
}

And see the process memory use slowly going up.

This is especially a problem if you call VR_Init with VRApplication_Background in a loop to wait for SteamVR to be running, resulting in ever increasing memory use.

@cryptofbc
Copy link

@cryptofbc cryptofbc commented Oct 23, 2016

Have this problem been solved? I have also found this memory leak bug. Is there any method to solve this bug?

@isometriq
Copy link

@isometriq isometriq commented Feb 14, 2017

I have 5 worker threads that remain alive after per ::init() call, but only if frames have been submitted to compositor Compositor()->sumit().
Calls to ::shutdown() does not clean them up.
For each worker thread group of 5, one is priority above normal and the others are idle. The are located on nvwgf2um.dll ..which seems to be nvidia geforce.. or cuda stuff?
Anyway ...its leaking!!! help!

@mann1x
Copy link

@mann1x mann1x commented Oct 23, 2019

Is there anyone that could work on this issue?
Due to this leak is impossible to create any kind of utility or monitoring software using OpenVR.

@dashingstag
Copy link

@dashingstag dashingstag commented Oct 25, 2019

Yes I also have the same problem. My workaround is to create a utility tool that calls init only once and have that utility distribute information to the other utilites.

@mann1x
Copy link

@mann1x mann1x commented Oct 25, 2019

@dashingstag thanks for the info. can you elaborate a bit more?
Do you mean you spawn another process that just calls init once and if it's not successful dies?

@bddckr
Copy link

@bddckr bddckr commented Dec 12, 2019

SteamVR beta 1.9.7:

Fixed some memory leaks when VR_Init is called repeatedly in long-running applications.
https://steamcommunity.com/games/250820/announcements/detail/1714113379461314416

This sadly does not solve the issue. The repo snipped in the first post still does create ~100kB per call (while SteamVR is off at least).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.