On Mar 15, 2009, at 3:19 PM, <grass-dev-requ...@lists.osgeo.org> wrote:
From: Huidae Cho <gras...@gmail.com>
Date: March 15, 2009 3:21:14 PM GMT-07:00
To: grass-dev@lists.osgeo.org
Cc: grass-u...@lists.osgeo.org, Martin Landa <landa.mar...@gmail.com>
Subject: [GRASS-dev] empty map window/map rendering doesn't work
(wxgui)
Hi,
I'm having a similar problem to this one after updating my repository
(grass/trunk) yesterday. I installed SWIG, wxPython (version
2.8.9.2),
and wxWidgets (version 2.8.9.2, --enable-graphics_ctx), but my Cairo
version is 1.4.10, which means no g.cairocomp.
My error message looks like this:
----------------
Traceback (most recent call last):
File "/home/geni/usr/grass/grass-trunk/dist.i686-pc-linux-
gnu/etc/wxpython/gui_modules/mapdisp_window.py", line 448,
in OnPaint
self.pdc.DrawToDCClipped(dc, rgn)
File "/home/geni/usr/grass/grass-trunk/dist.i686-pc-linux-
gnu/etc/wxpython/vdigit/grass7_wxvdigit.py", line 384, in
DrawToDCClipped
def DrawToDCClipped(self, *args): return
_grass7_wxvdigit.PseudoDC_DrawToDCClipped(self, *args)
TypeError
:
in method 'PseudoDC_DrawToDCClipped', argument 2 of type
'void *'
Traceback (most recent call last):
File "/home/geni/usr/grass/grass-trunk/dist.i686-pc-linux-
gnu/etc/wxpython/gui_modules/mapdisp_window.py", line 540,
in OnIdle
self.UpdateMap(render=True)
File "/home/geni/usr/grass/grass-trunk/dist.i686-pc-linux-
gnu/etc/wxpython/gui_modules/mapdisp_window.py", line 665,
in UpdateMap
self.Draw(self.pdc, self.img, drawid=id)
File "/home/geni/usr/grass/grass-trunk/dist.i686-pc-linux-
gnu/etc/wxpython/gui_modules/mapdisp_window.py", line 264,
in Draw
pdc.SetBackground(bg)
File "/home/geni/usr/grass/grass-trunk/dist.i686-pc-linux-
gnu/etc/wxpython/vdigit/grass7_wxvdigit.py", line 374, in
SetBackground
def SetBackground(self, *args): return
_grass7_wxvdigit.PseudoDC_SetBackground(self, *args)
TypeError
:
in method 'PseudoDC_SetBackground', argument 2 of type
'wxBrush const &'
----------------
I took a closer look at the code of _wrap_PseudoDC_DrawToDCClipped
(grass7_wxvdigit_wrap.cpp) and SWIG_IsOK, and SWIG_ConvertPtr
(swig-1.3.38/Lib/python/pyrun.swg).
To get the above error (i.e., !SWIG_IsOK(res2)), SWIG_ConvertPtr(obj1,
SWIG_as_voidptrptr(&arg2), 0, 0) or SWIG_Python_ConvertPtrAndOwn(obj1,
SWIG_as_voidptrptr(&arg2), 0, 0) should return a negative integer.
What
happens in SWIG_Python_ConvertPtrAndOwn is that it returns SWIG_ERROR
(-1) when (obj1 is NULL) or (SWIG_Python_GetSwigThis(obj1) is NULL
and flags (the last argument, 0) is 0).
This error starts from self.pdc.DrawToDCClipped(dc, rgn) in
mapdisp_window.py, and obj1 is dc in this call. Is dc NULL? No, it
isn't. "print dc" displays "<wx._gdi.BufferedPaintDC; proxy of <Swig
Object of type 'wxBufferedPaintDC *' at 0x9427940> >". Then, did
SWIG_Python_GetSwigThis return NULL? Probably...
This error occurs even before calling gwxPseudoDC_DrawToDCClipped,
so I
think just chaning the prototype of DrawToDCClipped in pseudodc.i as
in
revision 36252 cannot solve this problem (and, actually, it didn't).
Could it be my wxWidget configure flags? --enable-unicode
--enable-sound --enable-graphics_ctx --with-sdl --with-opengl
Any ideas?
Thanks.
Huidae
I updated last night and am having no problems like this with 6.5 or 7
(on Mac OS X).
Michael
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev