Jim Adams 'Advanced Animation with Directx' - help me please!!!

Started by
11 comments, last by Presh 19 years, 8 months ago
Hi all, I recently purchased Jim Adams book 'Advanced Animation with Directx'. However when I try to run the demo executables my machine crashes and asks me if i want to report an error to microsoft. I then tried it on another machine and get the same errors. I then decided to recompile an example code myself. The examples compile and build with no errors but still they crash out on me. Does anyone else have this problem and if so do you have a solution for me? thank u, any help would be great Presh [Edited by - Presh on August 3, 2004 4:57:38 PM]
Advertisement
Sounds like you may have a corrupt version of the DirectX runtime. Try uninstalling and reinstalling the SDK.
-dizzyGame Institute InternPlease rate me. :)
I thought the same and I uninstalled and then reinstalled the sdk. That didn't help any.
Besides I tried it on my other computer and the precompiled demo executables on the books cd failed also.

Its strange because the directx sample code all compile and run correctly.

I've emailed Jim to see what he suggests.

thanks for yzzid


Debug through the code and see what line makes it crash.
This doesn't sound like a book problem as I haven't heard of this happening to anyone else. I think it may be something with your computer.

Is there any other programs that you run on your machine that exhibit strange behavior or crash for no reason?
What OS are you using?
Also, what version of the DirectX SDK?
-dizzyGame Institute InternPlease rate me. :)
Hi guys

Like i said i tried it on two different machines and they both crash out. Even the precompiled executables crash out.
Also I have no problem compiling and running any of the directx samples.
I even uninstalled me directx and installed the directx sdk included on the books CD.

I'm running windows xp (on a laptop and also tried on a desktop).

I have no other problems at all running any executable or games.

Someone else must have this problem also.

When I use the debugger it crashes out stating:

Unhandles exception: C0000005: Access violation

The debugger stops on this line:

g_pD3DDevice->CreateVertexBuffer(sizeof(BackdropVerts), D3DUSAGE_WRITEONLY, BACKDROPFVF, D3DPOOL_DEFAULT, &g_BackdropVB, NULL);

The only example from the book I can get working is the x-file frame program.

Man this is annoying as I bought the book to learn directx animation and therefore don't know enough to debug it.

Thanks for your replies guys






That is definitely not the book to learn DirectX from. It teaches nothing of the basics. Perhaps you should go with something that starts from the begining and teaches DirectX at a beginners level.

COnsequently, if you go to the DirectX control panel app, you can set the DirectX runtime to the debug ones and in Visual Studio it should tell you why the call is failing. Make sure to put the debug level at it's highest setting. Let us know what the error is.

Also, what video card are you running?
-dizzyGame Institute InternPlease rate me. :)
I think I know what the problem is.

In his book Jim uses mixed vertex processing when he creates his Direct3D device. If your video card does not support hardware vertex processing, then the device creation will fail. Check where he creates the device and I believe you should see it setting it to NULL.

One reason the SDK samples work for you is they are created in such a way that if hardware vertex process device cannot be created it will fall back to a software processing device. Jim does not handle this situation in his book.

Sounds to me like you may be using some pretty old video cards.

In the meantime try changing the device creation code (in Direct3D.cpp) to create a device using Software vertex processing.

Change D3DCREATE_MIXED_VERTEXPROCESSING to D3DCREATE_SOFTWARE_VERTEXPROCESSING in the InitD3D function.
-dizzyGame Institute InternPlease rate me. :)
yzzid

Oh man I can't say how much I appreciate you helping me out.

My graphics cards must me pieces of cr*p (laptop=ati radion mobility and brand you hp desktop with unknown card type).

Thanks to you I can finally get on with learing directx and importing my skinned meshes! yippeee

cheers mate

Presh





Just out of curiosity, should the D3DCREATE_MIXED_VERTEXPROCESSING flag work with a card that doesn't handle hardware vertex shaders?

I also noticed Jim has a commented out line in direct3d.cpp with the D3DCREATE_SOFTWARE_VERTEXPROCESSING flag replacement.

Sorry for been an idiot. I guess I have a lot to learn.

thanks again

Presh

This topic is closed to new replies.

Advertisement