[PD] tracking down segfault in dssi~

Jamie Bullock jamie at postlude.co.uk
Sun Dec 14 15:37:17 CET 2008


Hi Ico,

I'm pretty sure that the behaviour you are experiencing is down to a
buggy plugin you have installed somewhere on your system. I just tried
to reproduce the problem with pd-extended 0.40.3 on Ubuntu Intrepid with
dssi~ 0.97, and I can't reproduce it.

Basically the plugin search function LADSPAPluginSearch() will open
every file in your search path. If it is a library (of any sort) it will
look for the symbols "ladspa_descriptor" or "dssi_descriptor" inside it.
If one of these gets found, the callback function
dssi_tilde_search_plugin_callback()  is invoked. This iterates over the
plugins in the library by repeatedly calling the Plugin's descriptor
function until a match is found against the plugin search string
provided as an argument to dssi~. A potential crash situation could
occur if the symbol "dssi_descriptor" is exported by the plugin library,
but the descriptor function doesn't return a pointer to a valid
DSSI_Descriptor struct...

(see more below)

On Fri, 2008-12-12 at 21:05 -0500, Ivica Ico Bukvic wrote:
<snip>
> This is running on Intrepid with the ladspa-sdk being 1.1 (latest)
> version. However, upon closer inspection of the search.c in the
> ladspa-sdk I noticed that there is no such LADSPAPluginSearch function
> that takes in two arguments, but rather one as follows:
> 
> void
> LADSPAPluginSearch(LADSPAPluginSearchCallbackFunction
> fCallbackFunction)

dssi~ uses a modified version of the ladspa-sdk search functions, which
provides support for DSSI as well as LADSPA plugins. If you look in
jsearch.c (with the dssi~ sources), you can find the modified
LADSPAPluginSearch()

> So, what gives? Am I missing something obvious? When compiled in debug
> mode, dssi~ still manages to list all plugins, followed by "no more
> csLADSPA plugins" and then crashes as described above. Could it be
> something with my LADSPA setup?

To take this further there are a couple of things you could try:

1. Remove all LADSPA and DSSI plugins from your search path *except*
sine.so, and then try: [dssi~ sine_faaa]. Does it still crash? If not, I
suspect a dodgy lib in your path. You could gradually add back your
plugins to isolate the faulty one.

2. Recompile dssi~ with the debugging symbols enabled -- comment out
LINXCFLAGS in the makefile, and uncomment the line under '# Debug'. Then
run the pd-extended process under a debugger.

apt-get install gdb
gdb pd-extended

Then when you get the crash, in the debugger console, type 'bt', and
send me the results.

Jamie

P.S. Even if this is a bug in a plugin, dssi~ still shouldn't crash --
we need to handle the problem somehow...


-- 
www.postlude.co.uk
http://www.linkedin.com/in/jamiebullock






More information about the Pd-list mailing list