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

Author Topic: Program crash on launch only with audio.  (Read 3142 times)

0 Members and 1 Guest are viewing this topic.

Nyssiom

  • Newbie
  • *
  • Posts: 5
    • View Profile
Program crash on launch only with audio.
« on: July 15, 2015, 06:58:35 pm »
Hello,

I just decided to use the SFML with Qtcreator for a little project.
I build the library as explained on the website, etc

When testing the "sfml works" program, everything is fine, the window is displayed, but when I try to create any Audio object, the program crashes at the beginning  >:(

When I simply include Audio.h, it's fine..

 I continue searching, but nobody seems to have this precise problem...
Thanks


eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Program crash on launch only with audio.
« Reply #1 on: July 15, 2015, 07:03:26 pm »
My guess is that you haven't placed the openal32.dll next to your application.

Then again you didn't say what OS etc...
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: Program crash on launch only with audio.
« Reply #2 on: July 15, 2015, 07:07:05 pm »
1. Are you building the application with the exact same compiler that was used to build SFML?
2. Are you sure you are not mixing a debug build of your app with the release version of SFML (or vice versa)?
3. Are you creating the SFML audio objects as global variables? (If "yes", then stop doing that).
4. What OS are you using?
5. What version of SFML are you using? (pre-built binary or self compiled?).
6. Could you provide a SSCCE that shows the problem that people can test on their own?
7. What exact errors do you get when the crash happens?
8. What does the stack trace look like at the crash point?

Also, please read this: http://www.catb.org/esr/faqs/smart-questions.html
« Last Edit: July 15, 2015, 07:09:25 pm by Jesper Juhl »

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: Program crash on launch only with audio.
« Reply #3 on: July 15, 2015, 07:16:57 pm »
Didn't know openal32.dll was necessary..
http://www.sfml-dev.org/faq.php#grl-dependencies

 
Jesper Juhl, thank you too (again, I'll try to make a better topic next time)
You're welcome and thank you, that would be nice :)

Nyssiom

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Program crash on launch only with audio.
« Reply #4 on: July 15, 2015, 07:19:59 pm »
I just put openal32.dll and it now works fine :)

thank you to both of you, I'll try to be more careful about my topic next time...

Thank you very much.

(I'm sorry I'm double-posting, I deleted my previous post (Yes I am dumb I know))

Didn't know openal32.dll was necessary..
http://www.sfml-dev.org/faq.php#grl-dependencies
Thank you Jesper :)