Author Topic: BASS_ChannelPlay on 32-bit Linux crashes with EDivByZero Error  (Read 313 times)

JRfromFL

  • Posts: 16
Hi,

I just tried to switch to the newest Bass Version 2.4.12. I have a very simple program for testing, just a BASS_Init, a BASS_StreamCreateFile and a BASS_ChannelPlay and the program crashes with a EDivByZero, when calling BASS_ChannelPlay.
If I now switch back to lib version 2.4.10 by replacing the lib file the program plays the audiofile. Of course I checked the results of the BASS calls, but Init and StreamCreateFile results were okay. The audiofile is a 44.1 / stereo / wav.
I use a current XUBUNTU linux and Lazarus 1.7 / FPC 3.1.1 but I also tried on debian linux.

Has anybody an idea, what I'm doing wrong?

Thanks.

JRfromFL

Ian @ un4seen

  • Administrator
  • Posts: 20502
I suspect the issue there is that Free Pascal is enabling floating-point exceptions. The C library disables floating-point exceptions and the GCC compiler (used to build BASS) is assuming that is the case in some of its optimizations (BASS 2.4.10 may have been built with a different GCC version). SetExceptionMask can be used in Free Pascal to disable floating-point exceptions. Here's a recent post on the subject:

   www.un4seen.com/forum/?topic=17120.msg120029#msg120029