#3112 closed defect (fixed)
wxgui scatterplot tool: C++ assertion "m_window" failed at ../src/gtk/dcclient.cpp(2043) in DoGetSize(): GetSize() doesn't work without window
Reported by: | mlennert | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.0.5 |
Component: | wxGUI | Version: | svn-trunk |
Keywords: | scatterplot | Cc: | |
CPU: | Unspecified | Platform: | Unspecified |
Description
Trying to use the bivariate scatterplot tool in the Map Display I get the following error and nothing else:
Traceback (most recent call last): File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc- linux-gnu/gui/wxpython/mapdisp/frame.py", line 1175, in OnScatterplot win = ScatterFrame(parent=self, rasterList=raster) File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc- linux-gnu/gui/wxpython/wxplot/scatter.py", line 42, in __init__ BasePlotFrame.__init__(self, parent, size=size, **kwargs) File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc- linux-gnu/gui/wxpython/wxplot/base.py", line 113, in __init__ self.client.canvas.Bind(wx.EVT_LEFT_DOWN, self.OnMouseLeftDown) File "/usr/lib/python2.7/dist- packages/wx-3.0-gtk2/wx/_core.py", line 4228, in Bind event.Bind(self, id, id2, handler) File "/usr/lib/python2.7/dist- packages/wx-3.0-gtk2/wx/_core.py", line 4572, in Bind target.Connect(id1, id2, et, function) File "/usr/lib/python2.7/dist- 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(2043) in DoGetSize(): GetSize() doesn't work without window
Maybe linked to wx 3 ?
Attachments (2)
Change History (11)
comment:1 by , 8 years ago
follow-up: 3 comment:2 by , 8 years ago
comment:3 by , 8 years ago
Replying to annakrat:
Replying to mlennert:
Trying to use the bivariate scatterplot tool in the Map Display I get the following error and nothing else:
Please check if you have any local changes. I've seen this error when I was experimenting with #2558.
I just compiled a completely fresh checkout of trunk now. I don't think that the python-wx had any local modifications.
But the issue seems to be known:
Apparently some inconsistencies in python-wx3, IIUC.
The latest Debian version that I use actually includes a bugfix for the lib/plot.py:
based on a patch proposed in Launchpad:
https://bugs.launchpad.net/ubuntu/+source/wxpython3.0/+bug/1545698
which gets rid of the problem reported in #2558, but now I see the problem reported here...
comment:4 by , 8 years ago
Then it makes sense, your version of wxPython has fixed the original problem, but now a different problem appears (apparently only for wxGTK). There are some clues in the ticket you link, but I am not sure if it helps. If I can reproduce it on my system I'll try to look at it.
follow-up: 6 comment:5 by , 8 years ago
I modified the plot.py based on the information in the ticket and now it works for me, please test. I added it to gui_core and change all imports to:
import gui_core.wxlibplot as plot
comment:6 by , 8 years ago
Replying to annakrat:
I modified the plot.py based on the information in the ticket and now it works for me, please test. I added it to gui_core and change all imports to:
import gui_core.wxlibplot as plot
Beautiful, Anna ! This solves the issue (and so also #2558) and I now have all these great tools back: profile, histogram, and scatterplot !!
Thank you very much for looking into this !
follow-up: 8 comment:7 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in r69075 (and backported in r69076 and r69077). wxPython file wx.lib.plot.py (the fixed version, see http://trac.wxwidgets.org/ticket/16767) is now distributed with GRASS and modified to workaround this bug specific for wxGTK only: http://trac.wxwidgets.org/ticket/17293
follow-up: 9 comment:8 by , 8 years ago
Replying to annakrat:
Fixed in r69075 (and backported in r69076 and r69077). wxPython file wx.lib.plot.py (the fixed version, see http://trac.wxwidgets.org/ticket/16767) is now distributed with GRASS and modified to workaround this bug specific for wxGTK only: http://trac.wxwidgets.org/ticket/17293
I imagine that this should only be temporary: as soon as the bug is fixed in a new wxpython distribution, we should not maintain that code in our code base.
comment:9 by , 8 years ago
Replying to mlennert:
Replying to annakrat:
Fixed in r69075 (and backported in r69076 and r69077). wxPython file wx.lib.plot.py (the fixed version, see http://trac.wxwidgets.org/ticket/16767) is now distributed with GRASS and modified to workaround this bug specific for wxGTK only: http://trac.wxwidgets.org/ticket/17293
I imagine that this should only be temporary: as soon as the bug is fixed in a new wxpython distribution, we should not maintain that code in our code base.
Yes, the problem is nobody knows if and when classic wxPython 3 is released.
I can confirm that the bivariate scatterplot tool in the Map Display is not working (grass 7.3svn, r69054, python 2.7.12, wxpython 3.0.2.0, ubuntu 16.04). The error I got is slightly different, so adding below.