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

Author Topic: sf::Music Segmentation fault  (Read 4307 times)

0 Members and 1 Guest are viewing this topic.

Denethtos

  • Newbie
  • *
  • Posts: 2
    • View Profile
sf::Music Segmentation fault
« 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... ^^)

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: sf::Music Segmentation fault
« Reply #1 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.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10879
    • View Profile
    • development blog
    • Email
Re: sf::Music Segmentation fault
« Reply #2 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. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: sf::Music Segmentation fault
« Reply #3 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).
« Last Edit: August 10, 2013, 08:58:25 pm by Ixrec »

Denethtos

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: sf::Music Segmentation fault
« Reply #4 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.

Gobbles

  • Full Member
  • ***
  • Posts: 132
    • View Profile
    • Email
Re: sf::Music Segmentation fault
« Reply #5 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

exafi

  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: sf::Music Segmentation fault
« Reply #6 on: August 13, 2013, 12:12:56 am »
it has some solution?

 

anything