Raphiiko / OyasumiVR

🥽 VR Sleeping Utilities
MIT License
243 stars 19 forks source link

Subprocess "overlay-sidecar.exe" might have memory leak #76

Open camegone opened 5 months ago

camegone commented 5 months ago

Sometimes process called "overlay-sidecar.exe" eat up entire RAM on a machine. I activated "Memory Watcher" feature, then popup window alert constantly spams. image

Raphiiko commented 5 months ago

Thanks for reporting. That's very odd. Although there have been memory issues in the past, none of them have happened in the overlay module yet. The next time this happens, would you mind sharing your log file with me? You'll be able to find it at %APPDATA%\co.raphii.oyasumi\logs\OyasumiSidecar.log.

In the meantime, I'll see if I can add some useful memory profiling to the overlay module in an upcoming release.

camegone commented 5 months ago

I'll attach OyasumiSidecar_20240308.log, which should be a log file contains the event, instead, since the specified file seems not be written recently. OyasumiVR_Overlay_Sidecar_20240308.log

In my environment, overlay-sidecar,exe consumes over 1.7 GB of memory as soon as I launch Oyasumi VR application, and I can see the RAM usage goes up slowly. Changing brightness on the app, RAM usage seems to go up by a some hundreds KB.

Raphiiko commented 5 months ago

Gotcha. The logs sadly don't say much. The ram usage increasing a bit when you change brightness is expected, but that initial 1.7GB really shouldn't be happening. Here the overlay uses about 80MB after starting, with SteamVR running.

camegone commented 5 months ago
  1. There is no difference between with or without Steam VR already running.
  2. Beta build d3e2a0c seems not solved this problem; it still consume 1.7GB of RAM...

Additionally, I found that opening overlay menu in VR cause massive memory usage increase (about 500MB/s).

Raphiiko commented 4 months ago

I seem to have absolutely no way of reproducing this, so I sadly cannot do much about it currently.

I'll leave this issue open in case more people are experiencing this, or maybe get some insights from someone who knows why it might be happening.

Raphiiko commented 1 week ago

If someone happens to run into this, please send me a memory dump on Discord (before killing the overlay)

You can just right click the overlay-sidecar.exe process in task manager, and click "Create memory dump file"

image