[GRASS-dev] [GRASS GIS] #539: Error on "Display Map" in wxpython

#539: Error on "Display Map" in wxpython
-------------------------+--------------------------------------------------
Reporter: cnielsen | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Keywords: | Platform: MSWindows Vista
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
When I click display map in wxpython, nothing happens. The following error
appears in command output:
Traceback (most recent call last):
   File "c:\Programs\GIS\osgeo4w\apps\grass\grass-6.5.svn\etc
\wxpython\gui_modules\mapdisp.py", line 541, in OnDraw

self.MapWindow.UpdateMap(render=False)
   File "c:\Programs\GIS\osgeo4w\apps\grass\grass-6.5.svn\etc
\wxpython\gui_modules\mapdisp_window.py", line 661, in
UpdateMap

self.Draw(self.pdc, self.img, drawid=id)
   File "c:\Programs\GIS\osgeo4w\apps\grass\grass-6.5.svn\etc
\wxpython\gui_modules\mapdisp_window.py", line 289, in Draw

pdc.DrawBitmap(bitmap, wx.Point(coords[0], coords[1]), True)
# draw the composite map
   File "C:\Programs\GIS\OSGeo4W\apps\Python25\lib\site-
packages\wx-2.8-msw-unicode\wx\_gdi.py", line 7526, in
DrawBitmap

return _gdi_.PseudoDC_DrawBitmap(*args, **kwargs)
TypeError
:
in method 'PseudoDC_DrawBitmap', expected argument 3 of type
'int'

This is a build of develbranch_6 within the osgeo4w tree on vista.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/539&gt;
GRASS GIS <http://grass.osgeo.org>

#539: Error on "Display Map" in wxpython
------------------------------+---------------------------------------------
  Reporter: cnielsen | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: MSWindows Vista | Cpu: Unspecified
------------------------------+---------------------------------------------
Comment (by cnielsen):

As point of reference, 6.4.0RC3 worked fine.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/539#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#539: Error on "Display Map" in wxpython
------------------------------+---------------------------------------------
  Reporter: cnielsen | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: MSWindows Vista | Cpu: Unspecified
------------------------------+---------------------------------------------
Comment (by cnielsen):

Same error occurs on trunk

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/539#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#539: Error on "Display Map" in wxpython
------------------------------+---------------------------------------------
  Reporter: cnielsen | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.5.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: MSWindows Vista | Cpu: Unspecified
------------------------------+---------------------------------------------
Changes (by hamish):

  * milestone: 6.4.0 => 6.5.0

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/539#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#539: Error on "Display Map" in wxpython
------------------------------+---------------------------------------------
  Reporter: cnielsen | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.5.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: MSWindows Vista | Cpu: Unspecified
------------------------------+---------------------------------------------
Comment (by cnielsen):

Still no resolution to this bug, perhaps it relates to the change from
mapdisp.py
{{{
pdc.DrawBitmap(bitmap, coords[0], coords[1], True) # draw the composite
map
}}}
To mapdisp_window.py:
{{{
pdc.DrawBitmap(bitmap, wx.Point(coords[0], coords[1]), True) # draw the
composite map
}}}
The error says "expected argument 3 of type 'int'" and it seems that it is
still looking for "coords[1]" when in the latter case it is instead
getting "true" since "coords[1]" has been put within wx.Point as part of
arg 2.

Trying to trace this back I noticed that the
grass-6.5.svn/etc/wxpython/vdigit folder is empty. Apparently vdigit isn't
compiling at all. Ideas?

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/539#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#539: Error on "Display Map" in wxpython
------------------------------+---------------------------------------------
  Reporter: cnielsen | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.5.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: MSWindows Vista | Cpu: Unspecified
------------------------------+---------------------------------------------
Comment (by cnielsen):

I found the README, apparently I need --python and --wxwidgets. If I'm
understanding this correctly, this ticket should probably be closed.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/539#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#539: Error on "Display Map" in wxpython
------------------------------+---------------------------------------------
  Reporter: cnielsen | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.5.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: MSWindows Vista | Cpu: Unspecified
------------------------------+---------------------------------------------
Comment (by cnielsen):

On second thought, you shouldn't need (and didn't need before) support for
vdigit just to display a map. It seems that it got incorporated as a
requirement rather than an option somewhere along the line.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/539#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>

#539: Error on "Display Map" in wxpython
------------------------------+---------------------------------------------
  Reporter: cnielsen | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.5.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: MSWindows Vista | Cpu: Unspecified
------------------------------+---------------------------------------------
Comment (by jef):

see also http://trac.osgeo.org/osgeo4w/ticket/37#comment:13 ff

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/539#comment:7&gt;
GRASS GIS <http://grass.osgeo.org>

#539: Error on "Display Map" in wxpython
------------------------------+---------------------------------------------
  Reporter: cnielsen | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.5.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: MSWindows Vista | Cpu: Unspecified
------------------------------+---------------------------------------------
Changes (by cnielsen):

* cc: jef@norbit.de (added)

Comment:

Replying to [comment:7 jef]:
> see also http://trac.osgeo.org/osgeo4w/ticket/37#comment:13 ff
That ticket includes information about vdigit and nviz but they're still
not functioning in the osgeo4w builds right?

Do I need to run {{{package.cmd}}} to make a functioning GUI? If so I'm
missing {{{h:\windows\wxPython-src-2.8.9.1}}} and my attempts to get it
from the wxpython/wxwidgets svn were unsuccessful...

I'm still missing something, but I see that you didn't need --python or
--wxwidgets in your osgeo4w builds.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/539#comment:8&gt;
GRASS GIS <http://grass.osgeo.org>

#539: Error on "Display Map" in wxpython
------------------------------+---------------------------------------------
  Reporter: cnielsen | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.5.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: MSWindows Vista | Cpu: Unspecified
------------------------------+---------------------------------------------
Comment (by jef):

Replying to [comment:8 cnielsen]:
> Replying to [comment:7 jef]:
> > see also http://trac.osgeo.org/osgeo4w/ticket/37#comment:13 ff
> That ticket includes information about vdigit and nviz but they're still
not functioning in the osgeo4w builds right?

Yes.

> Do I need to run {{{package.cmd}}} to make a functioning GUI? If so I'm
missing {{{h:\windows\wxPython-src-2.8.9.1}}} and my attempts to get it
from the wxpython/wxwidgets svn were unsuccessful...

That's the wxPython build. I started off with
http://www.wxpython.org/download.php#binaries there (including the devel
packages), but IIRC I couldn't get the libraries to work.

So I resorted to building wxPython with VC++ 2008 Express Edition -
leading to the described problems. Later I tried with VS2003, which
didn't significantly changed anything.

> I'm still missing something, but I see that you didn't need --python or
--wxwidgets in your osgeo4w builds.

Exactly. GRASS is not aware of distutils, which AFAIK should be used to
build python extensions.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/539#comment:9&gt;
GRASS GIS <http://grass.osgeo.org>

#539: Error on "Display Map" in wxpython
------------------------------+---------------------------------------------
  Reporter: cnielsen | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.5.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: MSWindows Vista | Cpu: Unspecified
------------------------------+---------------------------------------------
Comment (by jef):

build script {{{package.cmd}}} for wxPython:

{{{
set WXWIN=%CD%
set WXDIR=%CD%
set PATH=%PATH%;%WXWIN%\lib\vc_dll

cd build\msw
nmake -f makefile.vc OFFICIAL_BUILD=1 BUILD=release SHARED=1 MONOLITHIC=0
USE_XML=1 USE_OPENGL=1 USE_GDIPLUS=1 UNICODE=1 MSLU=1 HYBRID=1

cd %WXWIN%\contrib\build\stc
nmake -f makefile.vc OFFICIAL_BUILD=1 BUILD=release SHARED=1 MONOLITHIC=0
USE_XML=1 USE_OPENGL=1 USE_GDIPLUS=1 UNICODE=1 MSLU=1 HYBRID=1

cd %WXWIN%\contrib\build\gizmos
nmake -f makefile.vc OFFICIAL_BUILD=1 BUILD=release SHARED=1 MONOLITHIC=0
USE_XML=1 USE_OPENGL=1 USE_GDIPLUS=1 UNICODE=1 MSLU=1 HYBRID=1

cd %WXWIN%\wxPython
python setup.py build_ext --inplace UNICODE=1 FINAL=1 -D WXUSINGDLL
python setup.py install UNICODE=1 FINAL=1

cd %WXWIN%
}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/539#comment:10&gt;
GRASS GIS <http://grass.osgeo.org>

#539: Error on "Display Map" in wxpython
------------------------------+---------------------------------------------
  Reporter: cnielsen | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: closed
  Priority: major | Milestone: 6.5.0
Component: wxGUI | Version: svn-develbranch6
Resolution: fixed | Keywords:
  Platform: MSWindows Vista | Cpu: Unspecified
------------------------------+---------------------------------------------
Changes (by cnielsen):

  * status: new => closed
  * resolution: => fixed

Comment:

original error now fixed

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/539#comment:11&gt;
GRASS GIS <http://grass.osgeo.org>