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

Author Topic: [SOLVED][2.0 RC][VS2012]Music::openFromFile crashing program  (Read 4753 times)

0 Members and 1 Guest are viewing this topic.

SovietShark

  • Newbie
  • *
  • Posts: 3
    • View Profile
[SOLVED][2.0 RC][VS2012]Music::openFromFile crashing program
« on: November 03, 2012, 05:09:09 pm »
Hi, whenever I try to load a music file, my program just crashes.  I'm trying to compile under debug mode.  I'm using VS2012 under Windows 8 with the SFML 2.0 RC.
'Metroid Walrus.exe' (Win32): Loaded 'C:\Users\Shawn\Documents\Visual Studio 2012\Projects\Metroid Walrus\Debug\Metroid Walrus.exe'. Symbols loaded.
'Metroid Walrus.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
[...] (Basically the same errors but with different DLLs)
'Metroid Walrus.exe' (Win32): Loaded 'C:\Windows\SysWOW64\AudioSes.dll'. Cannot find or open the PDB file.
The thread 0xcdc has exited with code -1 (0xffffffff).
The thread 0x10e8 has exited with code -1 (0xffffffff).
The thread 0xaf0 has exited with code -1 (0xffffffff).
The thread 0x13b8 has exited with code -1 (0xffffffff).
The thread 0xc4c has exited with code -1 (0xffffffff).
The program '[1580] Metroid Walrus.exe' has exited with code -1 (0xffffffff).
 

This is the offending code.  If I comment it out the program proceeds fine.
        if( !music.openFromFile( "dbg.ogg" ) )
                return -1;

Here are my dependencies in their order (I've tried them in the opposite just in case, too):
sfml-audio-d.lib
sfml-graphics-d.lib
sfml-window-d.lib
sfml-system-d.lib

Any help would be appreciated.
« Last Edit: November 03, 2012, 06:36:42 pm by SovietShark »

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: [2.0 RC][VS2012]Music::openFromFile crashing program
« Reply #1 on: November 03, 2012, 05:21:27 pm »
Your music failed to load and your main() returned -1... What's the problem here?
Back to C++ gamedev with SFML in May 2023

SovietShark

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: [2.0 RC][VS2012]Music::openFromFile crashing program
« Reply #2 on: November 03, 2012, 05:59:34 pm »
The music file is in the folder.  What concerned me was the fact that it's not loading the PDB files.
Also, I tried launching the executable by itself, not through Visual Studio.  It works that way.  It's just not working when launched through the VS 2012 debugger.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: [2.0 RC][VS2012]Music::openFromFile crashing program
« Reply #3 on: November 03, 2012, 06:21:52 pm »
Quote
What concerned me was the fact that it's not loading the PDB files.
No, it's not supposed to load them. Everything is perfectly fine here. Instead of wondering why they are not loaded, you should Google it and learn what they are and when you are supposed to have them ;)

Quote
Also, I tried launching the executable by itself, not through Visual Studio.  It works that way.  It's just not working when launched through the VS 2012 debugger.
Project properties > Debugging > Working directory > put $(TargetDir)
Laurent Gomila - SFML developer

SovietShark

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: [2.0 RC][VS2012]Music::openFromFile crashing program
« Reply #4 on: November 03, 2012, 06:30:07 pm »
Ah.  I was just concerned because it was complaining about loading them.  I'll be sure to read up on them!
Thanks for your help! :)

 

anything