discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] [SOLVED] usrp_spectrum_sense.py segmentation faul


From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] [SOLVED] usrp_spectrum_sense.py segmentation fault problem
Date: Wed, 21 Dec 2011 10:58:31 -0500

On Wed, Dec 21, 2011 at 8:36 AM, Sebastian Döring <address@hidden> wrote:
Thank you guys - it worked!
The line positions have a changed a bit and so I simply attached the new code (gnuradio build 20.12.2011).

--- a/usrp_spectrum_sense.py    2011-12-20 12:44:55.000000000 +0100
+++ b/usrp_spectrum_sense.py    2011-12-21 14:26:19.252873684 +0100
@@ -28,9 +28,14 @@

 import sys
 import math
 import struct
+import threading
 sys.stderr.write("Warning: this is known to have issues on some machines+Python version combinations to seg fault due to the callback in bin_statitics. If you figure out why, we'd love to hear about it!\n")

 +class ThreadClass(threading.Thread):
+    def run(self):
+        return
+
 class tune(gr.feval_dd):
    """
    This class allows C++ code to callback into python.
@@ -240,6 +245,9 @@

 
 if __name__ == '__main__':
+    t = ThreadClass()
+    t.start()
+
    tb = my_top_block()
    try:
        tb.start()

Regards
Sebastian

Sebastian, thanks for the report!

Tom T., thanks for the patch! I updated the code in maint/master/next. It worked on my machine, too. If anyone who wants to use usrp_spectrum_sense.py and has more issues, please let us know.

Tom


reply via email to

[Prev in Thread] Current Thread [Next in Thread]