Debugging the DLL

Topics: Developer Forum
Mar 23, 2008 at 11:21 AM
Hi,

I'd like to be able to set a breakpoint on the Content Importer, eg AnimatedModelProcessor.

The MSDN help page "How to: Debug from a DLL Project" uses many words to say, "Use Project properties -> Debug -> Start Action"; but this Start Action doesn't appear as described.

Can anyone help?

Cheers,
Darren
Mar 23, 2008 at 11:34 AM
The problem in question is a NullRefEx in ValidateMeshSkeleton.

meshContent.Parent can be null (experimentally returning either true or false leads to more errors later).

Any ideas on either problem would be appreciated!

Darren
Mar 24, 2008 at 3:04 AM

snowboarder wrote:
The MSDN help page "How to: Debug from a DLL Project" uses many words to say, "Use Project properties -> Debug -> Start Action"; but this Start Action doesn't appear as described.


I realised that this feature has been removed for the Express version. What fun.
Coordinator
Mar 24, 2008 at 6:53 PM
Edited Mar 24, 2008 at 6:56 PM
I'm not sure about this, but I think to debug content pipeline code with breakpoints, you need Visual Studio 2005/2008. You might be able to remotely debug by using System.Diagnostics.Debugger.Launch();
in the content code though.


Sounds like you are having trouble importing a model. If it is in ascii .x format, I can take a look at the file if you want and may notice what is wrong.
Mar 25, 2008 at 11:19 AM
Edited Mar 25, 2008 at 11:32 AM
Cool, thanks - spent the day upgrading to 2005 standard / xna 2.

It's not building though - BuildContent task throws FileNotFoundEx, 'could not load file or assembly 'Microsoft.Xna.Framework.Content.Pipeline, Version=1.0' or one of its dependencies.

I'm wondering if I need to rebuild these .dll files for Game Studio 2, do you think that might be the case? If so I might just try going back to to gs 1.1.

Thanks a lot for your help - this library looks to be useful :) The model's in fbx by the way, from maya. Are there any special requirements for this?
Apr 3, 2008 at 11:38 PM
Snowboarder... you haven't properly upgraded your system to use XNA 2.0... or you have some old references... as "Microsoft.Xna.Framework.Content.Pipeline, Version=1.0" is a XNA 1.0 library....

I'm having the same problem, so maybe we can work together... hopefully w/ some help from others...

Here's where I stand....
I've got my solution using the XNA 2.0 libraries, and have upgraded the Animation Component Library to work as a 2.0 content pipeline compiler... I'm also using the FBX exporter for 3DS Max, I'm using this exporter as I have found that the panda and KwXport exporters for the .X format seem to sometimes export the animation incorrectly. In my opinion the KwXport exporter is better than the panda one... but FBX is better still... it just seems harder to use and is more rigid in it's interpretation. I'd like to post my content on this site... but I don't own it and will need to ask for permission first. Maybe you could post yours instead? Better if you're using 3DS Max and post the MAX file...

Here's where what I've done...
  • I've placed the "System.Diagnostics.Debugger.Launch();" line w/in the ValidateMeshSkeleton function... and force it to return true... (is this safe?) for me this is failing cause the meshContent does not have a parent.
  • I then get further exceptions w/in ProcessSkinInfo... within the "for (int j = 0; j < skinnedBoneNames.Count; j++)" loop I get a "KeyNotFoundException" error when I try to perform a lookup w/in the boneDictname. I get around this by setting the "name" to the one and only name in my boneDict... then everything compiles....
  • Then when I run with this compiled content... I get a exception within ModelAnimator's Draw routine... "Both a valid vertex shader and pixel shader (or valid effect) must be set on the device before any draw operations may be performed." I get this error at "device.DrawIndexedPrimitives(PrimitiveType.TriangleList, currentPart.BaseVertex, 0, currentPart.NumVertices, currentPart.StartIndex, currentPart.PrimitiveCount);"

And now I'm stuck... I'm thinking it's something to do w/ my model... probably some heirarchy issue... I'm just not an artist or 3ds max expert.
Apr 4, 2008 at 3:51 PM
Hmm - what does the heirarchy look like in Max? If you like you can send it my way - alex at alexhogan dot com - and I can check it in Max. I've been testing the Animation Component with Maya so far, so there might be some problem I don't know of from Max. Also, can you post what version of Max and what version of the FBX exporter plugin you are using? Autodesk releases updates, and the latest version is usually the best to use.
Apr 4, 2008 at 8:31 PM
ObsidianPC...

about the heirarchy... I don't even know... As a programmer... I'm probably the worst 3DS MAX modeler you've ever seen... I have trouble just navigating around... well maybe not that bad, but you get the idea. If you tell me how, I could go and try and get you that info.

I'm currently using version 9. and the 2006.11 build of the FBX plugin... the latest one "fbx20061123dsmax90winenu.exe"

about sending content... sorry but no can do... as I do not own this content...

Apr 6, 2008 at 9:47 PM
Hmm - well, without the scene file there's not too much I can do remotely - it's hard to see what's coming out of FBX or the scene. Does your code work with the Dwarf Demo?