issues with .wav file in SFML

0

Hey everybody i recently started c++ on a tutorial from a couple of years ago. I am having an issue using SFML for a .wav file in the main program(this is a simplified one having the same issue). The file is in the same folder as project and that is where the directory looks and the name is spelled the same and everything. I am using the most recent SFML and visual studio 2017. Forgive me if the upload looks weird it is my first time posting here.

#include "pch.h"
#include <iostream>
#include <SFML/Graphics.hpp>
#include <SFML/Audio.hpp>


using namespace sf;

int main()
{
	VideoMode vm(1920,1080);
	RenderWindow window(vm, "SpriteTest", Style::Fullscreen);

	//****ERROR SHOWS HERE****
	sf::SoundBuffer chop;
	if (!chop.loadFromFile("audio/chop.wav"))
	{
		std::cout << "ERROR LOADING AUDIO" << std::endl;
	}
	sf::Sound chopNoise;
	chopNoise.setBuffer(chop);

	//****THIS IS THE ERROR

	/*Exception thrown at 0x6A36E344 (vcruntime140.dll) in sprite tester.exe: 0xC0000005: Access violation reading location 0x005C5000.

	 my .wav file is in the audio file in the project file which is where the working directory is
	*/


	// shield test
	Texture shield;
	shield.loadFromFile("graphics/shield.png");
	Sprite shieldSprite;
	shieldSprite.setTexture(shield);
	shieldSprite.setPosition(1500, 800);
	//background test
	Texture backgroundTexture;
	backgroundTexture.loadFromFile("graphics/background2.png");
	Sprite background;
	background.setTexture(backgroundTexture);
	background.setPosition(0, 0);
	//lazer test
	Texture lazerTexture;
	lazerTexture.loadFromFile("graphics/lazer2.png");
	Sprite lazerSprite;
	lazerSprite.setTexture(lazerTexture);
	lazerSprite.setPosition(200, 500);

	while (window.isOpen())
	{
		if (Keyboard::isKeyPressed(Keyboard::Escape))
			window.close();
		if (Keyboard::isKeyPressed(Keyboard::Right))
		{
			
		}
		window.clear();
		window.draw(background);
		window.draw(shieldSprite);
		window.draw(lazerSprite);
		window.display();
	}
}

OUTPUT FILE::S

'sprite tester.exe' (Win32): Loaded 'C:\Users\kyle9\Desktop\Game dev book stuff\Visual Studios stuff\sprite tester\Debug\sprite tester.exe'. Symbols loaded. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Users\kyle9\Desktop\Game dev book stuff\Visual Studios stuff\sprite tester\sprite tester\sfml-graphics-d-2.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp140d.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\vcruntime140d.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbased.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Users\kyle9\Desktop\Game dev book stuff\Visual Studios stuff\sprite tester\sprite tester\sfml-window-d-2.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Users\kyle9\Desktop\Game dev book stuff\Visual Studios stuff\sprite tester\sprite tester\sfml-window-d-2.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Unloaded 'C:\Users\kyle9\Desktop\Game dev book stuff\Visual Studios stuff\sprite tester\sprite tester\sfml-window-d-2.dll' 'sprite tester.exe' (Win32): Loaded 'C:\Users\kyle9\Desktop\Game dev book stuff\Visual Studios stuff\sprite tester\sprite tester\sfml-system-d-2.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Users\kyle9\Desktop\Game dev book stuff\Visual Studios stuff\sprite tester\sprite tester\sfml-audio-2.dll'. Module was built without symbols. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32full.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp_win.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbase.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\opengl32.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\user32.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\win32u.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmm.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmm.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\winmm.dll' 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\bcryptprimitives.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp140.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\vcruntime140.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmmbase.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\glu32.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Users\kyle9\Desktop\Game dev book stuff\Visual Studios stuff\sprite tester\sprite tester\sfml-system-d-2.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Unloaded 'C:\Users\kyle9\Desktop\Game dev book stuff\Visual Studios stuff\sprite tester\sprite tester\sfml-system-d-2.dll' 'sprite tester.exe' (Win32): Loaded 'C:\Users\kyle9\Desktop\Game dev book stuff\Visual Studios stuff\sprite tester\sprite tester\sfml-system-2.dll'. Module was built without symbols. 'sprite tester.exe' (Win32): Loaded 'C:\Users\kyle9\Desktop\Game dev book stuff\Visual Studios stuff\sprite tester\sprite tester\openal32.dll'. Module was built without symbols. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\shell32.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\SHCore.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\combase.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\windows.storage.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\shlwapi.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel.appcore.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\profapi.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\powrprof.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\fltLib.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ole32.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\imm32.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\uxtheme.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msctf.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\oleaut32.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\igdlh64.inf_amd64_b9b9c39e4e2b88eb\ig9icd32.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\wtsapi32.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dwmapi.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\version.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\version.dll' 'sprite tester.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\igdlh64.inf_amd64_b9b9c39e4e2b88eb\igc32.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dinput8.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\hid.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\setupapi.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\devobj.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\InputHost.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\WinTypes.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\CoreMessaging.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\CoreUIComponents.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntmarta.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\wintrust.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msasn1.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\crypt32.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\TextInputFramework.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\oleacc.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\clbcatq.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\MMDevAPI.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\propsys.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\AudioSes.dll'. Cannot find or open the PDB file. 'sprite tester.exe' (Win32): Loaded 'C:\Windows\SysWOW64\avrt.dll'. Cannot find or open the PDB file. Exception thrown at 0x640DE340 (vcruntime140.dll) in sprite tester.exe: 0xC0000005: Access violation reading location 0x00B00000.

visual-studio
sfml
asked on Stack Overflow Feb 26, 2019 by Kyle.T • edited Mar 15, 2019 by Kyle.T

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0