Author Topic: AccessViolationException for creating/freeing a stream from a WMA file.  (Read 1346 times)

aybe

  • Posts: 145
Sometimes I do get an AccessViolationException when calling BASS_StreamCreateFile and/or BASS_StreamFree on a WMA file.
It is really weird because when the exception is thrown, if I step over the line of code, the stream is created.

I've installed wmfdist.exe as suggested below the download link for BASSWMA, however Windows complains about compatibility,
the Program Compatibility Assistant appears and offers me to get help online which by the way does not open a web page as usual.

The problem seems to happen only on a cold start as it does not always happen on later calls but it can occasionally.

I am using Windows 8 x64 and a 32-bit WPF application.

EDIT

I forgot to add basswma.dll ! I haven't tested it thoroughly but in no occasion it threw an exception.

Another question arises though, why does BASS supposedly supports it while the plugin hasn't been loaded ?

Thank you  ;D

Ian @ un4seen

  • Administrator
  • Posts: 20433
BASS also supports WMA via Media Foundation codecs on Vista and above, so that will be why you could play WMA files even without the BASSWMA add-on. I don't seem to be able to reproduce the crashing with that here using the pre-compiled CONTEST.EXE example (in C\BIN folder). Can you reproduce the crash with that example, and if so, is it with a particular WMA file? If it is, please upload the file to try here...

   ftp.un4seen.com/incoming/

aybe

  • Posts: 145
Launching the file with it yields : contest.exe has stopped working.
I have uploaded the file on your FTP : Boswick Gates - You Are The Reason.wma

Thank you  :D

Ian @ un4seen

  • Administrator
  • Posts: 20433
Thanks for the test file. The Media Foundation support had a bug in the processing of integer tags (too small buffer), which was exposed by this WMA file using an integer tag to store a floating point number. Here's an update to fix the problem...

   www.un4seen.com/stuff/bass.dll

Let me know if you find it still crashes with any of your WMA files.

aybe

  • Posts: 145
Will test it and come back if anything's wrong.

Thank you !

rv

  • Posts: 192
I also have a 'System.AccessViolationException'  too when loading a VST instrument (NI B4II) (not always)

It is on the Asio Callback

On the line :

        Dim c As Integer = BASS_ChannelGetData(_AudioStream, buffer, length)


Do you know if It is a bass problem or a bass_vst problem?

Ian @ un4seen

  • Administrator
  • Posts: 20433
That sounds like quite a different issue, unrelated to WMA or Media Foundation. Does Windows give any more info on the crash, eg. the module that it occurred in? If not, you could try getting Windows to generate a dump file by applying this "localdumps-full" registry entry...

   www.un4seen.com/stuff/localdumps.zip

That should result in Windows generating a dump file (in "C:\Users\<yourname>\AppData\Local\CrashDumps") whenever a crash occurs. Once you've got a dump file for the crash, you can compress and upload it to have a look at here...

   ftp.un4seen.com/incoming/

You can use the "localdumps-off" registry file to disable the dump file generation afterwards.

rv

  • Posts: 192
It seems to be only when I send a SYSEX message (master volume) to the Native Instruments B4II VST plug in with BASS_VST...

rv

  • Posts: 192
It seems that the VST plugin crash when I send it a SYSEX message.
I think it is a Native Instruments bug, because other plugins works good.
This is the problem with plugins :)  if the VST plugin bugs, your application crash !
I will simply for now filter the Sysex from being sent to NI B4II