Author Topic: BassMix seems to crash after some hours  (Read 383 times)

martin71

  • Posts: 34
BassMix seems to crash after some hours
« on: 12 Sep '18 - 21:33 »
Is it OK if I use BASS_Mixer_ChannelSetSync two times? Both calls run at the same time but do something different. The first BASS_Mixer_ChannelSetSync mixes an audio file and the other BASS_Mixer_ChannelSetSync calls a beat maching function. The beat maching function calls it self again to stretch the next beat (to stay in sync). The problem is that it works perfectly but the playback will stop suddenly within a few hours. It always happen during mixing (when the beatsync procedure is called).

I did dozens of tests during debugging but I can not find any error in my code. The variables always have correct values and BASS and BASSMIX do not give errors. And even if I re-play the same playlist that previously crashed, it will work well afterwards and the playback stops a few hours later. Does anyone have suggestions how I can get my program more stable? I wonder if this is a memory problem or maybe even a bug in BassMix. I would really like to find a solution for this. 

Ian @ un4seen

  • Administrator
  • Posts: 21363
Re: BassMix seems to crash after some hours
« Reply #1 on: 13 Sep '18 - 12:38 »
It should be fine to call BASS_Mixer_ChannelSetSync pretty much as many times as you like. When you say "both calls run at the same time", do you mean the 2 syncs are BASS_SYNC_POS syncs set at the same position? If so, that should be fine too.

To get more info on the crash, please upload a dump file of it. You can generate a dump file using the ProcDump tool. For example, run "procdump -e -ma -x . your.exe". Then ZIP and upload the generated dump file to have a look at here:

   ftp.un4seen.com/incoming/

Please use these latest BASS and BASSmix builds when doing that:

   www.un4seen.com/stuff/bass.zip
   www.un4seen.com/stuff/bassmix.zip

martin71

  • Posts: 34
Re: BassMix seems to crash after some hours
« Reply #2 on: 13 Sep '18 - 13:08 »
Hi Ian,

Yes, I meant that both syncs set at the same position. Good to know that this is safe. To be 100% sure it's not a bug in my own code, I am debugging again every step and all variables in my code. If I can't find anything wrong, I will upload the ProcDump file. Thanks for that suggestion!

Martin

martin71

  • Posts: 34
Re: BassMix seems to crash after some hours
« Reply #3 on: 16 Sep '18 - 08:08 »
I finally solved the problem. The cause of the problem was not Bass but a timer event that updates gadgets. This also happened while running BASS_Mixer_ChannelSetSync callbacks. This caused memory errors in PureBasic. I have turned off the timer in these callbacks and the program now seems to be running stably  ;D