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

Author Topic: openFromFile Read Access Violation  (Read 865 times)

0 Members and 1 Guest are viewing this topic.

milmurnir

  • Newbie
  • *
  • Posts: 3
    • View Profile
openFromFile Read Access Violation
« on: July 04, 2023, 07:42:45 am »
I have a problem with running my app as soon as I touch the audio module it gives me this error.

Exception thrown at 0x00007FF9CEE3CB88 (sfml-audio-d-2.dll) in Mjasdgdsfasdaf.exe: 0xC0000005: Access violation reading location 0x0000000000000000.


#include <SFML/Audio/Music.hpp>

int main()
{
   sf::Music* test = nullptr;

   bool loaded = test->openFromFile( "test" );
}

This is all the code in this tiny example. I am linking to system, graphics, window, audio.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10823
    • View Profile
    • development blog
    • Email
Re: openFromFile Read Access Violation
« Reply #1 on: July 04, 2023, 07:48:35 am »
Make sure your DLLs in use matches the architecture type (32-bits vs 64-bits), also for OpenAL
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

milmurnir

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: openFromFile Read Access Violation
« Reply #2 on: July 04, 2023, 07:59:58 am »
Alright but SFML 64 bit download only has the dll for 32 or am I understanding you wrong?

milmurnir

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: openFromFile Read Access Violation
« Reply #3 on: July 04, 2023, 08:28:40 am »
I am an idiot in my haste I was accessing a nullptr