[r3863] Fluidsynth: Soundfont memory leak

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [r3863] Fluidsynth: Soundfont memory leak

Re: [r3863] Fluidsynth: Soundfont memory leak

by Gez » Thu Nov 01, 2012 2:52 am

This file should be updated too, since it is linked from the download page.

Re: [r3863] Fluidsynth: Soundfont memory leak

by Enjay » Wed Oct 31, 2012 11:36 am

I've mirrored the file on the DRD ZDoom SVN build dowload page. Thank you.

Re: [r3863] Fluidsynth: Soundfont memory leak

by Lars2500 » Wed Oct 31, 2012 3:28 am

Fantastic! :o Yes, the memory leak is fixed. I removed the link to the alternate dll from my post as it's no longer needed.

Re: [r3863] Fluidsynth: Soundfont memory leak

by edward850 » Tue Oct 30, 2012 11:58 pm

That seems to fix it. Several map swaps and memory usage barely changed.

Re: [r3863] Fluidsynth: Soundfont memory leak

by randi » Tue Oct 30, 2012 9:56 pm

Here, I made a new build. This time with fluidsynth 1.1.6 instead of 1.1.1. Watching memory usage in task manager, it seems fine. Would anyone care to confirm?
Attachments
fluidsynth.7z
(267.08 KiB) Downloaded 85 times

Re: [r3863] Fluidsynth: Soundfont memory leak

by randi » Tue Oct 30, 2012 8:58 pm

My "secrets" are that I had to muck about in config file and Makefiles and track down dependencies. It was a pain in the butt. Not so much building Fluidsynth as building glib.

Also, using a libintl replacement that uses the built-in Windows functions instead GNU's libintl saved a lot of space.

Re: [r3863] Fluidsynth: Soundfont memory leak

by Graf Zahl » Tue Oct 30, 2012 5:05 pm

I guess that's an efficient compiler (MSVC) versus an inefficient one (gcc).
I have seen it quite often that GCC produces significantly larger binaries, especially when using C++ exceptions. The exception code in there is a lot more complex because it completely sidesteps Windows's exception mechanisms and rolls out its own implementation that also needs to include everything that's normally done by the system itself.

Re: [r3863] Fluidsynth: Soundfont memory leak

by Gez » Tue Oct 30, 2012 3:23 pm

Randy managed to get them to link statically I suppose. If he wants to share his secrets on the topic, I know several people who would be interested.

Re: [r3863] Fluidsynth: Soundfont memory leak

by Lars2500 » Tue Oct 30, 2012 1:27 pm

Enjay wrote:Do you know why it needs libglib-2.0-0.dll and libgthread-2.0-0.dll as well when Randy's one only needs fluidsynth.dll (which is also smaller than the one from the jOrgan program)?
Probably because it's simply compiled differently? :wink:

Re: [r3863] Fluidsynth: Soundfont memory leak

by Enjay » Tue Oct 30, 2012 11:51 am

Do you know why it needs libglib-2.0-0.dll and libgthread-2.0-0.dll as well when Randy's one only needs fluidsynth.dll (which is also smaller than the one from the jOrgan program)?

Re: [r3863] Fluidsynth: Soundfont memory leak

by Lars2500 » Mon Oct 29, 2012 4:47 pm

I did some further testing and found that the memory leak seems to be present in Randy's compiled fluidsynth.dll, not the ZDoom code.

There is a compiled fluidsynth dll out on the net that works flawlessly with ZDoom, does not have the memory leak and is based on the latest FluidSynth version 1.1.6. I found it in a program called jOrgan.

Re: [r3863] Fluidsynth: Soundfont memory leak

by SyntherAugustus » Sat Oct 27, 2012 11:57 am

Have you tried using BASSMIDI driver?

Re: [r3863] Fluidsynth: Soundfont memory leak

by Lars2500 » Sun Oct 21, 2012 3:34 pm

This is really nasty. Any chance of seeing this fixed in the near future? I too ran into this bug though I did not relate it to the Fluidsynth code but rather to the sound font used, and that will probably happen to others, too.

Re: [r3863] Fluidsynth: Soundfont memory leak

by Gez » Sat Sep 08, 2012 4:35 am

I've encountered the same issue. Music stops playing and will only resume if the [wiki]MIDI device[/wiki] is changed to a non-Fluidsynth one or if quitting and restarting ZDoom.

[r3863] Fluidsynth: Soundfont memory leak

by edward850 » Sat Sep 08, 2012 4:18 am

When using Fluidsynth, soundfonts seem to get loaded each time the music changes, but the old one is still held in memory. This fills the available memory within as much as 4 song changes with a 200MB soundfont.
Also, the error when Fluidsynth fails to load a soundfont when there isn't enough memory available is a somewhat misleading "Failed to load any MIDI patches" message.

Top