Jump to content
  • Advertisement
Sign in to follow this  
Froyd

MDX - Xp64 - Debug Output

This topic is 4118 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

Hi, I'm new to those forums. The community seems nice. Tho, you guessed right, I have a problem. I would like to get greater details in my VS2005 Output than : "Additional information: Error in the application." I have read the Forum FAQs in order to get into the DX Control Panel. I switched to Debug mode using Full Details (slider bar on the left in the Dx9 page). I tried using DebugView from microsoft but i'm not sure how to use it exactly. So nothing gets captured at all. No Details in my VS2005 output. No Reason to crash. Tech Details : I am running under WinXP64 with VisualStudio 2005 I Tried using April 2007's DX SDK at first. Then I downloaded June 2007's version yesterday without any better results. (of course, I installed the whole package.) EDIT : Re-installing SDK + re-downloading debugview made it work at last. I get Information in DebugView.. Alas, the information provided won't help me at all! I don't know how to read it ;\ -=-=-=-=-=-=-=- For those who are willing to help me about my code, that would be my next Question : Why does it Actually crash on runtime! Overview : I'm trying to Load a Mesh from a file provided by a CD from a tutorial book -> Managed DirectX 9 - Graphics and Game Programming (Kick Start) Both my code and their Source code crash on runtime when trying to read from the file :
mesh = Mesh.FromFile(file, MeshFlags.Managed, device, out mtrl);




EDIT : I am compiling using a x64 processor but using x86 build Using a Try/Catch statement gives me a Null Exception Error. Upon debugging using break points, I can tell that only mtrl's Value is set to NULL at that time. mtrl is an "ExtendedMaterial[] mtrl". Anyways, if you need more details about anything, just ask me. I'm not very good with english at first, and very new to DX. Your help would be greatly appreciated! EDIT : Here's the DebugView results... Any help decoding the stuff would be greatly appreciated
[5084] Direct3D9: :====> ENTER: DLLMAIN(0611e6e0): Process Attach: 000013dc, tid=0000136c
[5084] 
[5084] Direct3D9: :====> EXIT: DLLMAIN(0611e6e0): Process Attach: 000013dc
[5084] 
[5084] Direct3D9: (INFO) :Direct3D9 Debug Runtime selected.
[5084] 
[5084] D3D9 Helper: Enhanced D3DDebugging disabled; Application was not compiled with D3D_DEBUG_INFO 
[5084] Direct3D9: (INFO) :======================= Hal SWVP device selected 
[5084] 
[5084] Direct3D9: (INFO) :HalDevice Driver Style 9 
[5084] 
[5084] Direct3D9: :BackBufferCount not specified, considered default 1 
[5084] 
[5084] Direct3D9: :DoneExclusiveMode
[5084] 
[5084] Direct3D9: (INFO) :Failed to create driver indexbuffer
[5084] 
[5084] Direct3D9: (INFO) :Using P4 PSGP 
[5084] 
[5084] Direct3D9: :====> ENTER: DLLMAIN(0611e6e0): Process Detach 000013dc, tid=0000136c
[5084] 
[5084] Direct3D9: (INFO) :MemFini!
[5084] 
[5084] Direct3D9: (WARN) :Memory still allocated!  Alloc count = 6
[5084] 
[5084] Direct3D9: (WARN) :Current Process (pid) = 000013dc
[5084] 
[5084] Direct3D9: (WARN) :Memory Address: 01ca8c80 lAllocID=1 dwSize=000047f8, (pid=000013dc)
[5084] 
[5084] Direct3D9: (WARN) :  Stack Back Trace
[5084] 
[5084] Direct3D9: (ERROR) :    [0] : Address 0611E4CB
[5084] 
[5084] Direct3D9: (ERROR) :    [1] : Address 0611E59B
[5084] 
[5084] Direct3D9: (ERROR) :    [2] : Address 0611E440
[5084] 
[5084] Direct3D9: (ERROR) :    [3] : Address 06112DB4
[5084] 
[5084] Direct3D9: (ERROR) :    [4] : Address 4E03B085
[5084] 
[5084] Direct3D9: (ERROR) :    [5] : Address 79EF064C
[5084] 
[5084] Direct3D9: (ERROR) :    [6] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [7] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [8] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [9] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [10] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [11] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [12] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [13] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [14] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [15] : Address 00000000
[5084] 
[5084] Direct3D9: (WARN) :Memory Address: 06770228 lAllocID=12 dwSize=00001a94, (pid=000013dc)
[5084] 
[5084] Direct3D9: (WARN) :  Stack Back Trace
[5084] 
[5084] Direct3D9: (ERROR) :    [0] : Address 061150D4
[5084] 
[5084] Direct3D9: (ERROR) :    [1] : Address 06115EBF
[5084] 
[5084] Direct3D9: (ERROR) :    [2] : Address 061165F8
[5084] 
[5084] Direct3D9: (ERROR) :    [3] : Address 06112DD5
[5084] 
[5084] Direct3D9: (ERROR) :    [4] : Address 4E03B085
[5084] 
[5084] Direct3D9: (ERROR) :    [5] : Address 79EF064C
[5084] 
[5084] Direct3D9: (ERROR) :    [6] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [7] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [8] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [9] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [10] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [11] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [12] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [13] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [14] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [15] : Address 00000000
[5084] 
[5084] Direct3D9: (WARN) :Memory Address: 06771d20 lAllocID=13 dwSize=00000050, (pid=000013dc)
[5084] 
[5084] Direct3D9: (WARN) :  Stack Back Trace
[5084] 
[5084] Direct3D9: (ERROR) :    [0] : Address 0611514B
[5084] 
[5084] Direct3D9: (ERROR) :    [1] : Address 06115EBF
[5084] 
[5084] Direct3D9: (ERROR) :    [2] : Address 061165F8
[5084] 
[5084] Direct3D9: (ERROR) :    [3] : Address 06112DD5
[5084] 
[5084] Direct3D9: (ERROR) :    [4] : Address 4E03B085
[5084] 
[5084] Direct3D9: (ERROR) :    [5] : Address 79EF064C
[5084] 
[5084] Direct3D9: (ERROR) :    [6] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [7] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [8] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [9] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [10] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [11] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [12] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [13] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [14] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [15] : Address 00000000
[5084] 
[5084] Direct3D9: (WARN) :Memory Address: 06771dd0 lAllocID=14 dwSize=00000008, (pid=000013dc)
[5084] 
[5084] Direct3D9: (WARN) :  Stack Back Trace
[5084] 
[5084] Direct3D9: (ERROR) :    [0] : Address 061151C2
[5084] 
[5084] Direct3D9: (ERROR) :    [1] : Address 06115EBF
[5084] 
[5084] Direct3D9: (ERROR) :    [2] : Address 061165F8
[5084] 
[5084] Direct3D9: (ERROR) :    [3] : Address 06112DD5
[5084] 
[5084] Direct3D9: (ERROR) :    [4] : Address 4E03B085
[5084] 
[5084] Direct3D9: (ERROR) :    [5] : Address 79EF064C
[5084] 
[5084] Direct3D9: (ERROR) :    [6] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [7] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [8] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [9] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [10] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [11] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [12] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [13] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [14] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [15] : Address 00000000
[5084] 
[5084] Direct3D9: (WARN) :Memory Address: 06771e38 lAllocID=15 dwSize=000006e0, (pid=000013dc)
[5084] 
[5084] Direct3D9: (WARN) :  Stack Back Trace
[5084] 
[5084] Direct3D9: (ERROR) :    [0] : Address 0611679F
[5084] 
[5084] Direct3D9: (ERROR) :    [1] : Address 06112DD5
[5084] 
[5084] Direct3D9: (ERROR) :    [2] : Address 4E03B085
[5084] 
[5084] Direct3D9: (ERROR) :    [3] : Address 79EF064C
[5084] 
[5084] Direct3D9: (ERROR) :    [4] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [5] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [6] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [7] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [8] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [9] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [10] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [11] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [12] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [13] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [14] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [15] : Address 00000000
[5084] 
[5084] Direct3D9: (WARN) :Memory Address: 06772578 lAllocID=16 dwSize=00000050, (pid=000013dc)
[5084] 
[5084] Direct3D9: (WARN) :  Stack Back Trace
[5084] 
[5084] Direct3D9: (ERROR) :    [0] : Address 06116AE8
[5084] 
[5084] Direct3D9: (ERROR) :    [1] : Address 06112DD5
[5084] 
[5084] Direct3D9: (ERROR) :    [2] : Address 4E03B085
[5084] 
[5084] Direct3D9: (ERROR) :    [3] : Address 79EF064C
[5084] 
[5084] Direct3D9: (ERROR) :    [4] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [5] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [6] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [7] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [8] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [9] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [10] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [11] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [12] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [13] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [14] : Address 00000000
[5084] 
[5084] Direct3D9: (ERROR) :    [15] : Address 00000000
[5084] 
[5084] Direct3D9: (WARN) :Total Memory Unfreed From Current Process = 27156 bytes
[5084] 
[5084] Direct3D9: :====> EXIT: DLLMAIN(0611e6e0): Process Detach 000013dc
[5084] 



Thanks. [Edited by - Froyd on June 13, 2007 6:40:53 PM]

Share this post


Link to post
Share on other sites
Advertisement
i think the easiest thing to do here is to show the code.

it isn't quite large anyways.


using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using Microsoft.DirectX;
using Microsoft.DirectX.Direct3D;

namespace Chapter5Code
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private Device device = null;
private Mesh mesh = null;
private Material[] meshMaterials;
private Texture[] meshTextures;

/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
private float angle = 0.0f;

public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();

this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque, true);
}

/// <summary>
/// We will initialize our graphics device here
/// </summary>
public void InitializeGraphics()
{
// Set our presentation parameters
PresentParameters presentParams = new PresentParameters();

presentParams.Windowed = true;
presentParams.SwapEffect = SwapEffect.Discard;
presentParams.AutoDepthStencilFormat = DepthFormat.D16;
presentParams.EnableAutoDepthStencil = true;

// Create our device
device = new Device(0, DeviceType.Hardware, this, CreateFlags.SoftwareVertexProcessing, presentParams);

// Load our mesh
LoadMesh(@"..\..\tiny.x");
}

private void LoadMesh(string file)
{
ExtendedMaterial[] mtrl = null;

// Load our mesh
//THIS IS WHERE IT CRASHES
mesh = Mesh.FromFile(file, MeshFlags.Managed, device, out mtrl);

// If we have any materials, store them
if ((mtrl != null) && (mtrl.Length > 0))
{
meshMaterials = new Material[mtrl.Length];
meshTextures = new Texture[mtrl.Length];

// Store each material and texture
for (int i = 0; i < mtrl.Length; i++)
{
meshMaterials = mtrl.Material3D;
if ((mtrl.TextureFilename != null) && (mtrl.TextureFilename != string.Empty))
{
// We have a texture, try to load it
meshTextures = TextureLoader.FromFile(device, @"..\..\" + mtrl.TextureFilename);
}
}
}
}

private void SetupCamera()
{
device.Transform.Projection = Matrix.PerspectiveFovLH((float)Math.PI / 4, this.Width / this.Height, 1.0f, 10000.0f);
device.Transform.View = Matrix.LookAtLH(new Vector3(0,0, 580.0f), new Vector3(), new Vector3(0,1,0));
//device.RenderState.Ambient = Color.DarkBlue;
device.Lights[0].Type = LightType.Directional;
device.Lights[0].Diffuse = Color.White;
device.Lights[0].Direction = new Vector3(0, -1, -1);
device.Lights[0].Update();
device.Lights[0].Enabled = true;

}

protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
{
device.Clear(ClearFlags.Target | ClearFlags.ZBuffer, Color.CornflowerBlue, 1.0f, 0);

SetupCamera();

device.BeginScene();

// Draw our Mesh
DrawMesh(angle / (float)Math.PI, angle / (float)Math.PI * 2.0f, angle / (float)Math.PI / 4.0f, 0.0f, 0.0f, 0.0f);

device.EndScene();

device.Present();

this.Invalidate();
}

private void DrawMesh(float yaw, float pitch, float roll, float x, float y, float z)
{
angle += 0.01f;

device.Transform.World = Matrix.RotationYawPitchRoll(yaw, pitch, roll) * Matrix.Translation(x, y, z);
for (int i = 0; i < meshMaterials.Length; i++)
{
device.Material = meshMaterials;
device.SetTexture(0, meshTextures);
mesh.DrawSubset(i);
}
}

/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.Size = new Size(800,600);
this.Text = "Form1";
}
#endregion

/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main()
{
using (Form1 frm = new Form1())
{
// Show our form and initialize our graphics engine
frm.Show();
frm.InitializeGraphics();
Application.Run(frm);
}
}
}
}



Share this post


Link to post
Share on other sites
Problem Solved

WinXp64 WAS the issue. There's nothing we can do with MDX and 64bits
I dualbooted a x86 version of xp and without changing the code, it mysteriously works now

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!