SFML community forums

Help => Audio => Topic started by: Denethtos on August 10, 2013, 07:46:04 pm

Title: sf::Music Segmentation fault
Post by: Denethtos on August 10, 2013, 07:46:04 pm
Hello everybody,
I need your help to fix a little problem.
My Code is only:
#include <SFML/Audio.hpp>

int main() {
     sf::Music music;
     return 0;
}
 

But this program (or any other program i wrote with sf::Music) returns the value -2147418113 and the code:
8000FFFF

and the debugger says:
Program received signal SIGSEGV, Segmentation fault.
In ole32!CoFileTimeToDosDateTime () (C:\Windows\syswow64\ole32.dll)

Do you know how i could fix that?
(sorry for my english... ^^)
Title: Re: sf::Music Segmentation fault
Post by: Ixrec on August 10, 2013, 08:25:04 pm
That's bizarre, your code crashes for me too even though I've been using music in my program for weeks without a problem.

When I run it in MSVC++ 2010 I get: "Unhandled exception at 0x77bb15de (ntdll.dll) in test.exe: 0xC0000005: Access violation reading location 0xfeeefeee." and the debugger takes me to a file called crtexe.c. My test project happens to be a console application though, hopefully that's not screwing with this somehow.

I also tried adding a basic window.isOpen loop and an event loop just to see if that did any magic initialization, but it didn't change the error.
Title: Re: sf::Music Segmentation fault
Post by: eXpl0it3r on August 10, 2013, 08:40:45 pm
Works fine here...

Can you both please provide the OS version, the SFML version and the compiler version. It would also be useful to know how you've setup the IDEs. ;)
Title: Re: sf::Music Segmentation fault
Post by: Ixrec on August 10, 2013, 08:51:04 pm
For me:
Windows 7 64-bit Professional
Microsoft Visual C++ 2010 Express, Visual Studio Version 10.0.30319.1
SFML 2.1, using the precompiled VS 2010 32-bit binaries
My IDE setup is basically the same as in the tutorial, except I use the dynamic libs for my debug builds and the static ones for my release builds (I've only tested his code in debug).

Again, in my serious program music has always worked perfectly fine.  I have no idea what's different about this code (other than my test program being a console application; I'll try making a test project without the console later).
Title: Re: sf::Music Segmentation fault
Post by: Denethtos on August 10, 2013, 10:39:53 pm
I'm using Windows 7 Home Premium 64bit
with Code::Blocks 12.11. (standart setup)
I used SFML 2.1 GCC 4.7 TDM (SJLJ) - 32 bits
and for a second test SFML 2.1 GCC 4.7 MinGW (DW2) - 32 bits
Both times as a consol application.
When i link SFML/Audio static it works.
Title: Re: sf::Music Segmentation fault
Post by: Gobbles on August 11, 2013, 06:27:24 am
This doesn't seem to be a new issue.

This link details the issue with a possible fix:

https://github.com/SFML/SFML/issues/30
Title: Re: sf::Music Segmentation fault
Post by: exafi on August 13, 2013, 12:12:56 am
it has some solution?