Ticket #539 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Error on "Display Map" in wxpython

Reported by: cnielsen Owned by: grass-dev@…
Priority: major Milestone: 6.5.0
Component: wxGUI Version: svn-develbranch6
Keywords: Cc: jef@…
Platform: MSWindows Vista CPU: Unspecified

Description

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.

Attachments

wxPython.diff.gz Download (50.8 KB) - added by jef 3 years ago.

Change History

  Changed 3 years ago by cnielsen

As point of reference, 6.4.0RC3 worked fine.

  Changed 3 years ago by cnielsen

Same error occurs on trunk

  Changed 3 years ago by hamish

  • milestone changed from 6.4.0 to 6.5.0

  Changed 3 years ago 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?

  Changed 3 years ago by cnielsen

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

  Changed 3 years ago 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.

follow-up: ↓ 8   Changed 3 years ago by jef

in reply to: ↑ 7 ; follow-up: ↓ 9   Changed 3 years ago by cnielsen

  • cc jef@… added

Replying to 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.

in reply to: ↑ 8 ; follow-up: ↓ 10   Changed 3 years ago by jef

Replying to cnielsen:

Replying to 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.

in reply to: ↑ 9   Changed 3 years ago 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%

Changed 3 years ago by jef

  Changed 3 years ago by cnielsen

  • status changed from new to closed
  • resolution set to fixed

original error now fixed

Note: See TracTickets for help on using tickets.