0
0

I have been trying to get the examples contained with FMODEX-4.03 to run. I’ve tried many examples with no avail. They all fail when calling system->init(…) on a valid FMOD::System. It normally segfaults, but every now and then it will just sit there and I terminate the program after several minutes. I have tried the playsound and playstream samples. I have also tried changing the output type to FMOD_OUTPUTTYPE_ALSA and FMOD_OUTPUTTYPE_OSS.

Other ALSA and OSS applications run just fine on this computer, and I am certain that none are running while I am testing my application. The machine is an Athlon64 running on Gentoo Linux 2.6.14. The sound card is a nVidia Corporation nForce3 250Gb AC’97 Audio Controller, the same problem occurs when using my ICE1712 [Envy24] card. Sometimes I can hear a “pop” when the FMOD initialization code is executed, but the program still fails. I seriously doubt it is ALSA since the problem also exists in OSS, and because other sound programs run perfectly fine.

So, I decided to try on my Pentium-m laptop instead. This computer is running the same version of Linux (but on a 32bit architecture) and has an Intel 82801FB (intel-hd) sound chip. The example programs always halt at System::init(..) while running FMOD_OUTPUTTYPE_ALSA; I must kill the program. However, when I run the program with FMOD_OUTPUTTYPE_OSS, it exits immediately with a segfault. Again, this is on system->init(…). This computer has had no prior problems with sound.

Even more interesting, FMOD 3.75 behaves differently. The “stream” sample, among others, runs fine in OSS. No waits, no segfaults, it runs perfect. The program doesn’t crash or freeze when running ALSA either. However, anything played by FMOD while using ALSA sounds sped up and sounds incorrect (choppy, high-pitch, increased speed).

I’d like to use ALSA, but I can deal with OSS. Unfortunately, I need the ability to run in 64bit and 32bit and 3.75 does not run on AMD64. Why is FMOD Ex not working properly, on two different systems, none the less?

EDIT: Any Ideas? Is there any more information I can post?

  • You must to post comments
0
0

I’m trying to dwell into the problem a little deeper. I get the following backtrace on my 64 bit system. This is when FMOD::System::Init() segfaults with output FMOD_OUTPUTTYPE_OSS:

0 0x00002aaaab332a25 in __pthread_unlock () from /lib/libpthread.so.0

1 0x00002aaaab332327 in sem_wait@@GLIBC_2.2.5 () from /lib/libpthread.so.0

2 0x00002aaaaac462d1 in FMOD_OS_CriticalSection_Enter(FMOD_OS_CRITICALSECTION*) () from ../../api/lib/libfmodex64.so

3 0x00002aaaaac1c43e in FMOD::LocalCriticalSection::enter() () from ../../api/lib/libfmodex64.so

4 0x00002aaaaac2c61e in FMOD::DSPI::addInput(FMOD::DSPI*) () from ../../api/lib/libfmodex64.so

5 0x00002aaaaac43f8c in FMOD::SystemI::init(int, unsigned, void*) () from ../../api/lib/libfmodex64.so

6 0x00002aaaaac3cc1c in FMOD::System::init(int, unsigned, void*) () from ../../api/lib/libfmodex64.so

7 0x000000000040176d in main (argc=1, argv=0x7fffffe7ba98) at main.cpp:71

I tried with FMOD_OUTPUTTYPE_ALSA, I get the following backtrace when the progrem segfaults:

0 0x00002aaaab33238a in sem_wait@@GLIBC_2.2.5 () from /lib/libpthread.so.0

1 0x00002aaaaac462d1 in FMOD_OS_CriticalSection_Enter(FMOD_OS_CRITICALSECTION*) () from ../../api/lib/libfmodex64.so

2 0x00002aaaaac1c43e in FMOD::LocalCriticalSection::enter() () from ../../api/lib/libfmodex64.so

3 0x00002aaaaac2c61e in FMOD::DSPI::addInput(FMOD::DSPI*) () from ../../api/lib/libfmodex64.so

4 0x00002aaaaac43f8c in FMOD::SystemI::init(int, unsigned, void*) () from ../../api/lib/libfmodex64.so

5 0x00002aaaaac3cc1c in FMOD::System::init(int, unsigned, void*) () from ../../api/lib/libfmodex64.so

6 0x000000000040176d in main (argc=1, argv=0x7fffffea0f38) at main.cpp:71

When ALSA hangs (which is more likely than segfaulting when running ALSA on x64. Or, ALSA hangs and never segfault on the pentium-m), the backtrace of the program while it is blocking is:

0 0x00002aaaab332a25 in __pthread_unlock () from /lib/libpthread.so.0

1 0x00002aaaab332327 in sem_wait@@GLIBC_2.2.5 () from /lib/libpthread.so.0

2 0x00002aaaaac462d1 in FMOD_OS_CriticalSection_Enter(FMOD_OS_CRITICALSECTION*) () from ../../api/lib/libfmodex64.so

3 0x00002aaaaac1c43e in FMOD::LocalCriticalSection::enter() () from ../../api/lib/libfmodex64.so

4 0x00002aaaaac2c61e in FMOD::DSPI::addInput(FMOD::DSPI*) () from ../../api/lib/libfmodex64.so

5 0x00002aaaaac43f8c in FMOD::SystemI::init(int, unsigned, void*) () from ../../api/lib/libfmodex64.so

6 0x00002aaaaac3cc1c in FMOD::System::init(int, unsigned, void*) () from ../../api/lib/libfmodex64.so

7 0x000000000040176d in main (argc=1, argv=0x7fffffe7ba98) at main.cpp:71

Notice, this appears to be about the same place where OSS segfaults. It looks like ALSA hangs while sem_init is blocking. It also looks like the freezing occurs as FMOD enters a critical section of code. I repeated the above tests multiple times on both of my machines (AMD64 and Intel Pentium-M) and the results are consistant. The results seem to backup my belief that the problem lies in FMOD itself.

Any ideas? FMOD looks like a very nice library, but I would really like to know if it is going to work properly for me before I commit to this sound library. I get worried when the included examples do not even run.

Thank you.

  • You must to post comments
0
0

Dang, over 85 views and no replies…

  • You must to post comments
0
0

Thanks alot Brett! I hope that the conference went alright. I just sent an email to support so hopefully we can get the ball rolling on this one.

  • You must to post comments
0
0

Yeah, it did turn out to be a problem in one of FMOD’s critical sections.

Anyways, the 4.03.04 beta seems to fix all the issues I was having (segfaults, freezes, and studdering ALSA output.) FMOD is a whole lot sweeter when it is playing music.

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.