D3D8ERROR: vshader.cpp error occurs in my rendering loop

Started by
5 comments, last by etran1 21 years, 10 months ago
I''m working on my implementation of the Quake 3 format and everything seems to work fine other than nothing appears on the screen and the program seems to freeze. What happens is almost as if it alt+tabs because once it finishes loading and it freezes, I can see the taskbar. I then proceed to close it and I get a dialog box saying that it''s not responding. I click close and when I''m back in the IDE I see this info in the debug output window Direct3D8: (ERROR) :*** Exception in d:\builds\nt32_chk\multimedia\directx\dxg\d3d8\fe\vshader.cpp Line: 664 this here is my rendering function

void CDXGraphics::Render(CBSP * World)
{
	m_pD3DDevice->Clear( 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, D3DCOLOR_XRGB(0,0,0), 1.0f, 0 );

	m_pD3DDevice->BeginScene();
	m_pD3DDevice->SetVertexShader (D3DFVF_CUSTOMVERTEX);
	m_pD3DDevice->SetStreamSource (0, m_pVB, sizeof(BSPVertex));
	int iNumFaces = (World->GetLumps()+Faces)->iLength/sizeof(BSPFace);
	for(int i = 0; (i < iNumFaces); i++)
	{
		if((World->GetFace()+i)->iType == 1)
		{
			m_pD3DDevice->SetTexture(0, m_pTextures[(World->GetFace()+i)->iTextureID]);
			m_pD3DDevice->SetTexture(1, m_pTextures[(World->GetFace()+i)->iTextureID]);
			m_pD3DDevice->DrawPrimitive(D3DPT_TRIANGLEFAN, (World->GetFace()+i)->iStartVertexIndex, (World->GetFace()+i)->iNumOfVerts);
		}
	}
	m_pD3DDevice->EndScene();
	m_pD3DDevice->Present( NULL, NULL, NULL, NULL );
}
 
Thanks Etran
Advertisement
What does the error message say?
---visit #directxdev on afternet <- not just for directx, despite the name
It doesn''t give me any specific errors, just what I got from the ouput window. Just for reference this is the entire output from it, although most of it is just loading symbols into the debugger.

''E3D Version 0.1.exe'': Loaded ''E:\Documents and Settings\All Users\My Documents\Visual Studio Projects\E3D Version 0.1\Debug\E3D Version 0.1.exe'', Symbols loaded.
''E3D Version 0.1.exe'': Loaded ''E:\WINDOWS\system32\ntdll.dll'', Symbols loaded.
''E3D Version 0.1.exe'': Loaded ''E:\WINDOWS\system32\kernel32.dll'', Symbols loaded.
''E3D Version 0.1.exe'': Loaded ''E:\WINDOWS\system32\d3d8.dll'', Symbols loaded.
''E3D Version 0.1.exe'': Loaded ''E:\WINDOWS\system32\d3d8thk.dll'', No symbols loaded.
''E3D Version 0.1.exe'': Loaded ''E:\WINDOWS\system32\gdi32.dll'', Symbols loaded.
''E3D Version 0.1.exe'': Loaded ''E:\WINDOWS\system32\user32.dll'', Symbols loaded.
''E3D Version 0.1.exe'': Loaded ''E:\WINDOWS\system32\advapi32.dll'', Symbols loaded.
''E3D Version 0.1.exe'': Loaded ''E:\WINDOWS\system32\rpcrt4.dll'', Symbols loaded.
''E3D Version 0.1.exe'': Loaded ''E:\WINDOWS\system32\msvcrt.dll'', Symbols loaded.
''E3D Version 0.1.exe'': Loaded ''E:\WINDOWS\system32\version.dll'', Symbols loaded.
''E3D Version 0.1.exe'': Loaded ''E:\WINDOWS\system32\imm32.dll'', Symbols loaded.
''E3D Version 0.1.exe'': Loaded ''E:\WINDOWS\system32\lpk.dll'', Symbols loaded.
''E3D Version 0.1.exe'': Loaded ''E:\WINDOWS\system32\usp10.dll'', Symbols loaded.
''E3D Version 0.1.exe'': Loaded ''E:\WINDOWS\system32\d3d8d.dll'', No symbols loaded.
Direct3D8: :====> ENTER: DLLMAIN(00bd3650): Process Attach: 00000cec, tid=00000900
Direct3D8: (WARN) :Executing processor detection code (benign first-chance exception possible)

Direct3D8: (INFO) :MMX detected

Direct3D8: (INFO) entium Pro CPU features (fcomi, cmov) detected

Direct3D8: (INFO) :dwCPUFamily = 6, dwCPUFeatures = 7

Direct3D8: (INFO) :szCPUString = AuthenticAMD

Direct3D8: :====> EXIT: DLLMAIN(00bd3650): Process Attach: 00000cec
Direct3D8: (INFO) :Direct3D8 Debug Runtime selected.
''E3D Version 0.1.exe'': Loaded ''E:\WINDOWS\system32\uxtheme.dll'', Symbols loaded.
''E3D Version 0.1.exe'': Loaded ''E:\WINDOWS\system32\msctf.dll'', Symbols loaded.
''E3D Version 0.1.exe'': Loaded ''E:\Program Files\Microsoft Hardware\Mouse\point32.dll'', No symbols loaded.
''E3D Version 0.1.exe'': Loaded ''E:\Program Files\Microsoft Hardware\Mouse\Msh_zwf.dll'', No symbols loaded.
''E3D Version 0.1.exe'': Loaded ''E:\WINDOWS\system32\mslbui.dll'', Symbols loaded.
''E3D Version 0.1.exe'': Loaded ''E:\WINDOWS\system32\oleaut32.dll'', Symbols loaded.
''E3D Version 0.1.exe'': Loaded ''E:\WINDOWS\system32\ole32.dll'', Symbols loaded.
Direct3D8: (INFO) :======================= Hal MixedVP device selected

Direct3D8: :Subclassing window 000b073c
Direct3D8: :StartExclusiveMode
Direct3D8: :WM_DISPLAYCHANGE: 1600x1200x32
Direct3D8: (INFO) :HalDevice Driver Style 7

Direct3D8: (INFO) :Failed to create driver indexbuffer
Direct3D8: (INFO) :Using X3D PSGP

Direct3D8: (WARN) :Ignoring redundant SetRenderState - 153

Direct3D8: (WARN) :Ignoring redundant SetRenderState - 7

Direct3D8: (ERROR) :*** Exception in d:\builds\nt32_chk\multimedia\directx\dxg\d3d8\fe\vshader.cpp Line: 664

Unhandled exception at 0x77f7f570 (ntdll.dll) in E3D Version 0.1.exe: User breakpoint.
The program ''[3308] E3D Version 0.1.exe: Native'' has exited with code 0 (0x0).
What happens after that?

Also, see discussion >here
---visit #directxdev on afternet <- not just for directx, despite the name
I''m not sure what your asking, as I said, It seems at if it switches to d3d8 but after that I can see the taskbar, and I have to manually close it. I don''t get an error message per say. Pretty much all I get is what''s in the debug window. Could something like this be caused by a misinitialized pointer?

Etran
Hit F5 a couple more times, and you should see the actual error message in the debug output.

Exception breakpoint is not an error as such; it just makes your debugger stop your program. So hit F5 instead of Shift-F5 and watch the output window.

[edited by - IndirectX on June 9, 2002 3:45:21 PM]
---visit #directxdev on afternet <- not just for directx, despite the name
I''ve had this exact same error (I think it was the same line too).
I wasn''t resetting the vertes shader after Reset()ing my device, so it was using garbled data.
Double check your pointers, etc.
Make sure that you''re not over-filling your VB.
Try cutting down your code down to a bare minimum, checking if you get the exception at each step.

HTH, Steve

Steve
DirectX Programmer
Soon to be the new Bill Gates
Member of the Unban Mindwipe Society (UMWS)

This topic is closed to new replies.

Advertisement