Author Topic: BASS_StreamCreateFileUser randomly causes an AccessViolationException  (Read 409 times)

xfx

  • Posts: 6
I have a rather complex application that plays encrypted mp3 files through a custom BufferProvider which implements BASS_FILEPROCS and outputs each file's audio via different audio cards and channels.

Here's a screenshot to give you an idea of how the app works: https://xfx.net/stackoverflow/rdj_un4seen.png

Everything works just fine, but sometimes, the application will crash with an AccessViolationException.
The application is being developed using Bass.NET under Visual Studio 2015 (and 2017 now).

Unfortunately, the exception is not caught by the .NET framework and simply crashes the program.

Here's the only information that I've been able to gather from the Event Viewer:

.NET Runtime
Application: RemoteDJPlayer.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
   at Un4seen.Bass.Bass.BASS_StreamCreateFileUser(Un4seen.Bass.BASSStreamSystem, Un4seen.Bass.BASSFlag, Un4seen.Bass.BASS_FILEPROCS, IntPtr)
   at RemoteDJPlayer.PlayerLogic.(System.String, Un4seen.Bass.BASSFlag)
   at RemoteDJPlayer.TrackPlayer.(Int32)
   at RemoteDJPlayer.TrackPlayer.(ClientFramework.Track)
   at ..(ClientFramework.Track)
   at RemoteDJPlayer.PlayerLogic.()
   at RemoteDJPlayer.PlayerLogic.()
   at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Threading.ThreadHelper.ThreadStart()


Application Error
Faulting application name: RemoteDJPlayer.exe, version: 2017.3.7.2911, time stamp: 0x58c26218
Faulting module name: bass.DLL, version: 2.4.12.1, time stamp: 0x57150522
Exception code: 0xc0000005
Fault offset: 0x000064df
Faulting process id: 0x12e8
Faulting application start time: 0x01d299a181e16a1b
Faulting application path: d:\Users\xavier\Documents\Visual Studio 2017\Projects\RemoteDJ_old\Release\RemoteDJPlayer.exe
Faulting module path: d:\Users\xavier\Documents\Visual Studio 2017\Projects\RemoteDJ_old\Release\bass.DLL
Report Id: 0c60bccb-d85a-4680-82c1-6a0cf9b947b9
Faulting package full name:
Faulting package-relative application ID:


I'm using the latest version of both bass.dll and bass.net.dll

Please let me know if you require any additional information..

Ian @ un4seen

  • Administrator
  • Posts: 20437
Please try this latest BASS.DLL build, and post the same info if you still get the problem with it.

   www.un4seen.com/stuff/bass.zip

xfx

  • Posts: 6
Thanks. I will try it right away.

xfx

  • Posts: 6
I haven't posted anything because, so far so good, using the version you provided.

Unfortunately, this has been an error that only happens once, maybe twice a week.

xfx

  • Posts: 6
I think this issue can now be closed. The error has no appeared again.

Thank you SO much!

Ian @ un4seen

  • Administrator
  • Posts: 20437
Good to hear that the problem seems to be sorted.

xfx

  • Posts: 6
Hello Ian,

Does the latest version of BASS (x86/x64) contain the changes you made?

Ian @ un4seen

  • Administrator
  • Posts: 20437
There hasn't been a new BASS release yet, but you can continue to use the update posted above in the meantime (it is a "release" build).

xfx

  • Posts: 6
Ok. Thank you for the information.