Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
4998 Discussions

Visual Studio / Game Engine / Vtune v8

cathode26
Beginner
402 Views

Processor Pentium 4 HT

I am a student and I am using Dr. Parberry's student made game enginecalled SAGE at http://larc.csci.unt.edu/sage/. When I try to run Vtune over it I get an assert error in the renderer.cpp. These are the steps thatI follow:

1)Open Sage Demo 6

2) Click on solution explorer

3) Right click on the solution and select add new item

4) Select the Vtune Performance Option

5) Select a Call Graph activity

6) Select dot.net

7) Select the executable

8) "checked" run activity when done

I have tried /fixed:no

So I get this assert error in the renderer, so I went and added some debugging statements that should give me some informationon theassert, but it appears as if it skips over the code and goes straight to the assert.

This code is supposed to create a file called example.txt and write yes or broke. But the file is not created when I run vtune over it. But the file is created when I dont run vtune with it. So I am thinking I am doing something wrong when I run vtune that there is some kind of starting address error. If there is anything anyone notices is wrong with how I ran vtune thehelp would be very appreciated.

Thanks Vincent

//---------------------------------------------------------Sample

int Renderer::cacheTextureDX(const char *filename, bool defaultDirectory)

{

// Check if texture already loaded

int slot = findTexture(filename);

if (slot > 0) {

return slot;

}

// set directory if requested

if (defaultDirectory)

gDirectoryManager.setDirectory(eDirectoryTextures);

// TODO: fix this sketch

// Fake allocate it

slot = allocTexture(filename, 1, 1);

// Replace with D3DX-loaded texture

textureCacheList[slot]->d3dTexture->Release();

HRESULT hresult = D3DXCreateTextureFromFile(pD3DDevice, filename, &(textureCacheList[slot]->d3dTexture));

ofstream myfile;

myfile.open ("example.txt", ios::app);

assert(myfile.is_open());

if(hresult == 0)

{

myfile << hresult + "yes ";

}

else

{

myfile <<

"broke "<

}

myfile.close();

//------------------------This is the Assert That dies

assert(SUCCEEDED(hresult));

return slot;

0 Kudos
1 Reply
cathode26
Beginner
402 Views
I thought of another problem that could be 
causing what appears to be a memory position
issue. There are two projects being compiled 
in 1 solution.  So when I add new item,  
from vtune I am only adding it to one of 
the projects and then running the .exe.  
Does anyone know if there are any special 
configurations for multiple projects and 
1 solution?  Or if vtune is just not capable 
of multi projects?
-Vincent
//--------------  SOLUTION
For some reason vtune is looking in different 
directories for files, like sound files, texture 
files.  I was able to fix the problem by just
moving the files. 
-Vincent

					
				
			
			
				
			
			
			
			
			
			
			
		
0 Kudos
Reply