[GRASS-dev] [GRASS GIS] #1675: Grass GIS wxPython startup error

#1675: Grass GIS wxPython startup error
---------------------+------------------------------------------------------
Reporter: grruddy | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: wxGUI | Version: 6.4.2
Keywords: | Platform: Linux
      Cpu: x86-64 |
---------------------+------------------------------------------------------
Grass was installed with the following options:

./configure --prefix=$INSTALL \
                 --enable-64bit --with-cxx \
                 --with-mysql \
                 --with-motif \
                 --with-cairo --with-freetype --with-readline \
                 --with-x --enable-shared \
                 --with-fftw-includes=$FFTW/include \
                 --with-fftw-libs=$FFTW/lib \
                 --with-mysql-libs=/usr/lib64/mysql \
                 --with-mysql-includes=/usr/include/mysql \
                 --with-proj-includes=$PROJ/include \
                 --with-proj-libs=$PROJ/lib \
                 --with-proj-share=$PROJ/share \
                 --with-gdal=$GDAL/bin/gdal-config \
                 --with-geos=$GEOS/bin/geos-config \
                 --with-python=/usr/bin/python-config \
                 --with-wxwidgets=$WXWIDGETS/bin/wx-config \
                 --with-cairo-includes=$CAIRO/include/cairo \
                 --with-cairo-libs="$CAIRO/lib $CAIRO/lib/cairo
$pixman_LIBS" \
                 --with-cairo-ldflags="-lcairo -lpixman-1" \
                 --with-motif-includes=$LESSTIF/include \
                 --with-motif-libs=$LESSTIF/lib \
                 --with-freetype-libs=/usr/lib64 \
                 --with-freetype-includes="/usr/include/freetype2"

This install uses GCC-4.7.0 and a system packaged version of Python 2.6.6.
Because Python is system packaged, the GDAL and wxPython support is
appended to the PYTHONPATH environment variable and is not installed
directly in the site-packages directory for python2.6. The installation
went through without any issues, but now the following error occurs upon
startup:

(attachment)

Text only mode works as expected, but the graphical issue needs to be
fixed. Any help would be appreciated. Any additional information can be
provided as need be. Also, it should be noted that this same installation
was successful on a SLES 10 system ( this system is RHEL 6 ). The main
difference being the GCC version and the fact that wxPython was installed
directly to the site-packages of the SLES 10 Python installation.

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

#1675: Grass GIS wxPython startup error
---------------------+------------------------------------------------------
Reporter: grruddy | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: wxGUI | Version: 6.4.2
Keywords: | Platform: Linux
      Cpu: x86-64 |
---------------------+------------------------------------------------------

Comment(by neteler):

Relevant part of error copied here:
{{{
Welcome to GRASS 6.4.2 (2012)
GRASS homepage: http://grass.osgeo.org/
This version running thru: TC Shell (/bin/tcsh)
Help is available with the command: g.manual -i
See the licence terms with: g.version -c
If required, restart the GUI with: g.gui wxpython
When ready to quit enter: exit

Mapset <PERMANENT> in Location <spearfish60>
GRASS 6.4.2 > Traceback (most recent call last):
   File
"/usr/local/intel64/nehalem/gcc/grass-6.4.2/grass-6.4.2/etc/wxpython/wxgui.py",
line 1721, in <module>
     sys.exit(main())
   File
"/usr/local/intel64/nehalem/gcc/grass-6.4.2/grass-6.4.2/etc/wxpython/wxgui.py",
line 1714, in main
     app = GMApp(workspaceFile)
   File
"/usr/local/intel64/nehalem/gcc/grass-6.4.2/grass-6.4.2/etc/wxpython/wxgui.py",
line 1605, in __init__
     wx.App.__init__(self, False)
   File "/usr/local/wx/wxWidgets-2.8.12.1/site-
packages/lib64/python/wx-2.8-gtk2-unicode/wx/_core.py", line 7981, in
__init__
     self._BootstrapApp()
   File "/usr/local/wx/wxWidgets-2.8.12.1/site-
packages/lib64/python/wx-2.8-gtk2-unicode/wx/_core.py", line 7555, in
_BootstrapApp
     return _core_.PyApp__BootstrapApp(*args, **kwargs)
   File
"/usr/local/intel64/nehalem/gcc/grass-6.4.2/grass-6.4.2/etc/wxpython/wxgui.py",
line 1657, in OnInit
     workspace = self.workspaceFile)
   File
"/usr/local/intel64/nehalem/gcc/grass-6.4.2/grass-6.4.2/etc/wxpython/wxgui.py",
line 128, in __init__
     self._createMenuBar()
   File
"/usr/local/intel64/nehalem/gcc/grass-6.4.2/grass-6.4.2/etc/wxpython/wxgui.py",
line 232, in _createMenuBar
     self.menubar = menu.Menu(parent = self, data = menudata.ManagerData())
   File
"/usr/local/intel64/nehalem/gcc/grass-6.4.2/grass-6.4.2/etc/wxpython/gui_modules/menudata.py",
line 202, in __init__
     MenuData.__init__(self, filename)
   File
"/usr/local/intel64/nehalem/gcc/grass-6.4.2/grass-6.4.2/etc/wxpython/gui_modules/menudata.py",
line 49, in __init__
     self.tree = etree.parse(filename)
   File "/usr/lib64/python2.6/xml/etree/ElementTree.py", line 862, in parse
     tree.parse(source, parser)
   File "/usr/lib64/python2.6/xml/etree/ElementTree.py", line 586, in parse
     parser.feed(data)
   File "/usr/lib64/python2.6/xml/etree/ElementTree.py", line 1245, in feed
     self._parser.Parse(data, 0)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc6 in position 1:
invalid continuation byte
*** glibc detected *** python: double free or corruption (out):
0x0000000001776a50 ***
======= Backtrace: =========
/lib64/libc.so.6[0x3a16275296]
/lib64/libexpat.so.1(XML_ParserFree+0x32)[0x3a19e04d12]
/usr/lib64/python2.6/site-
packages/_xmlplus/parsers/pyexpat.so(+0x791b)[0x7fc4084e491b]
/usr/lib64/libpython2.6.so.1.0[0x3a2887f3eb]
/usr/lib64/libpython2.6.so.1.0[0x3a28858074]
/usr/lib64/libpython2.6.so.1.0[0x3a2886ce42]
/usr/lib64/libpython2.6.so.1.0[0x3a2890435b]
/usr/lib64/libpython2.6.so.1.0[0x3a2890436b]
======= Memory map: ========
...
}}}

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

#1675: Grass GIS wxPython startup error
---------------------+------------------------------------------------------
Reporter: grruddy | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: wxGUI | Version: 6.4.2
Keywords: | Platform: Linux
      Cpu: x86-64 |
---------------------+------------------------------------------------------

Comment(by neteler):

Could you please retry with the current GRASS 6.4.svn?

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

#1675: Grass GIS wxPython startup error
---------------------+------------------------------------------------------
Reporter: grruddy | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: wxGUI | Version: 6.4.2
Keywords: | Platform: Linux
      Cpu: x86-64 |
---------------------+------------------------------------------------------

Comment(by hamish):

{{{
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc6 in position 1:
invalid continuation byte
*** glibc detected *** python: double free or corruption (out):
0x0000000001776a50 ***
}}}

In [comment:2 neteler] wrote:
> Could you please retry with the current GRASS 6.4.svn?

ping

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

#1675: Grass GIS wxPython startup error
--------------------------------------+-------------------------------------
Reporter: grruddy | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: wxGUI | Version: 6.4.2
Keywords: needsinfo, RHEL, startup | Platform: Linux
      Cpu: x86-64 |
--------------------------------------+-------------------------------------
Changes (by wenzeslaus):

  * keywords: => needsinfo, RHEL, startup

Comment:

Can somebody confirm that GRASS (any version) generally works on SLES 10
or RHEL 6 with Python 2.6 and GCC 4.7 or something similar?

If yes, please close the ticket and remove `needinfo` keyword.

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

#1675: Grass GIS wxPython startup error
----------------------+-----------------------------------------------------
  Reporter: grruddy | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 6.4.3
Component: wxGUI | Version: 6.4.2
Resolution: fixed | Keywords: RHEL, startup
  Platform: Linux | Cpu: x86-64
----------------------+-----------------------------------------------------
Changes (by neteler):

  * keywords: needsinfo, RHEL, startup => RHEL, startup
  * status: new => closed
  * resolution: => fixed

Comment:

Replying to [comment:4 wenzeslaus]:
> Can somebody confirm that GRASS (any version) generally works on SLES 10
or RHEL 6 with Python 2.6 and GCC 4.7 or something similar?

Yes, fully functional:

{{{
[neteler@giscluster ~]$ cat /etc/issue
Scientific Linux release 6.4 (Carbon)
Kernel \r on an \m

[neteler@giscluster ~]$ uname -a
Linux giscluster.intra 2.6.32-431.29.2.el6.x86_64 #1 SMP Tue Sep 9
13:45:55 CDT 2014 x86_64 x86_64 x86_64 GNU/Linux

[neteler@giscluster ~]$ gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
...
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC)

[neteler@giscluster ~]$ python --version
Python 2.6.6
}}}

> If yes, please close the ticket and remove `needinfo` keyword.

Closing,

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