3dsmax 2010 crashes when export directx shader

Exporting a cube with a directx shader crashes max. This is happening with the latest pandaX porter as well. The exporter fails to copy the fx file. The fx has no errors. any one else experiencing this?

Are you using the latest

Are you using the latest version of kW X-port? There was a known crash in 2010, but I worked around it (at a small cost in leaked memory each time you export).

Both Panda3D and kW X-port uses a built-in Max function called "IGame" for getting ahold of all the data inside 3ds Max so it can be converted to .X and exported. The IGame function has never been particularly bug free, unfortunately. I have a long-term project cooking on the back burner of totally replacing IGame and going straight to the Max "metal," but that will probably take a very long time to see the light of day.

re 3dsmax 2010 crashes when export directx shader

I have the latest versions of kw xport and panda. Panda release a patch but that didnt fix the crash. Kw 1.44 still crashes. hmm... can we apply shaders to models using xna Effects class instead of trying to export the embedded fx file in the model? It would be a temporary solution until somebody fixes the exporter...

This is extra weird, because

This is extra weird, because kW X-port 1.4.4 doesn't use IGame anymore for shaders (because that had too many problems). It uses the same interface that Max uses internally.
Can you export that same file using the latest FBX exporter, or does that also crash?
Could you make the .max and .fx files available for download somewhere?

If you want to apply effects after the fact, you can do that in an XNA Content Pipeline custom ModelProcessor. One example of such a processor is found in the kW Animation library: http://www.enchantedage.com/xna-animation
In that processor, you can force a specific shader file for each model. However, the parameters for that shader will be the defaults, so you'd have to come up with another way of setting the right parameters.

Test Files

Everything in this post uses:
- Vista Business 32-bit
- 3ds Max 2010 32-bit
- kwxport-1.4.4-32bit

"Can you export that same file using the latest FBX exporter, or does that also crash?"

The Autodesk .FBX exporter woks fine with all .MAX files I have tried. (I just now installed the latest .FBX plugin from the Autodesk site. Also, exporting from 3ds Max 2010's default .FBX plugin worked fine as well)

"Could you make the .max and .fx files available for download somewhere?"

Sure. Here is a simple box with Autodesk's "Default.fx" applied to it. I just now tested it, and 3ds Max crashed on export when using kwxport. http://robotarcade.com/SA/simpleboxwithdefaultfx.max

The .fx file is in the 3ds Max 2010 'maps/fx' directory, and also here: http://robotarcade.com/xna/default.fx

Screenshots:

http://robotarcade.com/SA/kwxport.png
http://robotarcade.com/SA/kwerror.png

I have no idea if this is helpful, but the following printed when I hit "View problem details" on the crash dialog:

===================================
Problem signature:
Problem Event Name: APPCRASH
Application Name: 3dsmax.exe
Application Version: 12.0.0.106
Application Timestamp: 49b98f6f
Fault Module Name: StackHash_11e3
Fault Module Version: 6.0.6002.18005
Fault Module Timestamp: 49e03821
Exception Code: c0000374
Exception Offset: 000afaf8
OS Version: 6.0.6002.2.2.0.256.6
Locale ID: 1033
Additional Information 1: 11e3
Additional Information 2: 84b9ece3a09308db6b3756fabc16502a
Additional Information 3: f0f6
Additional Information 4: 0e62264616c8ae04594cd33580de6ab9
====================================

Please let me know if I can help out in any way.
You recently helped my greatly in the XNA forum.

Interesting. That looks like

Interesting. That looks like an honest Max crash, not a kW crash. (You get a dialog saying "kW X-port has crashed" when kW crashes inside its own code).
I may be able to give it a spin this week-end; we'll see.

Panda crashes too

Just as another gentleman posted, Panda also crashes, and in the very same way.

I am using the latest version of Panda:
Panda Directx Exporter x86 (5.2010.68.0) for 3DS Max 2010 (32 bit)
Vista Business 32-bit
3ds Max 2010

2010 Version Number

Our copy of 3ds Max 2010 32-bit shows "About 3ds Max->Release" as "12.0 commercial"

( johnnnnny and I are affiliated )

My experiences: Crashes on

My experiences:

Crashes on export: Vista Business 32-bit / 3ds Max 2010 32-bit / kwxport-1.4.4-32bit

Works fine on export: Windows 7 RC1 64-bit / 3ds Max 2010 64-bit / kwxport-1.4.4-64bit

"can we apply shaders to models using xna Effects class"

I'd love to know how to do this. Can anyone provide a tutorial URL?

My errors

Just adding in my experience into this matter as well, in case it could help.

First off, I get this crash as well, Vista Home Premium 32-bit / 3ds Max 2010 32-bit / kwxport-1.4.4-32-bit

In addition, after having installed the latest version I can no longer export working .X files from 3ds Max Design Suite 2009 32-bit, despite having a .fx as only source of material for the model, (the exact same model and settings were used when I exported it using 1.3.4 32-bit a mere few minutes before the first test of 1.4.4 32-bit.

Gonna see if I can get a hold of the interesting parts of the error report from the XNA compile.