-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segmentation fault #28
Comments
I am no Linux expert but are you using the latest version of
libfluidsynth (2.1.5 I believe)?
Have you installed jackd as described in using_EasyABC_in_Linux.txt:
sudo apt install libfluidsynth2 fluid-soundfont-gm jackd
Hope this helps. Otherwise you will have to google for answers.
…On 18-10-2020 4:28, PigeonOnTheGate wrote:
Thank you for fixing the my last issue. However, after I finally got
around to updating easyabc to the latest version, the program no
longer starts. It instead gives an error:
|fluidsynth: warning: SDL2 not initialized, SDL2 audio driver won't be
usable /usr/bin/easyabc: line 2: 9134 Segmentation fault (core dumped)
python3 /usr/share/easyabc/easy_abc.py|
Thank you very much for your help
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#28>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC22EZFFN5PMMCYLUUX3U7TSLJHDNANCNFSM4SUYNMUA>.
|
Thanks so much for the advice! I do have all of the above installed. Since this is a warning rather than an error, is there a way to make the program run in spite of it? I've noticed easyABC does start if I remove fluidsynth entirely, so if I'm unable to solve this, I'll just remove fluidsynth and use an external midi player. After googling, I found someone who had a similar problem due to a missing line of code. Do you think the solution from there might work? |
Yes I found that page too, but that was about another matter: the
warning about SDL2 not found used to be reported as an error. That issue
was resolved as nowadays a warning is given when SDL2 is not available.
But SDL2 is not the only way for FluidSynth to produce sound, so it
should not be a concern. When I tested with VirtualBox I got the same
warning, but not the Segmentation fault.
What version of FluidSynth are you using? Have you installed a package?
Or did you build from source?
…On 22-10-2020 20:57, PigeonOnTheGate wrote:
Thanks so much for the advice! I do have all of the above installed.
Since this is a warning rather than an error, is there a way to make
the program run in spite of it? I've noticed easyABC does start if I
remove fluidsynth entirely, so if I'm unable to solve this, I'll just
remove fluidsynth and use an external midi player.
After googling, I found someone who had a similar problem
<FluidSynth/fluidsynth#622> due to a missing
line of code. Do you think the solution from there might work?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#28 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC22EZCPBZFKSTCJZBWUJ33SMB6CXANCNFSM4SUYNMUA>.
|
I'm using FluidSynth 2.1.5, which I installed from a package. I have also tried setting FluidSynth's driver to JACK and ALSA, but strangely enough, the same warning and segmentation fault occur. I checked dependencies, and a number of packages depend on SDL2, including fluidsynth, python3-wxpython, and easyabc itself. Here are my fluidsynth settings, maybe I need to change something here for things to work?
|
I have just noticed that if I run fluidsynth in the terminal, a number of errors are shown, if I run it from the root, however, these errors do not occur. Could these be the cause of the segmentation fault? When I run fluidsynth from the terminal, it shows:
When I run it from the terminal as root, it shows:
|
If you edit easy_abc.py you can find some commented code.
If you remove the 6 # (see code below) it might give you some clues.
try:
import faulthandler # pip install faulthandler
faulthandler.enable()
except ImportError:
print('faulthandler not installed. Try: pip install faulthandler')
pass
But first you need to install a python-package named faulthandler.
For python 2:
pip install faulthandler
For Python 3
pip3 install faulthandler
Then start EasyABC with:
python3 easy_abc.py
…On 28-10-2020 02:51, PigeonOnTheGate wrote:
The errors that fluidsynth was giving me were related to JACK, and I
was able to fix them with this method , unfortunately, this did
nothing to fix the segmentation fault with easyABC, so this is another
dead end. In any case, running fluidsynth now gives this output
FluidSynth runtime version 2.1.5
Copyright (C) 2000-2020 Peter Hanappe and others.
Distributed under the LGPL license.
SoundFont(R) is a registered trademark of E-mu Systems, Inc.
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jackdmp 1.9.14
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2019 Filipe Coelho.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
no message buffer overruns
no message buffer overruns
no message buffer overruns
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
audio_reservation_init
Acquire audio card Audio0
creating alsa driver ...
hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer =
2 periods
ALSA: final selected sample format for capture: 32bit integer
little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 32bit integer
little-endian
ALSA: use 2 periods for playback
fluidsynth: Jack sample rate mismatch, adjusting.
(synth.sample-rate=44100, jackd=48000)
Type 'help' for help topics.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#28 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC22EZDWBT5GZKDW3MVMO5LSM52KNANCNFSM4SUYNMUA>.
|
Thank you. Running this gave some interesting output:
|
You could experiment with putting the line in comment (put an # at the
beginning) and see how that goes.
Setting the gain is not essential so you could give it a try.
|
/usr/share/easyabc/fluidsynth.py|
classSynth: # interface for the FluidSynth synthesizer
def__init__(self, gain=0.2, samplerate=44100.0, bsize=64):
self.settings = F.new_fluid_settings()
# self.setting_setnum('synth.gain', gain)
…On 30-10-2020 02:50, PigeonOnTheGate wrote:
Thank you. Running this gave some interesting output:
|fluidsynth: warning: SDL2 not initialized, SDL2 audio driver won't be
usable Fatal Python error: Segmentation fault Current thread
0x00007fadab4d2740 (most recent call first): File
"/usr/share/easyabc/fluidsynth.py", line 65 in setting_setnum File
"/usr/share/easyabc/fluidsynth.py", line 51 in __init__ File
"/usr/share/easyabc/fluidsynthplayer.py", line 15 in __init__ File
"/usr/share/easyabc/easy_abc.py", line 3698 in __init__ File
"/usr/share/easyabc/easy_abc.py", line 8336 in NewMainFrame File
"/usr/share/easyabc/easy_abc.py", line 8377 in OnInit File
"/usr/lib64/python3.8/site-packages/wx/core.py", line 2194 in __init__
File "/usr/share/easyabc/easy_abc.py", line 8314 in __init__ File
"/usr/share/easyabc/easy_abc.py", line 8385 in <module>
/usr/bin/easyabc: line 2: 28220 Segmentation fault (core dumped)
python3 /usr/share/easyabc/easy_abc.py |
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#28 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC22EZDUO2OP6FV3L7DPMKLSNILVDANCNFSM4SUYNMUA>.
|
Hi, I fiddled around with the code a bit, and tried commenting out the non-essential lines that would cause errors. Eventually I ended up with this:
at this point, only essential lines were left, but these were still causing errors:
What seems so strange to me here is that the code is able to import the library (there is no import error), but attempting to inintialize fluidsynth causes the program to crash. I haven't been able to find anyone else having similar issues with fluidsynth, and I can't really tell if this is an issue with fluidsynth, the easyabc code, or if something is wrong in my settings. |
I think I may have found something in the fluidsynth api http://www.fluidsynth.org/api/audio_8h.html
This could explain why the program would cause a segfault on my computer and not on yours, as we might have different audio drivers installed. |
from what I can gather here and here, it seems that when fluidsynth is initialized with new_fluid_settings(), it initializes all audio drivers. One of these audio drivers may segfault, causing fluidsynth to crash. It seems that the solution to this is to identify which driver is the culprit and exclude it by using the fluid_audio_driver_register() command. |
On Linux EasyABC now uses pulseaudio as audio driver for FluidSynth. Does that solve this issue perhaps? |
Thanks so much - trying it out right now. |
To be able to use FluidSynth as audio player you should indeed leave the midi player field blank and select a sound font. |
When I leave the midi player field blank and select a soundfont, I still get a gstreamer error and no playback. If I press play, I get two pop-ups: one says "media playback error: Internal data stream error." and the other says "Unable to load /home/username/.EasyABC/cache/temp.midi: unsupported format?" I tried the workaround with jackd from here, but it gives the same exact result. Oddly enough, if I select fluidsynth as an external player, it works. Is there a way to get more info on those errors and why the program isn't working? Thanks so much |
Since your FluidSynth is working as an external player you probably have done: sudo apt install libfluidsynth2 fluid-soundfont-gm |
Could be a library issue. My fluidsynth library is now called libfluidsynth3 after an update a few months ago. I'll try to see if I can downgrade it to libfluidsynth2. |
I am see a similar issue after upgrading from ubuntu 21.10 to 22.04 both using pipewire. The segfault looks like
When I try to run fluidsynth standalone I get:
This gets slightly better via:
|
Looking into this some more it seems that under ubuntu 22.04 python3.10 and libfluidsynth3:amd64 any access to the settings object created by: fails |
inserting the stamza below got rid of the seg-fault
However, there is a new problem with Gstreamer that results in annoying alert-boxes:
|
My last problem could be solved by commenting out the lines like: mc.Load('NONEXISTANT_FILE____.mid') based on: https://sourceforge.net/p/easyabc/discussion/general/thread/524f3f9c/?limit=25 |
I can confirm this solution is working on Arch Linux and resolves the Seg Fault. |
Thank you for fixing the my last issue. However, after I finally got around to updating easyabc to the latest version, the program no longer starts. It instead gives an error:
fluidsynth: warning: SDL2 not initialized, SDL2 audio driver won't be usable /usr/bin/easyabc: line 2: 9134 Segmentation fault (core dumped) python3 /usr/share/easyabc/easy_abc.py
Thank you very much for your help
The text was updated successfully, but these errors were encountered: