Hey,
I've been trying to load some sf::SoundBuffers from memory in a SoundManager class to be used with sf::Sounds, which works perfectly. I am using MSVS12 (incl. toolset) and SFML2.1, I even doublechecked the DLLs.
But when I close the game I get an error:
First-chance exception at 0x7651A4B9 (ole32.dll) in Game.exe: 0xC0000005: Access violation reading location 0xFEEEFEEE.
Unhandled exception at 0x7651A4B9 (ole32.dll) in Game.exe: 0xC0000005: Access violation reading location 0xFEEEFEEE.
Here's my code:
std::vector<sf::SoundBuffer*> _soundBuffers;
A vector to contain the buffers, member of SoundManager.
SoundManager::~SoundManager(){
for (int i = 0; i < SND_SIZE; ++i){
delete _soundBuffers[i];
}
}
void SoundManager::loadAll(){
for (int i = 0; i < SND_SIZE; ++i){
_soundBuffers.push_back( new sf::SoundBuffer() );
}
}
loadAll() gets called exactly once at the start. I do not use any more lines from SFML.
I think it might be related to this:
https://github.com/SFML/SFML/issues/447Any advice?