Panda3d fmod sound initialization error

Just installed panda 3d 1.2.1 on my system (windows XP Pro) and I receive an ugly error message whenever I run any of the samples:

“The procedure entry point_FSOUND_3D_SetMinMaxDistance@12 could not be located in the dynamic link library fmod.dll”

any ideas?


Yes. Chances are, panda is searching for the fmod DLL, and finding the wrong one. Just to see what happens, do a “search for files and folders,” and see if there are two fmod DLLs on your system.

If that’s the problem, then I need to think of a long-term solution.

yah, Ive got like 10 different fmod.dll files sitting in various directories on my hdd

Hm. I’m not sure what to do about that.

One thing you could do as a stopgap measure is put the panda directory first on your path.

Wait, now I’m confused. I’m looking at the code for ppython, and it already puts the panda directory first on the path - for this very reason.

So why the heck are we getting this crap?

We need to figure out which fmod DLL it’s using. You could download filemon from sysinternals, that would tell you.

I had this problem today. There was a fmod.dll in c:\windows\system32 that panda (1.2.1) tried to use.
Once it was removed everything worked just fine.

Deps - yes, you’re right. That’s it.

From the microsoft documentation:

With both implicit and explicit linking, Windows first searches for “known DLLs”, such as Kernel32.dll and User32.dll. Windows then searches for the DLLs in the following sequence:

  1. The directory where the executable module for the current process is located.
  2. The current directory.
  3. The Windows system directory. The GetSystemDirectory function retrieves the path of this directory.
  4. The Windows directory. The GetWindowsDirectory function retrieves the path of this directory.
  5. The directories listed in the PATH environment variable.

So there you have it. It doesn’t even matter how your PATH is set, because it looks in the windows system directory first.

Of course, at the very top of the list is “the directory where the executable module for the current process is located.” That’s why I put all the DLLs in the same directory as the EXEs. But there’s an exception: python.exe isn’t in the same directory as all the other exe’s.

I think, in the long run, the solution is to put the python exe in the same directory. But that’s going to take some experimentation.