IDE crashes on DrawIndexedPrimitives call

IDE crashes on DrawIndexedPrimitives call

Post by Natha » Wed, 26 Feb 2003 11:31:54



I posted a question here a number of days ago but it wasn't very well
researched.  I've been writing a 3D engine in Visual Basic 6 with DirectX
8.1, and any call to DrawIndexedPrimitive results in an automation error
(I'm using the debug runtimes).  I've tried downloading example source code
from tutorial sites that use the call, they also generate the exact same
error.  When using the retail runtimes, the call goes through but
occasionally generates an automation error and kills the IDE.  Yes, I have
the latest drivers.  I've also tried different video cards and drivers, but
the call still generates the automation error.  I've reformatted my
development system and reinstalled 2K, DirectX, and all the drivers but it
still generates the automation error.  Other drawing calls work great,
DrawPrimitive, DrawPrimitiveUp, mesh.DrawSubset, etc, all work without a
hitch.  However, no DrawIndexedPrimitive call will function with the debug
runtimes and with the retail runtimes cause crashes.  All my games work
fine.  Does anyone have any possible idea what the problem might be?  Could
it be my video card?  My OS?  Is there a memory allocation problem?  Please
help!
 
 
 

IDE crashes on DrawIndexedPrimitives call

Post by Xin Huang [MSF » Wed, 26 Feb 2003 14:18:12


You can try this way:

1. In the DirectX control panel applet, set Debug Output Level for Direct3D
to most.
2. run dbmon.exe in the DXUtils directory. This will bring up a console
window.
3. debug your application in VB.

Hopefully the debug monitor window will show you some useful information.

Regards,
Xin

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. (c) 2003 Microsoft Corporation. All
rights reserved.

 
 
 

IDE crashes on DrawIndexedPrimitives call

Post by Natha » Sun, 02 Mar 2003 08:13:00




Quote:> You can try this way:

> 1. In the DirectX control panel applet, set Debug Output Level for
Direct3D
> to most.
> 2. run dbmon.exe in the DXUtils directory. This will bring up a console
> window.
> 3. debug your application in VB.

> Hopefully the debug monitor window will show you some useful information.

> Regards,
> Xin

> This posting is provided "AS IS" with no warranties, and confers no
rights.
> You assume all risk for your use. (c) 2003 Microsoft Corporation. All
> rights reserved.

The debug window output reports that "streams do not have required number of
verticies."  I'm sure the correct vertex and index buffer is being assigned
to the device.  Could this be a driver problem?  A device problem?  The
order I am making the calls is:  SetVertexShader, SetTexture,
SetStreamSource, SetIndicies, SetTransform, and finally
DrawIndexedPrimitive.  Is this an appropriate order?  I get the same error
whether I create the vertex and index buffers in system memory or video
memory.
 
 
 

IDE crashes on DrawIndexedPrimitives call

Post by Rich [Microsoft Direct3D MV » Sun, 02 Mar 2003 08:21:47


[Please do not mail me a copy of your followup]



Quote:>The debug window output reports that "streams do not have required number of
>verticies."

I'm inclined to believe the debug output.

Quote:>I'm sure the correct vertex and index buffer is being assigned
>to the device.  Could this be a driver problem?  A device problem?

If you get the same error on REFRAST, its most likely a problem in
your code.
--
"The Direct3D Graphics Pipeline"-- code samples, sample chapter, FAQ:
          <http://www.xmission.com/~legalize/book/>
        izfree: Open source tools for Windows Installer
                <http://izfree.sourceforge.net>
 
 
 

IDE crashes on DrawIndexedPrimitives call

Post by Natha » Mon, 03 Mar 2003 11:28:16


Thanks for your help guys... turns out to be a problem with my code after
all!  I read and reread the SDK documentation several times before
noticing... NumIndicies isn't the number of indicies used during the call,
it's the number of verticies!  This also explains why the proggie ran with
the retail runtimes, it didn't test for memory leaks.
 
 
 

1. OpenGL - Crashes in IDE - Runs OK in Windows

A Neophyte's Question:

This is my first experience with OpenGL and I think I'd better come to grips
with this problem before going on...
Using the C++ BUILDER DEVELOPERS GUIDE by Hollingworth, et al, I loaded
their Chapter 26 Solar System sample project.
When I run this in the Borland IDE I get repeated interruptions with this
message:  RECEIVED TOO MANY CONSECUTIVE EXCEPTIONS - ACCESS VIOLATION AT...
The offending operation is apparently:  move ax, gs: [ecx]

However, the compiled executable file runs great without any interruptions!
How is it that it can crash in the IDE and run OK outside the IDE?

Thanks,
Nick

2. RedBull

3. Lead Tools problem (crashes the IDE)

4. OpenGL & Visual C++ - HELP

5. would anyone like to explain DrawIndexedPrimitives to me?

6. PS 5.0 Tutorial

7. DSO crashing in BMRT with malloc() call.

8. Windows console app rendering OpenGL to disk image file

9. Call to close GLUI (sub)window crashes the app within glut

10. Crash when calling glReadPixels

11. Crash at function I did not call directly

12. SoQtRenderArea crashes app when calling render()

13. 64mgs...crash, crash,crash