On Thu, Jun 12, 2014 at 8:19 PM, Jookia <166...@gmail.com> wrote:

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

Jookia,

Thanks. this was discovered a couple of days ago. We don't really have
anyone to fix it right now, so if you can complete your solution(s) you
mentioned above and send us a patch, that would be fantastic.

In one sense, this is a low priority because we are moving away from using
the wx sinks in favor of the qt sinks. Still, for now, most of our examples
are base on wx, so we will need this to work for a little bit longer.

Tom
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to