Advertisement Jump to content
Sign in to follow this  

Odd error....

This topic is 3963 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I've run in to a snag. Whenever running my application(2008 Exp) it breaks with a dialog that states "There is no source code available for the current location". This occurs on a line whereby I am loading an X file.

This equates too:
	void InitGeomFromFile(std::string Filename)
		LPD3DXBUFFER bufMaterial;

		D3DXLoadMeshFromX(Filename.c_str(), D3DXMESH_SYSTEMMEM, PD->GetDirectXDevice(), NULL, &bufMaterial, NULL, &numMaterials, &pMesh);
		IsPrim    = false;
		IsCreated = true;
		Texture = new LPDIRECT3DTEXTURE9[numMaterials];
		D3DXMATERIAL* tempMaterials = (D3DXMATERIAL*)bufMaterial->GetBufferPointer();

		for(DWORD i = 0; i < numMaterials; i++)    
			if(FAILED(b = D3DXCreateTextureFromFile(PD->GetDirectXDevice(), /*CA2W(*/tempMaterials.pTextureFilename/*)*//*L"c:\\"*/, &Texture)))
				/*const WCHAR *szError =*/ 
				std::stringstream str;
				str << "Blah() failed (" << DXGetErrorString9(b) << "): " << DXGetErrorDescription9(b) << "\n";
//		OutputDebugString(CA2W(tempMaterials.pTextureFilename));
				std::cout << "Blah() failed (" << b << "\n";
				Texture = NULL;

				D3DVERTEXELEMENT9 test_decl[] =
				pMesh->CloneMesh(D3DXMESH_MANAGED, test_decl, PD->GetDirectXDevice(), &sMesh);
				D3DXComputeTangent(sMesh, 0, 0, 0, 0, NULL);

Please excuse the messy code. I'm still very much learning. Now, the curious thing is. If I change the line too:

It runs fine and without exception. I checked the "spiral.x" with DirectX viewer and it loads fine. I also checked it in the model viewer for the middleware engine I was using before deciding to switch to pure DX, it loads fine there too. I also googled and turned up a few results. But none of which explain why I am incurring this issue. The MSDN describes it as:
Your project does not contain source code for the code you are trying to view. The usual cause is double-clicking a module that does not have source in the Call Stack Window or Threads Window.
Another possible cause is trying to debug a dump file for managed code.
I'm not double clicking on anything and my code is not managed. I have cleaned the solution and rebuilt it( after reading a thread on the MS forum ). I have also searched this forum, but the two threads I found of interest were incomplete and didn't provide information or a solution. However, based on the questions asked in those threads by the respondents I can tell you that I am using the debug with the output set fully on "more". The call stack seems to break on the line:
>	d3dx9_36.dll!6901182a() 	

With the following information on the line below:
 	[Frames below may be incorrect and/or missing, no symbols loaded for d3dx9_36.dll]	

This half makes sense to me, but as a newbie I have no idea why this only occurs with one X file and not the other? :s. So I'm highly confused. I'm really not sure how to even go about debugging this as I have no idea what it means. Could someone who understands please throw a couple keywords my way so I can google further -- or indeed if you have encountered this before and can explain where I'm going wrong? Thank you.

Share this post

Link to post
Share on other sites
The error indiceated that your program has broken at a point where the source code is not availible. This means its probably code thats in a dll somewhere. Other than that i'm not sure that i can help you. Are room.x and spiral.x in the same directory? Both read/writable?

If one .x file works over another then that indicates to me there is a difference in the files. That might be a good place to start looking.

Share this post

Link to post
Share on other sites
I don't know what I did, but I've managed to get it loading. It now breaks on the "D3DXComputeTangent(sMesh, 0, 0, 0, 0, NULL);" line. Which is probably the most important line as far as I'm concerned cause I need that for my shader. But in any case, I think I can take it from here.

Thank you for your help JimmyDeemo.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!