Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Waschmaschine

Pages: [1]
1
Audio / Re: Exiting yields an exception (reading 0xFEEEFEEE)
« on: May 24, 2015, 02:08:14 pm »
Use SFML 2.3. As you see in issue #30, it has been fixed meanwhile.

By the way, you should avoid using new and delete. A simple std::vector<sf::SoundBuffer> should do the job. If you need pointers, use std::vector<std::unique_ptr<sf::SoundBuffer>>, it will automatically deallocate memory.

Thank you, Nexus!

2
Audio / Exiting yields an exception (reading 0xFEEEFEEE)
« on: May 21, 2015, 12:58:13 am »
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/447
Any advice?

Pages: [1]
anything