<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div apple-content-edited="true"><br class="Apple-interchange-newline"> </div><br><div><div>On Mar 15, 2009, at 3:19 PM, &lt;<a href="mailto:grass-dev-request@lists.osgeo.org">grass-dev-request@lists.osgeo.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="font-family: Helvetica; font-size: medium; color: rgba(0, 0, 0, 0.496094); "><b>From:<span class="Apple-converted-space">&nbsp;</span></b></span><span style="font-family: Helvetica; font-size: medium; ">Huidae Cho &lt;<a href="mailto:grass4u@gmail.com">grass4u@gmail.com</a>&gt;<br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="font-family: Helvetica; font-size: medium; color: rgba(0, 0, 0, 0.496094); "><b>Date:<span class="Apple-converted-space">&nbsp;</span></b></span><span style="font-family: Helvetica; font-size: medium; ">March 15, 2009 3:21:14 PM GMT-07:00<br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="font-family: Helvetica; font-size: medium; color: rgba(0, 0, 0, 0.496094); "><b>To:<span class="Apple-converted-space">&nbsp;</span></b></span><span style="font-family: Helvetica; font-size: medium; "><a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="font-family: Helvetica; font-size: medium; color: rgba(0, 0, 0, 0.496094); "><b>Cc:<span class="Apple-converted-space">&nbsp;</span></b></span><span style="font-family: Helvetica; font-size: medium; "><a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>, Martin Landa &lt;<a href="mailto:landa.martin@gmail.com">landa.martin@gmail.com</a>&gt;<br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="font-family: Helvetica; font-size: medium; color: rgba(0, 0, 0, 0.496094); "><b>Subject:<span class="Apple-converted-space">&nbsp;</span></b></span><span style="font-family: Helvetica; font-size: medium; "><b>[GRASS-dev] empty map window/map rendering doesn't work (wxgui)</b><br></span></div><br><br>Hi,<br><br>I'm having a similar problem to this one after updating my repository<br>(grass/trunk) yesterday. &nbsp;I installed SWIG, wxPython (version 2.8.9.2),<br>and wxWidgets (version 2.8.9.2, --enable-graphics_ctx), but my Cairo<br>version is 1.4.10, which means no g.cairocomp.<br><br>My error message looks like this:<br>----------------<br>Traceback (most recent call last):<br>&nbsp;File "/home/geni/usr/grass/grass-trunk/dist.i686-pc-linux-<br>gnu/etc/wxpython/gui_modules/mapdisp_window.py", line 448,<br>in OnPaint<br><br>self.pdc.DrawToDCClipped(dc, rgn)<br>&nbsp;File "/home/geni/usr/grass/grass-trunk/dist.i686-pc-linux-<br>gnu/etc/wxpython/vdigit/grass7_wxvdigit.py", line 384, in<br>DrawToDCClipped<br><br>def DrawToDCClipped(self, *args): return<br>_grass7_wxvdigit.PseudoDC_DrawToDCClipped(self, *args)<br>TypeError<br>:<br>in method 'PseudoDC_DrawToDCClipped', argument 2 of type<br>'void *'<br>Traceback (most recent call last):<br>&nbsp;File "/home/geni/usr/grass/grass-trunk/dist.i686-pc-linux-<br>gnu/etc/wxpython/gui_modules/mapdisp_window.py", line 540,<br>in OnIdle<br><br>self.UpdateMap(render=True)<br>&nbsp;File "/home/geni/usr/grass/grass-trunk/dist.i686-pc-linux-<br>gnu/etc/wxpython/gui_modules/mapdisp_window.py", line 665,<br>in UpdateMap<br><br>self.Draw(self.pdc, self.img, drawid=id)<br>&nbsp;File "/home/geni/usr/grass/grass-trunk/dist.i686-pc-linux-<br>gnu/etc/wxpython/gui_modules/mapdisp_window.py", line 264,<br>in Draw<br><br>pdc.SetBackground(bg)<br>&nbsp;File "/home/geni/usr/grass/grass-trunk/dist.i686-pc-linux-<br>gnu/etc/wxpython/vdigit/grass7_wxvdigit.py", line 374, in<br>SetBackground<br><br>def SetBackground(self, *args): return<br>_grass7_wxvdigit.PseudoDC_SetBackground(self, *args)<br>TypeError<br>:<br>in method 'PseudoDC_SetBackground', argument 2 of type<br>'wxBrush const &amp;'<br>----------------<br><br>I took a closer look at the code of _wrap_PseudoDC_DrawToDCClipped<br>(grass7_wxvdigit_wrap.cpp) and SWIG_IsOK, and SWIG_ConvertPtr<br>(swig-1.3.38/Lib/python/pyrun.swg).<br><br>To get the above error (i.e., !SWIG_IsOK(res2)), SWIG_ConvertPtr(obj1,<br>SWIG_as_voidptrptr(&amp;arg2), 0, 0) or SWIG_Python_ConvertPtrAndOwn(obj1,<br>SWIG_as_voidptrptr(&amp;arg2), 0, 0) should return a negative integer. &nbsp;What<br>happens in SWIG_Python_ConvertPtrAndOwn is that it returns SWIG_ERROR<br>(-1) when (obj1 is NULL) or (SWIG_Python_GetSwigThis(obj1) is NULL<br>and flags (the last argument, 0) is 0).<br><br>This error starts from self.pdc.DrawToDCClipped(dc, rgn) in<br>mapdisp_window.py, and obj1 is dc in this call. &nbsp;Is dc NULL? &nbsp;No, it<br>isn't. &nbsp;"print dc" displays "&lt;wx._gdi.BufferedPaintDC; proxy of &lt;Swig<br>Object of type 'wxBufferedPaintDC *' at 0x9427940&gt; &gt;". &nbsp;Then, did<br>SWIG_Python_GetSwigThis return NULL? &nbsp;Probably...<br><br>This error occurs even before calling gwxPseudoDC_DrawToDCClipped, so I<br>think just chaning the prototype of DrawToDCClipped in pseudodc.i as in<br>revision 36252 cannot solve this problem (and, actually, it didn't).<br><br>Could it be my wxWidget configure flags? &nbsp;--enable-unicode<br>--enable-sound --enable-graphics_ctx --with-sdl --with-opengl<br><br>Any ideas?<br><br>Thanks.<br>Huidae<br></span></blockquote></div><br><div>I updated last night and am having no problems like this with 6.5 or 7 (on Mac OS X).</div><div><br></div><div>Michael</div></body></html>