INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Possible memory leak (jriver theatre view & wdm vs netflix)  (Read 7279 times)

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4275
Possible memory leak (jriver theatre view & wdm vs netflix)
« on: August 29, 2017, 04:00:27 pm »

This might be a wild goose chase but my system experienced this error today that eventually caused everything to fall apart (Nvidia OpenGL went out of memory then a bunch of other stuff failed)

Windows successfully diagnosed a low virtual memory condition. The following programs consumed the most virtual memory: Media Center 23.exe (6252) consumed 3049537536 bytes, Netflix.exe (3020) consumed 307994624 bytes, and explorer.exe (1868) consumed 147529728 bytes.

Netflix is launched via jriver via a theatre view entry to NetflixRemoteController.exe which launches the netflix windows 8.1 app, audio is then processed by jriver via the WDM driver.

Any ideas how one might debug this further?
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4275
Re: Possible memory leak (jriver theatre view & wdm vs netflix)
« Reply #1 on: August 29, 2017, 05:21:41 pm »

Since this post, I restarted the system and someone watching another show, jriver has been used for WDM driver audio processing only. After 1 hr of viewing, windows is telling me to close Media Center 23.exe due to virtual memory issues and I get more reports about the Nvidia OpenGL driver going out of memory. I am using the OpenGL theatre view. Any changes in this area in last few builds?
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10970
Re: Possible memory leak (jriver theatre view & wdm vs netflix)
« Reply #2 on: August 29, 2017, 05:39:25 pm »

I use OpenGL Theater View daily and let MC typically run for hours if not days and haven't noticed anything
Logged
~ nevcairiel
~ Author of LAV Filters

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72543
  • Where did I put my teeth?
Re: Possible memory leak (jriver theatre view & wdm vs netflix)
« Reply #3 on: August 29, 2017, 06:21:28 pm »

Any plug-ins running?
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4275
Re: Possible memory leak (jriver theatre view & wdm vs netflix)
« Reply #4 on: August 30, 2017, 02:33:28 am »

Any plug-ins running?
no

I restarted it last night and played nothing at all, just left it at the default theatre view. I came back to it this morning and it was dead. Event Viewer tells me that within ~45mins of startup

Quote
Windows successfully diagnosed a low virtual memory condition. The following programs consumed the most virtual memory: Media Center 23.exe (6376) consumed 3151364096 bytes, MsMpEng.exe (2120) consumed 90513408 bytes, and googledrivesync.exe (5948) consumed 87658496 bytes.

Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10970
Re: Possible memory leak (jriver theatre view & wdm vs netflix)
« Reply #5 on: August 30, 2017, 02:42:19 am »

I would try updating graphics drivers, perhaps something is wrong with your OpenGL driver.
Logged
~ nevcairiel
~ Author of LAV Filters

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4275
Re: Possible memory leak (jriver theatre view & wdm vs netflix)
« Reply #6 on: August 30, 2017, 03:14:33 am »

I did that last night before the latest crash, it has the latest Nvidia drivers (385.41 iirc).
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4275
Re: Possible memory leak (jriver theatre view & wdm vs netflix)
« Reply #7 on: August 30, 2017, 04:24:28 am »

same again and this time with no netflix running, just launched MC and left it running, it is clearly leaking consistently until it runs out of memory then crashes.

I can try and create a dump file if that would help. If it happens again then I'll remove the OGL Theatre View and see if it recurs to rule that out (or in).


Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10970
Re: Possible memory leak (jriver theatre view & wdm vs netflix)
« Reply #8 on: August 30, 2017, 05:11:51 am »

MC has been running on the screen behind me in OGL Theater View for a couple hours now and its using a whopping 80mb of memory. Definitely something specific for you for some reason.
Logged
~ nevcairiel
~ Author of LAV Filters

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4275
Re: Possible memory leak (jriver theatre view & wdm vs netflix)
« Reply #9 on: August 30, 2017, 05:20:25 am »

it's quite odd, it just started happening yesterday evening & as far as I can tell nothing has changed apart from MC updating itself.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72543
  • Where did I put my teeth?
Re: Possible memory leak (jriver theatre view & wdm vs netflix)
« Reply #10 on: August 30, 2017, 07:02:34 am »

Did you try disabling WDM?
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4275
Re: Possible memory leak (jriver theatre view & wdm vs netflix)
« Reply #11 on: August 30, 2017, 07:49:41 am »

Did you try disabling WDM?
no, WDM wasn't involved in the last 2 such events because no playback had been started. I'm going to try switching back to D3D Theatre View next.
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4275
Re: Possible memory leak (jriver theatre view & wdm vs netflix)
« Reply #12 on: August 30, 2017, 02:41:17 pm »

it's been running with no apparent leak since I reverted to D3D Theatre View. I'll go back to OGL tomorrow to see if the same problem recurs.

If it does recur, would it be useful to use something like https://docs.microsoft.com/en-us/sysinternals/downloads/procdump to periodically take dumps of the process to see if it sheds light on the leak occurring? I know this sort of thing is how I'd approach the problem on other runtimes but I'm not familiar with the contents of windows dump files so no idea if this would help here.


Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4275
Re: Possible memory leak (jriver theatre view & wdm vs netflix)
« Reply #13 on: September 01, 2017, 01:31:51 pm »

reverted to OGL, OoM crash followed

OGL Theatre View is the only common thread so far

I'll try a clean reinstall of the nvidia drivers next
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4275
Re: Possible memory leak (jriver theatre view & wdm vs netflix)
« Reply #14 on: September 03, 2017, 04:22:41 am »

performed a clean reinstall of nvidia drivers and completed various other scans/healthchecks, no problems reported anywhere. JRiver keeps crashing though (at least once a day) on memory grounds though when the OGL Theatre View is activated.

@Hendrik I use RDP regularly and hence trigger the "unable to init ogl" messages, IIRC you don't. Is it possible there is a leak somewhere in this area? e.g. some context or other not being disposed of properly. I'm not sure what else to do next. I don't really fancy reinstalling Windows....
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10970
Re: Possible memory leak (jriver theatre view & wdm vs netflix)
« Reply #15 on: September 03, 2017, 04:56:31 am »

You could try to just not use RDP for a couple hours and see if it still happens?
Afterall you seem to be the only one reporting this, so there must be some rather special circumstances triggering this.
Logged
~ nevcairiel
~ Author of LAV Filters

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4275
Re: Possible memory leak (jriver theatre view & wdm vs netflix)
« Reply #16 on: September 03, 2017, 05:34:01 am »

Ok I will try that.
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4275
Re: Possible memory leak (jriver theatre view & wdm vs netflix)
« Reply #17 on: September 05, 2017, 01:38:02 pm »

2.5 days uptime with RDP disabled and OGL Theatre View activated

I will leave it as is for the rest of the week to be sure but the evidence so far seems to point pretty strongly at the behaviour of OGL Theatre View in the presence of RDP

Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10970
Re: Possible memory leak (jriver theatre view & wdm vs netflix)
« Reply #18 on: September 05, 2017, 03:31:34 pm »

How odd, if RDP is on, it bails out very early in the theater view process, I wonder what happens.
Logged
~ nevcairiel
~ Author of LAV Filters

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10970
Re: Possible memory leak (jriver theatre view & wdm vs netflix)
« Reply #19 on: September 07, 2017, 06:50:38 am »

I tried to force this by using RDP and OpenGL theater view together, but I can't get it to use any extra memory.
Logged
~ nevcairiel
~ Author of LAV Filters

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4275
Re: Possible memory leak (jriver theatre view & wdm vs netflix)
« Reply #20 on: September 07, 2017, 04:00:18 pm »

I had to reboot today for other reasons but system has been stable with OGL and without RDP all week

IME it could take anything up to 12-24hrs (sometimes it crashed within the hour , others it took overnight) to go down.

Looking back through event viewer, I now see the first mention of this sort of condition was on 5th Aug and the nvidia opengl driver reported an out of memory condition & MC was logged as a faulting application with avcodec-lav-57.dll (v57.96.101.0) as the faulting module. This is logged at MC 23.0.31, 31 was released on 4th Aug as far as I can see and I update this box on demand. I believe this is the version in which you changed the error handling around use of RDP with the OGL Theatre View.
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10970
Re: Possible memory leak (jriver theatre view & wdm vs netflix)
« Reply #21 on: September 07, 2017, 04:39:21 pm »

How do you really use Theater View and RDP on that machine?

Is Theater View running when you RDP in, for example? Or do you just start MC, it goes to Theater View, see the error, and go out?
Logged
~ nevcairiel
~ Author of LAV Filters

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4275
Re: Possible memory leak (jriver theatre view & wdm vs netflix)
« Reply #22 on: September 07, 2017, 04:52:27 pm »

It is my MC server and main HTPC so MC is configured to start on boot and has Theatre View as the default view. It invariably stays in this view unless I remote in. I end up doing this fairly regularly (eg to rip things) and so I exit via bat script which calls tscon.exe to close the session and sends an MCC command to restore theatre view.
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10970
Re: Possible memory leak (jriver theatre view & wdm vs netflix)
« Reply #23 on: September 07, 2017, 04:57:20 pm »

Can you share the batch file to do that? Just trying to get it to do the same thing here.
Logged
~ nevcairiel
~ Author of LAV Filters

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4275
Re: Possible memory leak (jriver theatre view & wdm vs netflix)
« Reply #24 on: September 07, 2017, 05:29:03 pm »

The script is

Code: [Select]
MC23.exe /Mode Theater
tscon.exe 1 /dest:console
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Possible memory leak (jriver theatre view & wdm vs netflix)
« Reply #25 on: September 24, 2017, 07:54:48 pm »

Request from elsewhere:

@roderickgi Fwiw I reported a memory leak with the ogl theatre view in https://yabb.jriver.com/interact/index.php/topic,112027.0.html

Which version of the Nvidia driver did you upgrade to to fix your issue?

Driver Version 22.21.13.8541, known as 385.41, upgraded from 376.53. The nVidia Control Panel version is now 8.1.970.0. Other file versions and details in the attached file.

I read your thread but didn't add to it as my mucking around with the Display Resolution seemed to create the issue. I am still experimenting. I have currently set the Windows Desktop to 1920x1080x32bitx60Hz and 8bpc (bits per component) output via the nVidia Control Panel and confirmed in the Windows Display settings, and set "Options > Tree & View > Full Screen(...) > Resolution" to the same. I used to just leave that set at "Desktop Settings" but I am still playing around with settings to ensure I don't get any further problems.

Under "Options > Video > Display Settings" I have Automatic Change Mode set Off.

Despite setting everything back to 1080p my TV is still saying it is running at 4096x2160x60Hz, which is good as it is upscaling, but it used to always report 1920x1080x60Hz. So something has changed, and won't change back. I may try disconnecting the HDMI cable at some stage and forcing it to re-sync to see if that changes things. Although actually, having the TV upscale to 4K is what I want, but I'd like to know why the change in display info.

As above, I saw memory usage up to 3.5GB before the driver update, and until after a couple of reboots I still saw some high memory usage, but it has settled down now to reasonable values, usually in the 50 to 150 MB range when idle. At 91.5MB now, idle.


I also had this issue when I tried 4K resolution in MC. All related I think. A combination of settings triggers both the colour problem, and the memory leak, but it isn't obvious what fixes it, other than the upgraded driver.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4275
Re: Possible memory leak (jriver theatre view & wdm vs netflix)
« Reply #26 on: September 25, 2017, 05:10:59 am »

Thanks for the info. I suppose there must be a different root cause as upgrading to 385.41 didn't fix my issue.
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Possible memory leak (jriver theatre view & wdm vs netflix)
« Reply #27 on: September 25, 2017, 06:50:20 am »

Well that's why I mentioned all the other stuff.

I didn't have the problem at all until I set the resolution to 4K. Then I had to do the driver upgrade to fix it. It appears that a combination of settings causes something to be changed, and you can't just change it back to fix the problem.

Anyway MC should be able to log the memory increase and perhaps point to the internal cause, if not the solution, I would have thought. But that is troubleshooting beyond my current knowledge of MC.

Microsoft's Process Explorer and Process Monitor may be able to shed some light. I didn't go that far as the issue was fixed by the driver.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner
Pages: [1]   Go Up