Author Topic: SegFault in BASS_FXSetPriority()  (Read 603 times)

Dan Balasescu

  • Guest
SegFault in BASS_FXSetPriority()
« on: 24 Nov '21 - 07:11 »
We're occasionally seeing a segfault in BASS_FXSetPriority() that we're unsure of how to deal with.

Here's a crash dump: https://drive.google.com/file/d/1SoQyATp_dPfGQHqrlyzgDBhEz_3ePAvz/view?usp=sharing (file: crash.dmp)
The failing thread ID is 3024 / 0xbd0

All of our audio operations happen on one thread, and as far as I know we're not doing anything special such as giving an invalid handle otherwise I'd expect (and have tested) to receive an BASS_ERROR_HANDLE. It may be related to running on the no-sound device (device 0), though I can't exactly confirm this is the case as we're only seeing the segfaults on a CI server.

We've reproduced on:
- macOS
- Linux (x64)
- Windows (x64)
x86 variants untested.

Any help would be appreciated, thanks!

Ian @ un4seen

  • Administrator
  • Posts: 25275
Re: SegFault in BASS_FXSetPriority()
« Reply #1 on: 24 Nov '21 - 14:32 »
Unfortunately, that dump file doesn't appear to contain an exception context with info on the crash. Can you get one that does? I'm not a .Net user myself, so I'm not sure how easy that is to do. One thing you could try is having Windows generate dump files automatically by applying this "localdumps-full" registry entry:

  www.un4seen.com/stuff/localdumps.zip

Windows will then generate a dump file in "%LOCALAPPDATA%\CrashDumps" whenever a crash occurs. Note that it'll be a full dump, so you might not want post it publicly if the app deals with any private info. You could upload it here instead:

  ftp.un4seen.com/incoming/

There's no need to include the system DLL and PDB files with the dump file. After you've got the dump file, you can use the "localdumps-off" registry file to disable the dump file generation.

smoogipoo

  • Posts: 6
Re: SegFault in BASS_FXSetPriority()
« Reply #2 on: 25 Nov '21 - 13:57 »
OP here (posted while logged out).

Managed to capture a dump as you requested: https://drive.google.com/file/d/19L_vgepwOaVXl8sxfanZkznhV204eFn9/view?usp=sharing

Ian @ un4seen

  • Administrator
  • Posts: 25275
Re: SegFault in BASS_FXSetPriority()
« Reply #3 on: 25 Nov '21 - 17:08 »
Thanks for the new dump file. I think I see what the problem is now, and here's an update for you to try:

  www.un4seen.com/stuff/bass.zip

Let me know if you still see the problem happening with that.

smoogipoo

  • Posts: 6
Re: SegFault in BASS_FXSetPriority()
« Reply #4 on: 26 Nov '21 - 07:29 »
That version seems to be crashing at startup. Dump: https://drive.google.com/file/d/1EJdPjd8Q0CK6kCujMlO_f2Qv_3g6WO6a/view?usp=sharing

The x64 file seems to be 100Kb less than 2.4.16.7, perhaps that's a clue? Also for reference, we're using the following library versions:

bass => as above
bass_fx => 2.4.12.6
bassmix => 2.4.11.1

Ian @ un4seen

  • Administrator
  • Posts: 25275
Re: SegFault in BASS_FXSetPriority()
« Reply #5 on: 26 Nov '21 - 12:05 »
Oops! This BASS build is the first with some new compression applied (hence the reduced size), but there was a little bug in that. Here's another update to fix that:

   www.un4seen.com/stuff/bass.zip

smoogipoo

  • Posts: 6
Re: SegFault in BASS_FXSetPriority()
« Reply #6 on: 27 Nov '21 - 12:44 »
That one looks to have resolved all issues :)