Re: Error 8 Not enough storage from IMediaControl->Run

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Michael Schwab (michael.schwab_at_cobecv.com)
Date: 01/06/05


Date: Wed, 5 Jan 2005 17:17:59 -0700

Suspecting heap problems, I did repeated malloc/free's before each
execution of the code to see how big my heap was.
Before the first execution, I was able to malloc up to 4.4 Mb.
After the first 8007000e error from Run, on the second execution
I was only able to malloc 3.1 Mb. The third time it was 2.1 Mb,
and the fourth time was 1 Mb (and RenderFile failed this time).

So something is eating up the heap space, even though I do all
the cleanup every time:
    pControl->Release();
    pEvent->Release();
    pGraph->Release();
    pControl = NULL;
    pEvent = NULL;
    pGraph = NULL;
    CoUninitialize();

"Michael Schwab" <michael.schwab@cobecv.com> wrote in message
news:eZnSf338EHA.2876@TK2MSFTNGP12.phx.gbl...
> Actually, the hr returned from Run() is 8007000e, but that's still
> E_OUTOFMEMORY.
> This happens even the first time I run the program after a reboot.
> (Maybe GetLastError() doesn't work with these DirectShow calls?)
>
> What memory am I out of?
>
> The code is basically the initial DSRender.cpp example from the Pesce
book.
>
> "Michael Schwab" <michael.schwab@cobecv.com> wrote in message
> news:ePSaeY28EHA.2572@tk2msftngp13.phx.gbl...
> > I'm trying to run the usual DirectShow example with eVC++ 4.0 on CE 4.2.
> > The CoInitialize, CoCreateInstance, and RenderFile are working, and a
> blank
> > window appears to be positioned correctly, but when I try
> >
> > hr = pMediaControl->Run();
> > if (FAILED(hr))
> >
> > it fails, and GetLastError returns error 8 - Not enough storage to
process
> > this command.
> >
> > I tried this with 3 different files (2 mpg, 1 avi, running from 1 to 6
Mb)
> > all of which play under MediaPlayer (on CE) just fine.
> >
> > What kind of "storage" is this error referring to? When I go to
> > ControlPanel->System Memory tab, I have plenty of both storage and
program
> > memory available (40 Mb each) - more than enough to hold the entire
movie
> > file!
> >
> > BTW, the same code works just fine under WinXP with DirectX 9.0b.
> >
> > My PB build has all DirectShow stuff included, and I believe this
example
> > was working last summer, when I last tried it.
> >
> > Any suggestions on how to fix this?
> >
> > Michael Schwab
> >
> >
>
>



Relevant Pages

  • Re: Privilege-escalation attacks on NT-based Windows are unfixable
    ... >> stack (or heap, for that matter)? ... >JIT compilation in Java ... You don't need that stuff in the regular heap. ... and set its protection to allow execution. ...
    (comp.security.misc)
  • Re: Privilege-escalation attacks on NT-based Windows are unfixable
    ... >> stack (or heap, for that matter)? ... >JIT compilation in Java ... You don't need that stuff in the regular heap. ... and set its protection to allow execution. ...
    (comp.os.ms-windows.nt.admin.security)
  • Re: [announce] [patch] NX (No eXecute) support for x86, 2.6.7-rc2-bk2
    ... > I don't think it makes any sense to have separate bits for heap and stack. ... heap execution seems to be a lot more common than stack execution. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: about std::string
    ... You are likely to have damaged the heap at some point of execution further ... Stephen Howe ... Prev by Date: ...
    (microsoft.public.vc.stl)
  • Re: trap in malloc on 2000 terminal server
    ... For the error in the debugger extension, looks like you have an old debugger ... some operation that has an undefined behavior beforehand. ... On average, heap corruption shows up as crashes in random places, ... What is the logic of malloc? ...
    (microsoft.public.win32.programmer.kernel)