[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss-gnuradio] wxPython 3.0 breaks wxGUI
From: |
Jookia |
Subject: |
[Discuss-gnuradio] wxPython 3.0 breaks wxGUI |
Date: |
Fri, 13 Jun 2014 10:19:16 +1000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
(Apologies if this is posted twice, I subscribed as it didn't seem to be
show up on the archives.)
Hey there,
Arch Linux uses wxPython 3.0 which throws assertions that I haven't had
the patience to track down, to do with m_window not being established:
Traceback (most recent call last):
File "./top_block.py", line 87, in <module>
tb = top_block()
File "./top_block.py", line 43, in __init__
y_axis_label="Counts",
File
"/usr/lib/python2.7/site-packages/gnuradio/wxgui/scopesink_nongl.py",
line 76, in __init__
v_scale, t_scale, self.guts, title), parent)
File
"/usr/lib/python2.7/site-packages/gnuradio/wxgui/scopesink_nongl.py",
line 243, in __init__
self.graph = graph_window(info, self, -1)
File
"/usr/lib/python2.7/site-packages/gnuradio/wxgui/scopesink_nongl.py",
line 468, in __init__
EVT_DATA_EVENT(self, self.format_data)
File
"/usr/lib/python2.7/site-packages/gnuradio/wxgui/scopesink_nongl.py",
line 142, in EVT_DATA_EVENT
win.Connect(-1, -1, wxDATA_EVENT, func)
File "/usr/lib/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py", line
4182, in Connect
return _core_.EvtHandler_Connect(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "m_window" failed at
./src/gtk/dcclient.cpp(2041) in DoGetSize(): GetSize() doesn't work
without window
It seems to be caused by this block of code in
gr-wxgui/python/wxgui/plot.py:
# OnSize called to make sure the buffer is initialized.
# This might result in OnSize getting called twice on some
# platforms at initialization, but little harm done.
self.OnSize(None) # sets the initial size based on client size
# UNCONDITIONAL, needed to create self._Buffer
def OnSize(self,event):
# The Buffer init is done here, to make sure the buffer is always
# the same size as the Window
Size = self.GetClientSize()
I'm uncertain who's at fault, upstream or GNU Radio. wxWidgets 3.0.0's
plot.py is different code-wise so this may be an actual problem that's
been hidden by not having assertions, I'm guessing calling . There's a
couple of ways to fix it:
1. Move to a new plot.py and backport some functions to make it work. I
did some vague copy pasting and managed to get an output that worked. It
seems the specific stuff seems to be just UseScopeTicks, which is only
used by scopesink_nongl, maybe some refactoring could help fix this?
2. Commenting out the "self.OnSize(None)", call entirely seems to work
so it might be that OnSize is called properly nowadays. However the
upstream plot.py doesn't indicate this.
Anyways, that's about it. Things are broken on Arch Linux for now, and
for future distributions that move to wxPython 3.
Cheers,
Jookia.
- [Discuss-gnuradio] wxPython 3.0 breaks wxGUI,
Jookia <=