(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
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:
-
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? -
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.