   Another odd message
  I am still struggling with trying to convert Jim Adams' "RPG with DX" coding from DX8 to DX9.   I have a .x skinned mesh that I want to load, using D3DXLoadSkinMeshFromXof.   The app. compiles and links OK but when I run it I get an error message that tells me the program has stopped working.   Checking through the debug Call Stack there is an entry:"d3dx9_36.dll!D3DXMesh::D3DXLoadSkinMeshFromXofEx()  + 0x7f bytes".   The symbol information tells me: "C:\Windows\System32\d3dx9_36.pdb: Cannot find or open the PDB file".Can anyone explain how to solve this problem?   
  1. Any output from the Debug Runtimes?2. Are you actually running a debug build in the IDE (And not by double clicking the exe, or running a release build)?3. Are you checking the return value of your functions (I don't recall if the book does, and I'm too lazy to extract it from my bookshelf and find out)?Basically it's a crash in D3DXLoadSkinMeshFromXofEx, probably caused by your app passing it a bad pointer.   ;  Thanks, Evil Steve; answers as follows:1. yes2. yes3. OK, I'll sort through the pointers, but first impressions are that they are OK.   Nevertheless, here goes!   ;Quote:Original post by thollandThanks, Evil Steve; answers as follows:1. yesI should have said - Are there any relevant error messages in the debug output?   ;  Yes! :-'ParseMesh.exe': Loaded 'C:\Advanced Animation\BookCode\Chap03\ParseMesh\Debug\ParseMesh.exe', Symbols loaded.'ParseMesh.exe': Loaded 'C:\Windows\System32\ntdll.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\kernel32.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\d3d9.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\msvcrt.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\user32.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\gdi32.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\advapi32.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\rpcrt4.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\version.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\d3d8thk.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\dwmapi.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\d3dx9_36.dll', Symbols loaded (source information stripped).'ParseMesh.exe': Loaded 'C:\Windows\System32\d3dxof.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\comdlg32.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\shlwapi.dll''ParseMesh.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.6001.18000_none_886786f450a74a05\comctl32.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\shell32.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\ole32.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\imm32.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\msctf.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\lpk.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\usp10.dll''ParseMesh.exe': Loaded 'C:\Program Files\Google\Google Desktop Search\GoogleDesktopNetwork3.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\ws2_32.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\nsi.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\ntmarta.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\Wldap32.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\psapi.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\samlib.dll''ParseMesh.exe': Unloaded 'C:\Program Files\Google\Google Desktop Search\GoogleDesktopNetwork3.dll''ParseMesh.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.6001.18000_none_5cdbaa5a083979cc\comctl32.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\uxtheme.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\d3d9d.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\winmm.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\oleaut32.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\oleacc.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\d3dx9d_33.dll'Direct3D9: :====> ENTER: DLLMAIN(02a7e6e0): Process Attach: 0000124c, tid=000003c4Direct3D9: (ERROR) :Could not create exclusive mode mutex. exiting'ParseMesh.exe': Unloaded 'C:\Windows\System32\d3d9d.dll''ParseMesh.exe': Unloaded 'C:\Windows\System32\d3dx9d_33.dll''ParseMesh.exe': Unloaded 'C:\Windows\System32\winmm.dll''ParseMesh.exe': Unloaded 'C:\Windows\System32\oleacc.dll''ParseMesh.exe': Unloaded 'C:\Windows\System32\oleaut32.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\nvd3dum.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\clbcatq.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\oleaut32.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\msiltcfg.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\msi.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\sfc.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\sfc_os.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\setupapi.dll''ParseMesh.exe': Loaded 'C:\Program Files\Common Files\microsoft shared\ink\skchui.dll', Binary was not built with debug information.'ParseMesh.exe': Unloaded 'C:\Program Files\Common Files\microsoft shared\ink\skchui.dll''ParseMesh.exe': Loaded 'C:\Program Files\Common Files\microsoft shared\ink\penusa.dll', Binary was not built with debug information.'ParseMesh.exe': Unloaded 'C:\Program Files\Common Files\microsoft shared\ink\penusa.dll''ParseMesh.exe': Loaded 'C:\Program Files\Common Files\microsoft shared\ink\penusa.dll', Binary was not built with debug information.'ParseMesh.exe': Unloaded 'C:\Program Files\Common Files\microsoft shared\ink\penusa.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\browseui.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\propsys.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\duser.dll''ParseMesh.exe': Loaded 'C:\Program Files\Common Files\microsoft shared\ink\tiptsf.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\WindowsCodecs.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\apphelp.dll''ParseMesh.exe': Loaded 'C:\Program Files\SmartFTP Client\sfShellTools.dll''ParseMesh.exe': Unloaded 'C:\Program Files\SmartFTP Client\sfShellTools.dll''ParseMesh.exe': Loaded 'C:\Program Files\SmartFTP Client\sfShellTools.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\userenv.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\secur32.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\xmllite.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\rsaenh.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\msshsq.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\thumbcache.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\actxprxy.dll'The thread 'Win32 Thread' (0x13a4) has exited with code 0 (0x0).'ParseMesh.exe': Loaded 'C:\Windows\System32\shdocvw.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\ieframe.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\iertutil.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\ntshrui.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\netapi32.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\cscapi.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\SLC.dll''ParseMesh.exe': Loaded 'C:\Windows\System32\linkinfo.dll''ParseMesh.exe': Unloaded 'C:\Windows\System32\ntshrui.dll''ParseMesh.exe': Unloaded 'C:\Windows\System32\xmllite.dll'The thread 'Win32 Thread' (0x11dc) has exited with code 0 (0x0).The thread 'Win32 Thread' (0x1684) has exited with code 0 (0x0).The thread 'Win32 Thread' (0x16e8) has exited with code 0 (0x0).The thread 'Win32 Thread' (0xd8c) has exited with code 0 (0x0).The thread 'Win32 Thread' (0x1794) has exited with code 0 (0x0).The thread 'Win32 Thread' (0x1550) has exited with code 0 (0x0).First-chance exception at 0x5fa3909c (d3dx9_36.dll) in ParseMesh.exe: 0xC0000005: Access violation reading location 0x00000000.Unhandled exception at 0x5fa3909c (d3dx9_36.dll) in ParseMesh.exe: 0xC0000005: Access violation reading location 0x00000000.I believe the final message confirms your point about a faulty pointer and I may have a clue.   Adams gets confused between DX8 and DX9 and I think he has muddled LPDIRECTXFILEDATA pointers with LPD3DXFILEDATA ones.   This is going to take a bit of sorting out!   ;Quote:Original post by thollandFirst-chance exception at 0x5fa3909c (d3dx9_36.dll) in ParseMesh.exe: 0xC0000005: Access violation reading location 0x00000000.Unhandled exception at 0x5fa3909c (d3dx9_36.dll) in ParseMesh.exe: 0xC0000005: Access violation reading location 0x00000000.That's almost always caused by dereferencing a null pointer. For example, loading a mesh from a file and not checking if the function SUCCEEDED() or FAILED(). If it fails, then the mesh pointer is null, and when you try to use it, you get an access violation.Quote:Original post by thollandI believe the final message confirms your point about a faulty pointer and I may have a clue.   Adams gets confused between DX8 and DX9 and I think he has muddled LPDIRECTXFILEDATA pointers with LPD3DXFILEDATA ones.   This is going to take a bit of sorting out!I seem to recall that quite a few functions and data structures were changed in DX9 from DX8, particularly in the D3DX library. There's been posts on this forum before by people trying to run the code with DX9 and the latest SDK / Visual Studio version, it might be worthwhile having a search to see if you can find any relevant posts.   ;  Another mystery!   I have successfully run the program, by using an old version  of DX9 (the version that came with Adams' Advanced Animation with DX, published in 2003)   So where can I find the changes that have been made to DX9 since then?Thanks for all your help, Evil Steve   