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

Author Topic: "SFML.Audio.pdb was not loaded" message when app crashes  (Read 3535 times)

0 Members and 1 Guest are viewing this topic.

Tigre Pablito

  • Full Member
  • ***
  • Posts: 226
    • View Profile
    • Email
"SFML.Audio.pdb was not loaded" message when app crashes
« on: November 18, 2023, 02:49:25 pm »
Hello, ladies and guys from SFML community!
Currently I'm finishing the last details of my Super Mario Brothers fan game (which will be presented soon in the SFML projects subforum), and very few times it crashes with the message "No se cargó SFML.Audio.pdb" ("SFML.Audio.pdb was not loaded"). If anyone of you could help me to solve this issue, I would thank you very much. I imagine that this might not be strictly an SFML issue, but, anyway, I know there are many people in this forum whose knowledges are much higher than mine and surely they can help me. Thank you!
Regards
Pablo

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11008
    • View Profile
    • development blog
    • Email
Re: "SFML.Audio.pdb was not loaded" message when app crashes
« Reply #1 on: November 18, 2023, 03:21:26 pm »
I assume you see this in the VS console or similar. This won't be the cause of your crash, it's just a warning/information that the debug symbols for the SFML libraries couldn't be found and as such you won't be able to debug inside SFML code.

If you aren't build SFML yourself, you should find the pdb files in the lib/Debug directory. I think this might be a packaging issue, as they should be placed next to the corresponding lib file.

To find out what's going on with your code, run it through a debugger and when it fails look at the stack trace or when you know around where it fails, set a break point and go through the code step by step.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Tigre Pablito

  • Full Member
  • ***
  • Posts: 226
    • View Profile
    • Email
Re: "SFML.Audio.pdb was not loaded" message when app crashes
« Reply #2 on: November 20, 2023, 10:49:18 pm »
Hi eXpl0it3r
Sorry, I forgot to say: I'm using Visual Studio 2022, the C# language, Microsoft .Net, and SFML.Net. I'm not building SFML myself, I have the .dll files (downloaded directly, you know, using .Net and VS is much easier than C++ and other languages and IDEs) all in the same folder than the .exe, they are SFML.Audio.dll and csfml-Audio.dll and all the other ones like that. I don't know if there is an exact part of the code where the Exception/error occurs (or I would never be able to find it, the code is huge, it is a complete Super Mario Bros. game), but, although there was, how can it be that for some course of the program execution it does not produce the error and then past certain time it does? It has no sense. May it be a memory problem or something like that? I don't remember having had this issue before. But, I repeat, this happens very few times. Should I care about the .pdb file, or not and just having the DLLs as I have?
Again, thank you very much for your help.
Pablo

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11008
    • View Profile
    • development blog
    • Email
Re: "SFML.Audio.pdb was not loaded" message when app crashes
« Reply #3 on: November 20, 2023, 11:05:03 pm »
I'm using Visual Studio 2022, the C# language, Microsoft .Net, and SFML.Net.
So you're using the NuGet package, right?

I don't know if there is an exact part of the code where the Exception/error occurs (or I would never be able to find it, the code is huge, it is a complete Super Mario Bros. game), but, although there was, how can it be that for some course of the program execution it does not produce the error and then past certain time it does? It has no sense. May it be a memory problem or something like that?
You need to narrow down the source of the crash. Randomly guessing doesn't really help much.

I recommend to "Enable native code debugging" in your application profile.
Then run your game in a debugger and try to get it to fail. When the crash happens, you should be able to see where it's coming from.

Should I care about the .pdb file, or not and just having the DLLs as I have?
Depends how deep you'd want/can debug the issue, but probably not.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Tigre Pablito

  • Full Member
  • ***
  • Posts: 226
    • View Profile
    • Email
Re: "SFML.Audio.pdb was not loaded" message when app crashes
« Reply #4 on: November 24, 2023, 12:44:37 am »
I did what you told me, eXpl0it3r, I enabled native code debugging and also I fixed my MusicManager class that it was missing Music.Dispose() calls. It seems that now the Exception/error has disappeared.
Thank you very much for your help.  :)
Regards
Pablo