PDA

View Full Version : Memory leak? Out of memory exception error



BigMoose
2010-07-09, 10:06 PM
I decided to give nPVR a go for the evening viewing with the wife instead of GBPVR, with the Wave skin - which is really nice! So it's the first time I've had it running for over 2 hours, but it threw an "out of memory" exception - although the channel was still showing in the background. I had a look in the task manager and the npvr.exe process was running at 570Mb which I thought was rather high. I copied the exception log text but not sure it's any use...

martint123
2010-07-10, 03:21 PM
I've had a few similar errors but was going to wait a day or so until my win7 install settled down a bit before reporting them.
I can "sort of" cause them to happen by channel surfing, going through the EPG, watching a channel for a second or two, ESCaping back to the guide and moving to the next channel. After about 15 to 20 channel swaps, the exception pops up with "out of memory".
I'll get the exception info later hopefully, when the shack is down to a habitable temperature.

BigMoose
2010-07-10, 04:11 PM
In a normal evening in front of the telly I'd channel hop enough. It's not my win7 install as running gbpvr I don't ever get such issues and don't reboot it for weeks. I was using the +/- for channel hopping, not going via the guide but I was pressing up to view what's on for the current channel and using this to browse the guide info for other channels...

martint123
2010-07-10, 05:33 PM
I wasn't implying it was related to Win7 - just that I've only had it on a short time and didn't want to report a problem like that until I was sure Win7 was stable in itself.
My old XP gbpvr machine gets rebooted about every three weeks to wake up the nova-t-500 or its driver when it tends to nod off.

ShiningDragon
2010-07-10, 06:52 PM
Me too has the "out of memory error" problem on Windows 7... but with GB-PVR. I think it has to do with my disabling of the pagefile. On all Vista machines i got never an error message like this.

BigMoose
2010-07-10, 09:08 PM
I run GBPVR and NPVR on the same box (win7 x64) and haven't done anything to the pagefile. GBPVR never does this but NPVR does - although I've tried to get it to do it again this evening and failed. While watching the football it seemed to stay around 140Mb for the pvr process. When I tried flicking round lots of channels it did go up but not dramatically and certainly not much over 200. However when I was messing about with the config, after several times of starting/stopping live TV and going in and out of the settings menu I noticed it had settled around 470Mb while on live TV. So I restarted it and was back to 140Mb.

BigMoose
2010-07-10, 10:09 PM
Hmm, something isn't right when its been running for a while. I get choppy audio for any mpeg1 channel after watching for a while (like over an hour). Not sure about AC3 channels. I've tried different decoders but doesn't make a difference. Using the same as I do on GBPVR and npvr and it happens on npvr but I can watch for ours on gbpvr.

sub
2010-07-10, 10:14 PM
Hmm, something isn't right when its been running for a while. I get choppy audio for any mpeg1 channel after watching for a while (like over an hour).
I've been away for the last three days, and just happen to have left live tv running over that time. I just checked that machine, and it seems to be running fine with a reasonably low memory usage (90MB). This was a SD channel with MPEG2 video and MPEG1 Layer II audio.

Is it specific activities that is causing the memory to jump up?

BigMoose
2010-07-10, 10:34 PM
The one thing I've noticed today that caused it was coming in and out of live tv and tinkering within the settings menu. Then when I had another look in task manager it was up to 470Mb. I'll keep playing around to see if anything else seems to cause it. Annoyingly (or not!) when the sound went crappy, the mem usage was still low enough (150Mb). Obviously not the application though if it's fine for you after 3 days. It's odd that it behaves differently to GBPVR on my box though both memory and the audio thing.

If you're back, if you have the time at some point are you able to take a look at npvr's choice of audio stream when there's >1? To see if it can pick the AC3 channel and not the mpeg1 Narrative one?

sub
2010-07-10, 10:55 PM
The one thing I've noticed today that caused it was coming in and out of live tv and tinkering within the settings menu. Then when I had another look in task manager it was up to 470Mb. I'll keep playing around to see if anything else seems to cause it. Annoyingly (or not!) when the sound went crappy, the mem usage was still low enough (150Mb). Obviously not the application though if it's fine for you after 3 days. It's odd that it behaves differently to GBPVR on my box though both memory and the audio thing.Its probably not what you're seeing, but I know updating the EPG in the Settings menu can consume a lot of memory if you've got a large number of channels. NPVR effectively frees this memory after its no longer in use, but because of the way .net memory manage management works it wont free that memory back to the operating system until the operating system tells the .net runtim that it's running low and needs to reclaim unused memory. (ie, its assuming that if you needed that much memory at some stage, then you'll probably need it again in the future)

For your sound issue, have you tried other audio decoders?

If you're back, if you have the time at some point are you able to take a look at npvr's choice of audio stream when there's >1? To see if it can pick the AC3 channel and not the mpeg1 Narrative one?I am back. I cant remember, does it do this when you playback a recording, or only when you watch live tv?

BigMoose
2010-07-11, 06:17 AM
It chooses the narrative/mpeg1 track both in live tv and recording playback. With the choppy audio I've tried a few decoders. I'm using spdif out if that makes a difference, but is there a decoder you recommend?

BigMoose
2010-07-11, 09:38 AM
I've installed the MPA one recommended and it seems to work better with the Irish dtt than the others I use in gbpvr. I'll leave it running for a while and will try watching the grand prix with it in a bit to see how it gets on. Don't quite dare use npvr for the football later as the wife is from holland and I'll be dead if it breaks due to my fannying around! :rolleyes:

BigMoose
2010-07-11, 10:23 AM
That was no better. So back to ffdshow but have changed the mp1,mp2 decoder to mp3lib which is much better than the default libavcodec so far. Anyone else using spdif out to an av amp?

BigMoose
2010-07-11, 12:33 PM
My findings: audio decoder makes no difference - ive spent a long time trying all I can find and they all behave the same. After an hour or so the sound is choppy (several tiny drop outs each second). Right click and reselect the same audio track and it's perfect again for another hour-ish. Is the thing that lets you chose the audio track the same filter as used in gbpvr? As I'm thinking the issue is there, as gbpvr doesn't ever degrade.

After the hour, mem usage was up from 140 to around 250. No idea if these issues are related but I suspect not as after reselecting the audio channel and going back to perfect audio the mem usage hasn't changed, but then again i guess it won't register as freed memory until something wants it?

Reddwarf
2010-07-11, 01:22 PM
My findings: audio decoder makes no difference - ive spent a long time trying all I can find and they all behave the same. After an hour or so the sound is choppy (several tiny drop outs each second). Right click and reselect the same audio track and it's perfect again for another hour-ish. Is the thing that lets you chose the audio track the same filter as used in gbpvr? As I'm thinking the issue is there, as gbpvr doesn't ever degrade.

After the hour, mem usage was up from 140 to around 250. No idea if these issues are related but I suspect not as after reselecting the audio channel and going back to perfect audio the mem usage hasn't changed, but then again i guess it won't register as freed memory until something wants it?

I'm having the same issues with sound, not on all channels thou. I usually just pause for a couple of seconds and the problem is gone. With regards to mem.usage NextPRV reports about 29000K, but Nrecord uses 132000K, that is after running about 24 hrs.

BigMoose
2010-07-11, 01:46 PM
I'm guessing that reselecting the audio track and a pause/restart has the same effect? Having just paused the GP it does sound perfect again on resuming. After another hour mem usage hasn't changed.

sub
2010-07-11, 05:26 PM
It chooses the narrative/mpeg1 track both in live tv and recording playback. With the choppy audio I've tried a few decoders. I'm using spdif out if that makes a difference, but is there a decoder you recommend?Did you have a link to a short recording I could play here to see the problem?

BigMoose
2010-07-11, 09:59 PM
http://www.megaupload.com/?d=0D9F7PPH - is a 17mb chunk of a BBC HD recording that pics the narrative and not the AC3 for me (when it was live as well as recording playback).

sub
2010-07-11, 10:15 PM
http://www.megaupload.com/?d=0D9F7PPH - is a 17mb chunk of a BBC HD recording that pics the narrative and not the AC3 for me (when it was live as well as recording playback).Give this patch a go.

martint123
2010-07-11, 10:27 PM
That clip of bigmoose's played the narrative audio for me when viewed as "video". However, after loading your patch there didn't seem to be any audio at all. (although there still is with live BBC HD, but it is not transmitting narrative at present AFAIK)

sub
2010-07-11, 10:42 PM
That clip of bigmoose's played the narrative audio for me when viewed as "video". However, after loading your patch there didn't seem to be any audio at all.You sure you have an AC3 decoder enabled? I got the narrative with bigmoose's clip, but the patch fixed it for me and now gives the correct AC3 audio.

martint123
2010-07-12, 08:42 AM
You sure you have an AC3 decoder enabled? I got the narrative with bigmoose's clip, but the patch fixed it for me and now gives the correct AC3 audio.

A decoder is there in setup and appears in the logs. It also gives audio on live BBC HD which I think was the source of his recording.
Logs attached. First is playing his clip from 'video' followed by a bit of live BBC HD from the TV guide.

p.s. on the original thread title, when I got an out of memory exception earlier, n-pvr was running at around 1.25gb memory usage and killing it from task managed was the only way to say goodbye.

BigMoose
2010-07-12, 07:42 PM
The patch fixes recordings for me, but live TV still picks the narrative mpeg1 audio...

martint123
2010-07-12, 08:23 PM
I happened to spot "silence" on BBC HD just now and with the PCH could see it had both normal and narrative audio. (the PCH defaulted to narrative)
So I shot upstairs and sure enough, on the PC, narrative audio was being used.
I went into quick record for a few moments and with subs patch go no audio on playback, restoring npvrtsmon from a backup restored sound, but still the narrative one. Regarding decoders they are microsoft DTV-DVD for mpeg1 and AC3. I see now that E-AC3 is disabled and blank in the pull down.

martint123
2010-07-12, 08:41 PM
Apologies sub - just installed ac3filter from ac3filter.net and selected it and sound returns with your patch. Sorry.
Live TV still narrative though. Although playing via tv guide or pending a currently recording show seems to get the normal audio.

sub
2010-07-12, 08:47 PM
Hopefully this will get rid of the narrative for live tv.

martint123
2010-07-12, 08:55 PM
That looks like it for me. Gave it 5 minutes and no narrative audio, but plenty of video that would warrant it.

Many thanks again for your time.

sub
2010-07-12, 08:56 PM
Great.

BigMoose
2010-07-12, 09:04 PM
Likewise - fixed for me too! :) Thanks also for all your efforts here. Handy that I didn't have to wait five mins to prove it - the AV amp tells me straight away it's chosen the Dolby Digital track not the narrative mpeg audio :)

BigMoose
2010-07-13, 09:14 PM
As I made such a mess of this thread, introducing 3 problems instead of reporting them on their own, I just want to tidy it up by saying that there are two outstanding problems:
Firstly the out of memory exception - I've not managed to narrow down exactly what causes it. I think playing with the settings config does increase memory usage. Channel changing sometimes does, but I've also flicked through loads of channels and seen no difference... I think someone further up said they could cause it to happen with channel changing.
Secondly the audio degrading problem - audio gets very choppy after an hour (esp on mpeg1 audio channels, I'm not sure about AC3, will have to test). I assume it slowly degrades but oddly last night I wasn't sure if it had after 45 mins but by 60 mins it was really bad. A pause/play or audio track reselection solves for another hour (do both just cause a graph rebuild?). A few others here have said they have the same, so it's at least not just me! I use spdif to an AV amp - dunno about the others?

Lindsay
2010-07-19, 03:44 AM
sub, I noticed high memory usage with 1.4.24 this morning. 7-800MB! NPVR was probably running overnight after looking at pictures last night.

sub
2010-07-19, 04:03 AM
A couple of others noted similar behaviour recently. It doesnt seem to be happening to everybody though. Do you notice the memory going up with any particular activity?

Lindsay
2010-07-19, 05:11 AM
I'll see if I can nail it down.

Lindsay
2010-07-19, 09:32 PM
OK, running from the PCH causes the mem usage to continue climbing. I saw it go to 85MB, then 103, then 165 and onwards.

It jumps every time you choose a new Main Menu item. Going back to one already used doesn't make it jump. Playing/viewing stuff doesn't make it climb. Sort of looks like a caching action that just ratchets up.