SFML community forums

Help => Audio => Topic started by: tokiwotomare on April 07, 2011, 03:36:48 am

Title: libsndfile-1.dll causing a heap corruption?
Post by: tokiwotomare on April 07, 2011, 03:36:48 am
So I have in my program the line:

Code: [Select]

file_cabinet.h:

sound_map["ground_collide"].LoadFromFile("Sounds\\Land.wav");
sf::SoundBuffer &get_sound_buffer(std::string filename);



sound_map is a map<std::string, sf::SoundBuffer>.

later in another file:

Code: [Select]

sf::Sound sound;
sound.SetBuffer(file_cabinet.get_sound_buffer("Sounds\\Land.wav"));
sound.Play();


If I leave everything in, the application throws a heap corruption.

If I uncomment everything but the LoadFromFile line, it still throws it. If I uncomment only that line, it doesn't throw it, which says to me that something in LoadFromFile is going wrong.

The call trace:
Code: [Select]


  ntdll.dll!76e64513()
  msvcrt.dll!763198cd()
  libsndfile-1.dll!6f145dc1()
> Mindjob.exe!wmainCRTStartup()  Line 371 C
  kernel32.dll!76231194()
  ntdll.dll!76dfb429()
  ntdll.dll!76dfb3fc()



I triple-checked to make sure that there aren't any conflicting versions of libsndfile-1.dll or openal32.dll.

edit: To answer what I'm sure are common questions ...
- I made sure early on in the project that I haven't mixed up debug and release versions of the SFML libraries (I had to recompile them since the FAQ said that there were no current versions available for VC 2010).
- I'm using the libsndfile-1.dll and openal32.dll that are linked in the VC 2008 version of the C++ 1.6 package.
Title: libsndfile-1.dll causing a heap corruption?
Post by: tokiwotomare on April 07, 2011, 03:46:35 am
Well, now I feel like I have egg on my face!

I updated the two .dlls to the 2.0 versions available in the Git tree and it seems to be working fine.

I wish I could delete this now defunct topic :)