Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Silent failure of DirectX9

0 views
Skip to first unread message

Jens Pedersen

unread,
Oct 6, 2009, 4:59:01 AM10/6/09
to
Hi
We have a very large application using DirectX 9 in a window.
The application runs on an embedded PC with an Intel 965 chipset.
The application also uses GDI+ and VMR9.
The application is very memory hungry and nearly all of our limited amount
of PC memory is used.
Now if the different DLLs that makes up the application is not properly
placed in memory, then we can have the situation that DirectX does not get
the memory it wants. However we does not see any warnings or errors, even if
we run with the debugger version with all warnings and breaks on. The
application just silently fails.
It seems like it can not allocate a 256 MByte block needed for DirectX.

Now is there anybody that have experiences with this?
Is there some trick to get DirectX to give the error messages some we can
gracefully go down?
--
Jens
BK Medical

Carsten

unread,
Oct 6, 2009, 8:47:36 AM10/6/09
to

Hej Jens
Måske er det ikke passende at jeg kommenterer, fordi der er meget af
det du skriver som jeg ikke forstår.
Sidder du med program-koden i en IDE? Hvis du gør, bør der ikke være
noget problem ... ikke at du ikke kan få en 'silent failure', men,
fordi du har mulighed for at følge exekvering af alle kodelinjer. Jeg
har erfaring i den situation.

Jeg har lavet en editor som bruger DirectX og prøvet om den virker ved
lodret at kopiere .dll's og .exe til en anden pc. Og det virker! ...
altså nogle gange. Vista kan, men ikke alle versioner af Xp. Når det
'ikke' virker .. visner hele situationen .. og ingenting sker. Ingen
tilbagemelding om, hvad der er galt.

Hvis det er situationen for jer, så har jeg også et par bud på det.

hm .. verden er ikke så stor
Jeg kunne ikke stå for at præsentere verden for noget vola-dansk-pyk

Venlig hilsen Carsten

Jens Pedersen

unread,
Oct 6, 2009, 9:29:02 AM10/6/09
to
I stick to english so other can follow.
We run WinXP embedded.
We have a application with a user interface that uses GDI++
Inside the user interface is a window where DirectX draw an image.
Futhermore we can show video with VMR9 in another window.
The whole application is in one process space limited to 2 GBytes.
The problem is that both DirectX, GDI+ and VMR9 requires blocks of 256
MBytes in the process space.
Other DLLs in the application takes up a lot of the space and fragment the
process memory space.
So when DirectX is invokes there is not a free block of 256 MByte process
memory space.
And DirectX is silently failing!

We have access to all the code that calls DirectX procedures but none of
them seem to fail. I can just see that the image generated is not correct.
We have a very simple vertex pattern and textures that we update all the time.
It seems that some of the textures is simply not there.

Is there some possibility to have further error messages from DirectX.
I have used the Control Panel to set DirectX in debug mode and break on
errors and give maximum debug output, but no errors are reported.
--
Jens
BK Medical

Carsten

unread,
Oct 6, 2009, 4:31:05 PM10/6/09
to
On 6 Okt., 15:29, Jens Pedersen <JensPeder...@newsgroup.nospam> wrote:
> I stick to english so other can follow.
> We run WinXP embedded.

Hi again. Someone else has to solve your problem.
I'm at a loss on embedded WinXP .. does it mean a device other than a
normal personal computer, but controlled by XP?

> We have a application with a user interface that uses GDI++
> Inside the user interface is a window where DirectX draw an image.

What produces the vertices, or other image-input?

> Futhermore we can show video with VMR9 in another window.
> The whole application is in one process space limited to 2 GBytes.
> The problem is that both DirectX, GDI+ and VMR9 requires blocks of 256
> MBytes in the process space.
> Other DLLs in the application takes up a lot of the space and fragment the
> process memory space.
> So when DirectX is invokes there is not a free block of 256 MByte process
> memory space.
> And DirectX is silently failing!
>
> We have access to all the code that calls DirectX procedures but none of
> them seem to fail.

hm .. how can you, if you'r not in the coding-environment (IDE).
Anyway, can you check values on the variables involved in the code?
Passing an error unnoticed need not be a mystery. You can catch an
error in a try/catch-block of code and prevent the application from
crashing, but possibly not go all the way to diagnose or repair the
error. When an exception is thrown in such a block, there is an option
for the programmer to pass a message from the exception to the user,
if it's in a form-like windows application where there is direct
access to Messagebox.show(exception.message) that will pop you an
alert with the message. One snag is, that I've never recieved a
message from the exceptions that can be used for anything .. and they
are very lengthy. But I'm an amateur and has already experienced the
value of being informed properly, and not just prevent a serious
crash, so my habits doesn't count.

If the code is C++, all chances are that it's a memory-leak through a
dangling pointer. Here too, another one has to step in. I've never
written anything in that language yet. Pointer-'arithmatic' is the
force and acilles of C++.

> I can just see that the image generated is not correct.
> We have a very simple vertex pattern and textures that we update all the time.
> It seems that some of the textures is simply not there.
>
> Is there some possibility to have further error messages from DirectX.

I cannot imagine unless you change the code. You can only read it,
right?

> I have used the Control Panel to set DirectX in debug mode and break on
> errors and give maximum debug output, but no errors are reported.

Never been there either. I've had fatal errors without reports, in
debugging. It turned out that I wanted to start one process, before
another one was done. But this situation is not comparable to yours.

I was pretty sure, that you should check 'update' status of the XP (in
term of the NET Framework version), but that's not at all .. I mean,
it's a device rather than a pc?

Sorry that I couldn't be of any real assistance.

Have you got an idea of how old the program is? It doesn't sound like
cutting edge technology. And, is it something that you can close down?
I've noticed that XP grows over time. I've had a long absence from the
net and the system updates. My old computer got it all, after a
reinstall. The system disc is 8gb and has only got XP installed. Now
it constantly keeps whining about lack of space!

There is nothing that a reinstall can't cure. It's unsporty, but it
works.

Jens, if you don't know, most people here, I think, are absorbed in
putting the right code-lines together, in a code-editor. Once the .dll
is done, you smile or cry, depending on the result.

Cheers

> Jens
> BK Medical

0 new messages