"Failed to pin the sample data to RAM"???

Need help running G/Q/ZDoom/ECWolf/Zandronum/3DGE/EDuke32/Raze? Did your computer break? Ask here.

Moderator: GZDoom Developers

Forum rules
Contrary to popular belief, we are not all-knowing-all-seeing magical beings!

If you want help you're going to have to provide lots of info. Like what is your hardware, what is your operating system, what version of GZDoom/LZDoom/whatever you're using, what mods you're loading, how you're loading it, what you've already tried for fixing the problem, and anything else that is even remotely relevant to the problem.

We can't magically figure out what it is if you're going to be vague, and if we feel like you're just wasting our time with guessing games we will act like that's what you're really doing and won't help you.
Post Reply
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

"Failed to pin the sample data to RAM"???

Post by Matt »

I keep getting this message whenever I switch to FluidSynth:

Code: Select all

Failed to pin the sample data to RAM; swapping is possible.
As far as I can tell the MIDI works fine nonetheless.

What is this???
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: "Failed to pin the sample data to RAM"???

Post by Graf Zahl »

This sounds like some nonsense in the audio backend. I cannot find any such text in any of the DLLs GZDoom uses.
User avatar
Rachael
Posts: 13561
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: "Failed to pin the sample data to RAM"???

Post by Rachael »

I see it a lot in the virtual Linux environments I use for GZDoom. I don't like seeing that message, but lack of RAM hasn't bothered me much so far, so I just ignore it. I figure people with more powerful systems don't get that message.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: "Failed to pin the sample data to RAM"???

Post by Graf Zahl »

This warning is mostly pointless. Does it appear in GZDoom's console or only in the attached terminal?
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: "Failed to pin the sample data to RAM"???

Post by _mental_ »

Here is the message. Please read this comment a few lines above.
User processes don't have memlock privilege by default. The message is just a reminder about that.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: "Failed to pin the sample data to RAM"???

Post by Graf Zahl »

Outputting the message is plain idiotic. Even attempting to lock the memory here is idiotic. No run-of-the-mill library should even TRY doing such things.
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: "Failed to pin the sample data to RAM"???

Post by Edward-san »

I have always been plagued by that message every single time (not only that, but also by the long lag between the loading of the song and the message log), so this is why I'm not using fluidsynth at all (funny enough, just now I tried to switch to fluidsynth from timidity++ from the menu, but then I got a crash to desktop, I gotta make a new report when I have more info).
User avatar
Chris
Posts: 2942
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: "Failed to pin the sample data to RAM"???

Post by Chris »

FluidSynth is intended to be usable for real-time processing, and things like swapping are a big no-no in that case because it needs to finish fast, so it tries to lock the memory used for the soundfont to keep it from getting swapped out. And even if real-time processing isn't used, locking the memory can prevent prevent random performance drops.

I don't really know what FluidSynth expects here though, given that most apps don't really care and will live just fine with the relatively-low risk of sample data getting swapped out. Printing a warning by default seems unnecessarily verbose since there's nothing a user can do to fix it (at best it's a developer message, but as previously said, it's not a big deal for most).
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: "Failed to pin the sample data to RAM"???

Post by Graf Zahl »

It's a "deal" because it gives the false appearance of things being broken.

But FluidSynth and real-time processing? Are you joking? That thing is notorious for being excessively CPU intensive.
User avatar
Chris
Posts: 2942
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: "Failed to pin the sample data to RAM"???

Post by Chris »

Graf Zahl wrote:It's a "deal" because it gives the false appearance of things being broken.
I mean it's not a big deal to most apps that the sample data isn't locked to RAM, so a message like that is unnecessary, not that the message itself isn't a big deal. I agree that the message shouldn't be just printed out like that.
But FluidSynth and real-time processing? Are you joking? That thing is notorious for being excessively CPU intensive.
Can't fault them for having aspirations. The code is structured for the mixer thread to be real-time safe, whether or not it manages to cover all its bases (the soundfont is far from everything that would need to be locked to RAM, and its use of mlock looks very naive) and get enough performance to be practical in a real-time context.
Post Reply

Return to “Technical Issues”