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

Author Topic: Just by declaring sf::Music application returns error  (Read 6721 times)

0 Members and 1 Guest are viewing this topic.

BaneTrapper

  • Full Member
  • ***
  • Posts: 213
  • Do you even see this, i dont need it.
    • View Profile
    • Email
Just by declaring sf::Music application returns error
« on: November 30, 2012, 06:52:13 pm »
Hello.
Am doing this
int main()
{
    sf::Music audio;
    return 0;
}
Process returned -2147418113 <0x8000FFFF> execution time : 0.100s
Press any key to continue.

I had huge program and was commenting out peace by peace until i stumbled on this.
Why is declaring sf::Music giving me error ? i also tried downloading latest snapshot build and also build my own with cmake and MinGW for codeblocks and am still getting this error, why is that?
Also what can i do to fix this?

Am coming from a post on gamedev.net if you need more info
Quote
http://www.gamedev.net/topic/635055-sfml-application-on-exit-dosent-return-0/

EDIT::
I just tried reproducing error with VisualStudio2010 Express and i was unable.
The error occurs with CodeBlocks10.05 using GCC/MinGW.
Any tips how to fix it on codeblocks?
« Last Edit: November 30, 2012, 07:10:52 pm by BaneTrapper »
BaneTrapperDev@hotmail.com Programing, Coding
Projects: Not in development(unfinished/playable):
http://en.sfml-dev.org/forums/index.php?topic=11073.msg76266#msg76266
UP and in Development: The Wanderer - Lost in time
http://en.sfml-dev.org/forums/index.php?topic=14563.0

gyscos

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
Re: Just by declaring sf::Music application returns error
« Reply #1 on: November 30, 2012, 07:22:23 pm »
Maybe you're dynamically linking and it doesn't find the dll ? Maybe the IDEs don't start the executable from the same directory...

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: Just by declaring sf::Music application returns error
« Reply #2 on: November 30, 2012, 07:36:56 pm »
Might be related to issue https://github.com/SFML/SFML/issues/30
This audio bug is really fishy, esecially that old openal32.dll fixes it..
Back to C++ gamedev with SFML in May 2023

BaneTrapper

  • Full Member
  • ***
  • Posts: 213
  • Do you even see this, i dont need it.
    • View Profile
    • Email
Re: Just by declaring sf::Music application returns error
« Reply #3 on: November 30, 2012, 07:40:49 pm »
I have a big application(game)
It runs as expected. But when i shut it down and code comes to being destroyed i get this error
Quote
At C:\C++\HeroesPath\main.cpp:18
Continuing...
Program received signal SIGSEGV, Segmentation fault.
In ?? () (C:\Windows\system32\nvoglv32.dll)
Its after return at closing brackets,
Tracing the error i fount out it is from declaring a sf::Music object.
The problem does not occur when using Visual studio 2010

As for linking it dynamically, yes i am linking it this way.
It does not give me error that .dll couldnt be found.

Might be related to issue https://github.com/SFML/SFML/issues/30
This audio bug is really fishy, esecially that old openal32.dll fixes it..
Ok il check it up, thanks. The search on forum is not working for me :(
« Last Edit: November 30, 2012, 07:49:04 pm by BaneTrapper »
BaneTrapperDev@hotmail.com Programing, Coding
Projects: Not in development(unfinished/playable):
http://en.sfml-dev.org/forums/index.php?topic=11073.msg76266#msg76266
UP and in Development: The Wanderer - Lost in time
http://en.sfml-dev.org/forums/index.php?topic=14563.0

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11039
    • View Profile
    • development blog
    • Email
AW: Re: Just by declaring sf::Music application returns error
« Reply #4 on: November 30, 2012, 08:19:52 pm »
The search on forum is not working for me :(
Only select the forums which are releated to your problem (i.e. all the bindings are most probably not needed.)
« Last Edit: November 30, 2012, 08:22:42 pm by eXpl0it3r »
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

BaneTrapper

  • Full Member
  • ***
  • Posts: 213
  • Do you even see this, i dont need it.
    • View Profile
    • Email
Re: Just by declaring sf::Music application returns error
« Reply #5 on: November 30, 2012, 08:24:07 pm »
Downloading a random OpenAL32.dll and replacing the one from sfml fixed the error.
But now my application takes about 10-15 seconds to start...

Thanks FRex on pointing me!
BaneTrapperDev@hotmail.com Programing, Coding
Projects: Not in development(unfinished/playable):
http://en.sfml-dev.org/forums/index.php?topic=11073.msg76266#msg76266
UP and in Development: The Wanderer - Lost in time
http://en.sfml-dev.org/forums/index.php?topic=14563.0

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: Just by declaring sf::Music application returns error
« Reply #6 on: November 30, 2012, 09:12:35 pm »
Quote
But now my application takes about 10-15 seconds to start...
If you load .ogg it's probably because you have latest sfml:
https://github.com/SFML/SFML/issues/310
Back to C++ gamedev with SFML in May 2023

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Just by declaring sf::Music application returns error
« Reply #7 on: November 30, 2012, 09:18:27 pm »
Don't use a random openal32.dll, use OpenAL Soft 1.14 (it's explicitely mentionned in the task tracker).
Laurent Gomila - SFML developer

BaneTrapper

  • Full Member
  • ***
  • Posts: 213
  • Do you even see this, i dont need it.
    • View Profile
    • Email
Re: Just by declaring sf::Music application returns error
« Reply #8 on: December 01, 2012, 01:11:28 am »
Don't use a random openal32.dll, use OpenAL Soft 1.14 (it's explicitely mentionned in the task tracker).
Well i didn't really find much info how to get it from web.
But it  said just rename soft_oal.dll to OpenAL32.dll in readme. And it seems to work as good as last one.
Tho application still takes 10 sec to open...
BaneTrapperDev@hotmail.com Programing, Coding
Projects: Not in development(unfinished/playable):
http://en.sfml-dev.org/forums/index.php?topic=11073.msg76266#msg76266
UP and in Development: The Wanderer - Lost in time
http://en.sfml-dev.org/forums/index.php?topic=14563.0

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Just by declaring sf::Music application returns error
« Reply #9 on: December 01, 2012, 08:51:40 am »
Quote
Well i didn't really find much info how to get it from web
Google: "openal soft" -> first link -> "Download section" -> "A Win32 binary is also provided" -> the link is right below. Replace the openal32.dll file. It works.
Laurent Gomila - SFML developer

BaneTrapper

  • Full Member
  • ***
  • Posts: 213
  • Do you even see this, i dont need it.
    • View Profile
    • Email
Re: Just by declaring sf::Music application returns error
« Reply #10 on: December 01, 2012, 06:33:00 pm »
That's exactly what i did.
Only thing is that i cant find OpenAL32.dll i just see soft_oal.dll which they say to rename to OpenAL32.dll and use it.
Whats what i replayed last time :P.
Thanks on time and good help, with good fortune.
BaneTrapperDev@hotmail.com Programing, Coding
Projects: Not in development(unfinished/playable):
http://en.sfml-dev.org/forums/index.php?topic=11073.msg76266#msg76266
UP and in Development: The Wanderer - Lost in time
http://en.sfml-dev.org/forums/index.php?topic=14563.0