Audio sink busy / segfaults of WX FFT + WX Waterfall

Hi,

now I finally got grc running and I am trying to get familiar with it
again.

I ran into some funny stuff.
First, audio sinks don’t work. Device or ressource busy. THAT is kinda
weird.
Of course, I have some stuff accessing the audio device but shared
access
isn’t an issue - normally.

enterprise:~ # fuser -v /dev/snd/pcm*
USER PID ACCESS COMMAND
/dev/snd/pcmC0D0p: sgofferj 4486 F…m knotify4
sgofferj 4568 F…m amarok
root 8976 F…m sd_espeak
sgofferj 12180 F…m sd_espeak

Audio out works neither as sgofferj nor as root. Audio in, however,
works
fine.

Second issue:
I started with doing very simple stuff to freshen up my understanding of
sources, sinks, etc.
One of the first things I did was taking an audio source (mic) and
straightly
feeding it into an FFT, Waterfall and Scope sink. FFT and Waterfall
segfault.
Scope works.

Anybody any thoughts on that?
If some developers are reading here, advise me how to create backtraces
and I
will be happy to assist with debugging!

-S

On Thu, Apr 28, 2011 at 4:29 AM, Stefan Gofferje
[email protected]wrote:

Shared access when using ALSA is definitely an issue. Your other
programs
are likely using some audio layer on top of ALSA, like portaudio. GNU
Radio
will try to use ALSA straight away, which can cause sharing issues. This
is
a long standing problem, and we’ve never had anybody spend the necessary
time to work out a proper solution.

Second issue:
I
will be happy to assist with debugging!

-S

I’ve never seen/heard of those guys segfaulting before. Can you provide
the
settings of the blocks you are using? I’ve used the FFT and Waterfall
sinks
directly connected to a USRP source (both UHD and the legacy interface)
with
no problems.

Tom

I’ve never seen/heard of those guys segfaulting before. Can you
provide the settings of the blocks you are using? I’ve used the FFT
and Waterfall sinks directly connected to a USRP source (both UHD and
the legacy interface) with no problems.

Tom

I’ve seen this, and tracked it down to stuff inside of OpenGL (my fave
windmill to tilt at). The
OpenGL “ecosystem” is just broken. Certain types of display hardware
cause it ulcers, so the
segfaulting can appear random, because it only happens on certain
display hardware.


Principal Investigator
Shirleys Bay Radio Astronomy Consortium
http://www.sbrac.org

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/29/2011 12:48 PM, Tom R. wrote:

Shared access when using ALSA is definitely an issue. Your other
programs are likely using some audio layer on top of ALSA, like
portaudio. GNU Radio will try to use ALSA straight away, which can cause
sharing issues. This is a long standing problem, and we’ve never had
anybody spend the necessary time to work out a proper solution.

They shouldn’t. SuSE comes with pulseaudio but it’s buggy, so I
uninstalled it and changed all configs to use Alsa directly.

I’ve never seen/heard of those guys segfaulting before. Can you provide
the settings of the blocks you are using? I’ve used the FFT and
Waterfall sinks directly connected to a USRP source (both UHD and the
legacy interface) with no problems.

[email protected]:~> python top_block.py
Segmentation fault
[email protected]:~> cat top_block.py
#!/usr/bin/env python
##################################################

Gnuradio Python Flow Graph

Title: Top Block

Generated: Fri Apr 29 12:56:39 2011

##################################################

from gnuradio import audio
from gnuradio import eng_notation
from gnuradio import gr
from gnuradio import window
from gnuradio.eng_option import eng_option
from gnuradio.gr import firdes
from gnuradio.wxgui import fftsink2
from grc_gnuradio import wxgui as grc_wxgui
from optparse import OptionParser
import wx

class top_block(grc_wxgui.top_block_gui):

    def __init__(self):
            grc_wxgui.top_block_gui.__init__(self, title="Top 

Block")

            ##################################################
            # Variables
            ##################################################
            self.samp_rate = samp_rate = 44100

            ##################################################
            # Blocks
            ##################################################
            self.wxgui_fftsink2_0 = fftsink2.fft_sink_f(
                    self.GetWin(),
                    baseband_freq=0,
                    y_per_div=10,
                    y_divs=10,
                    ref_level=50,
                    ref_scale=2.0,
                    sample_rate=samp_rate,
                    fft_size=1024,
                    fft_rate=30,
                    average=False,
                    avg_alpha=None,
                    title="FFT Plot",
                    peak_hold=False,
            )
            self.Add(self.wxgui_fftsink2_0.win)
            self.audio_source_0 = audio.source(samp_rate, "", True)

            ##################################################
            # Connections
            ##################################################
            self.connect((self.audio_source_0, 0),

(self.wxgui_fftsink2_0, 0))

    def get_samp_rate(self):
            return self.samp_rate

    def set_samp_rate(self, samp_rate):
            self.samp_rate = samp_rate
            self.wxgui_fftsink2_0.set_sample_rate(self.samp_rate)

if name == ‘main’:
parser = OptionParser(option_class=eng_option, usage="%prog:
[options]")
(options, args) = parser.parse_args()
tb = top_block()
tb.Run(True)

i remember doing this like 2y ago when I first started experimenting
with gnuradio and then it worked.

  • -S

(o_ Stefan Gofferje | SCLT, MCP, CCSA
//\ Reg’d Linux User #247167 | VCP #2263
V_/_ Heckler & Koch - the original point and click interface
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)

iEYEARECAAYFAk26jAcACgkQbQKZlCdPOMN4QACgsVfyAucD/hYtio0h2KL3D8Z2
dHIAmgMUc+UPzC5QG0+UUhp7GnxXALed
=CvLW
-----END PGP SIGNATURE-----

On 29/04/2011 10:06 AM, Stefan Gofferje wrote:

Can I help tracking this down? How can I help?

Is it possible to tell WX not to use OpenGL but SDL or XRender?
I’m using a NVIDA GForce card with NVidia’s prop. drivers.

  • -S
    You can do the following in ~/.gnuradio/config.conf:

[wxgui]
style=nongl

Which will cause the GUI sinks (FFT, Waterfall, Plot) to not use the GL
versions of the GUI blocks.

Unfortunately there are two problems with that:

 o They are much uglier
 o They are missing functionality
      That is, the non-gl instances are completely different 

implementations, and they don’t have all the
features of the GL instances

Also, there’s a general discussion of problems here:

http://gnuradio.org/redmine/wiki/1/CompGrWxgui

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/29/2011 02:18 PM, Marcus D. Leech wrote:

I’ve seen this, and tracked it down to stuff inside of OpenGL (my fave
windmill to tilt at). The
OpenGL “ecosystem” is just broken. Certain types of display hardware
cause it ulcers, so the
segfaulting can appear random, because it only happens on certain
display hardware.

Can I help tracking this down? How can I help?

Is it possible to tell WX not to use OpenGL but SDL or XRender?
I’m using a NVIDA GForce card with NVidia’s prop. drivers.

  • -S

(o_ Stefan Gofferje | SCLT, MCP, CCSA
//\ Reg’d Linux User #247167 | VCP #2263
V_/_ Heckler & Koch - the original point and click interface
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)

iEYEARECAAYFAk26xdAACgkQbQKZlCdPOMOk3wCghkFFe9PqjViB5VBPjH0SW1yy
B58AnRhWGb1CFT998lk8EkJ2eh/XV1b9
=rNH5
-----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/29/2011 05:14 PM, Marcus D. Leech wrote:

You can do the following in ~/.gnuradio/config.conf:

[wxgui]
style=nongl

Which will cause the GUI sinks (FFT, Waterfall, Plot) to not use the GL
versions of the GUI blocks.

File didn’t exist yet, so I created it and put the directives in.
No effect. Still segfaulting.

  • -S

(o_ Stefan Gofferje | SCLT, MCP, CCSA
//\ Reg’d Linux User #247167 | VCP #2263
V_/_ Heckler & Koch - the original point and click interface
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)

iEYEARECAAYFAk260NoACgkQbQKZlCdPOMMJVwCdEd9ovUp5zRzg7qS/CKYN9neZ
mwIAnA1Y4LiKJGc/3yJZMEuLGU1CfjNz
=U2EY
-----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Now also the WX scope segfaults.
I tried any combination of setting/unsetting LIBGL_ALWAYS_INDIRECT
(found via Google) and style=nongl / gl. I can’t see a pattern.


(o_ Stefan Gofferje | SCLT, MCP, CCSA
//\ Reg’d Linux User #247167 | VCP #2263
V_/_ Heckler & Koch - the original point and click interface
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)

iEYEARECAAYFAk27skgACgkQbQKZlCdPOMNKJwCgrSPvnAfMTEhdyIdmrlPOjSaH
sv4An166Xt4LKGdwIfY+p/ZVdu6KJ2S0
=Ys3k
-----END PGP SIGNATURE-----

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs