[GRASS-dev] [GRASS GIS] #1044: Crash on startup directly after install Grass-64 6.4 RC6 (Latest non-developmental build)

#1044: Crash on startup directly after install Grass-64 6.4 RC6 (Latest non-
developmental build)
------------------------+---------------------------------------------------
Reporter: jbdynamics | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Keywords: | Platform: MSWindows Vista
      Cpu: x86-64 |
------------------------+---------------------------------------------------
Debug information from console for GRASS 6.4.0 RC6 x64:

# Begin Shell output

Cleaning up temporary files ...
Starting GRASS ...
Traceback (most recent call last):
   File "e:/GRASS-64/etc/wxpython/gis_set.py", line 863, in <module>
     import gui_modules.gcmd as gcmd
   File
"c:\OSGeo4W\apps\grass\grass-6.4.0RC6\etc\wxpython\gui_modules\gcmd.py",
line 43, in <module>
ImportError: DLL load failed: The specified procedure could not be found.
Error in GUI startup. If necessary, please
report this error to the GRASS developers.
Switching to text mode now.

# end shell output

# begin Windows error pop-up window

GUI Window says: python.exe - Entry Point Not Found
"The procedure entry point
?PyWinObject_AsHANDLE@@YAHPAU_object@@PAPAX@Z could not be located in the
dynamic link library pywintypes25.dll."

# end pop-up window output

I do have Python 2.6 x86_64 installed on my Vista x64 Ultimate
workstation, I do not know if that makes a difference. I also have cygwin
(latest with almost every library in the Path environmental var), MinGW32
and 64 in the Path var. I do not know if that makes any difference, but I
wanted to give all the possible installs that could be interfering with
GRASS. Last note is that the TCL/TK GUI works great.

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

#1044: Crash on startup directly after install Grass-64 6.4 RC6 (Latest non-
developmental build)
------------------------+---------------------------------------------------
Reporter: jbdynamics | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.0
Component: Default | Version: 6.4.0 RCs
Keywords: wingrass | Platform: MSWindows Vista
      Cpu: x86-64 |
------------------------+---------------------------------------------------
Changes (by hellik):

  * keywords: => wingrass

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

#1044: Crash on startup directly after install Grass-64 6.4 RC6 (Latest non-
developmental build)
------------------------+---------------------------------------------------
Reporter: jbdynamics | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.0
Component: Default | Version: 6.4.0 RCs
Keywords: wingrass | Platform: MSWindows Vista
      Cpu: x86-64 |
------------------------+---------------------------------------------------

Comment(by hellik):

Replying to [ticket:1044 jbdynamics]:
> Debug information from console for GRASS 6.4.0 RC6 x64:
>
> # Begin Shell output
>
> Cleaning up temporary files ...
> Starting GRASS ...
> Traceback (most recent call last):
> File "e:/GRASS-64/etc/wxpython/gis_set.py", line 863, in <module>
> import gui_modules.gcmd as gcmd
> File
"c:\OSGeo4W\apps\grass\grass-6.4.0RC6\etc\wxpython\gui_modules\gcmd.py",
line 43, in <module>
> ImportError: DLL load failed: The specified procedure could not be
found.
> Error in GUI startup. If necessary, please
> report this error to the GRASS developers.
> Switching to text mode now.
>
> # end shell output
>
> # begin Windows error pop-up window
>
> GUI Window says: python.exe - Entry Point Not Found
> "The procedure entry point
> ?PyWinObject_AsHANDLE@@YAHPAU_object@@PAPAX@Z could not be located in
the dynamic link library pywintypes25.dll."
>
> # end pop-up window output
>
> I do have Python 2.6 x86_64 installed on my Vista x64 Ultimate
workstation, I do not know if that makes a difference. I also have cygwin
(latest with almost every library in the Path environmental var), MinGW32
and 64 in the Path var. I do not know if that makes any difference, but I
wanted to give all the possible installs that could be interfering with
GRASS. Last note is that the TCL/TK GUI works great.

closing the ticket?

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

#1044: Crash on startup directly after install Grass-64 6.4 RC6 (Latest non-
developmental build)
------------------------+---------------------------------------------------
Reporter: jbdynamics | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.0
Component: Python | Version: 6.4.0 RCs
Keywords: wingrass | Platform: MSWindows Vista
      Cpu: x86-64 |
------------------------+---------------------------------------------------
Changes (by hamish):

  * component: Default => Python

Comment:

Probably related to this issue highlighted by Glynn:
   http://article.gmane.org/gmane.comp.gis.grass.user/40977/

proposed patch:

{{{
Index: lib/init/init.bat

--- lib/init/init.bat (revision 48378)
+++ lib/init/init.bat (working copy)
@@ -131,9 +131,9 @@

  set
PYTHONPATH=%PYTHONPATH%;%WINGISBASE%\etc\python;%WINGISBASE%\etc\wxpython

-python "%GISBASE%/etc/wxpython/gis_set.py"
+"%GRASS_PYTHON%" "%GISBASE%/etc/wxpython/gis_set.py"
  if %errorlevel% == 2 goto exitinit
-python "%GISBASE%/etc/wxpython/wxgui.py"
+"%GRASS_PYTHON%" "%GISBASE%/etc/wxpython/wxgui.py"

  goto exitinit

}}}

Hamish

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

#1044: Crash on startup directly after install Grass-64 6.4 RC6 (Latest non-
developmental build)
------------------------+---------------------------------------------------
Reporter: jbdynamics | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.2
Component: Python | Version: 6.4.0 RCs
Keywords: wingrass | Platform: MSWindows Vista
      Cpu: x86-64 |
------------------------+---------------------------------------------------
Changes (by hamish):

  * milestone: 6.4.0 => 6.4.2

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

#1044: Crash on startup directly after install (wrong copy of python dll picked
up)
------------------------+---------------------------------------------------
Reporter: jbdynamics | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.2
Component: Python | Version: 6.4.0 RCs
Keywords: wingrass | Platform: MSWindows Vista
      Cpu: x86-64 |
------------------------+---------------------------------------------------

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

#1044: Crash on startup directly after install (wrong copy of python dll picked
up)
------------------------+---------------------------------------------------
Reporter: jbdynamics | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Python | Version: 6.4.0 RCs
Keywords: wingrass | Platform: MSWindows Vista
      Cpu: x86-64 |
------------------------+---------------------------------------------------
Changes (by neteler):

  * milestone: 6.4.2 => 6.4.3

Comment:

The proposed patch has not been applied yet, any reason for that?

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

#1044: Crash on startup directly after install (wrong copy of python dll picked
up)
------------------------+---------------------------------------------------
Reporter: jbdynamics | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Python | Version: 6.4.0 RCs
Keywords: wingrass | Platform: MSWindows Vista
      Cpu: x86-64 |
------------------------+---------------------------------------------------

Comment(by hellik):

Replying to [comment:6 neteler]:
> The proposed patch has not been applied yet, any reason for that?

tested here locally with standalone wingrass6.4.3svn-r52715, wxgui starts

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

#1044: Crash on startup directly after install (wrong copy of python dll picked
up)
------------------------+---------------------------------------------------
Reporter: jbdynamics | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Python | Version: 6.4.0 RCs
Keywords: wingrass | Platform: MSWindows Vista
      Cpu: x86-64 |
------------------------+---------------------------------------------------

Comment(by neteler):

Replying to [comment:7 hellik]:
> Replying to [comment:6 neteler]:
> > The proposed patch has not been applied yet, any reason for that?
>
> tested here locally with standalone wingrass6.4.3svn-r52715, wxgui
starts

Hamish: ping...

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

#1044: Crash on startup directly after install (wrong copy of python dll picked
up)
------------------------+---------------------------------------------------
Reporter: jbdynamics | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Python | Version: 6.4.0 RCs
Keywords: wingrass | Platform: MSWindows Vista
      Cpu: x86-64 |
------------------------+---------------------------------------------------

Comment(by hamish):

slightly more foolproof version of the patch applied in devbr6 as r55765.

I'm not sure if the default for %GRASS_PYTHON% should be "python.exe" or
if just "python" is ok. After that is known I think it's ok to backport to
relbr64.

Hamish

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

#1044: Crash on startup directly after install (wrong copy of python dll picked
up)
------------------------+---------------------------------------------------
Reporter: jbdynamics | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Python | Version: 6.4.0 RCs
Keywords: wingrass | Platform: MSWindows Vista
      Cpu: x86-64 |
------------------------+---------------------------------------------------

Comment(by neteler):

Replying to [comment:9 hamish]:
> I'm not sure if the default for %GRASS_PYTHON% should be "python.exe" or
if just "python" is ok. After that is known I think it's ok to backport to
relbr64.

Since it was "python" before it seems to be acceptable.

I have downloaded latest winGRASS-devbr (r55765) and it starts fine
including the GUI. Please backport.

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

#1044: Crash on startup directly after install (wrong copy of python dll picked
up)
------------------------------+---------------------------------------------
  Reporter: jbdynamics | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 6.4.3
Component: Python | Version: 6.4.0 RCs
Resolution: fixed | Keywords: wingrass
  Platform: MSWindows Vista | Cpu: x86-64
------------------------------+---------------------------------------------
Changes (by hamish):

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

Comment:

ok, thanks. backport done w/ r55776.

wrt testing, note to be careful that (IIRC) init.bat is not used in all
wingrass startup modes.

reopen if needed.

Hamish

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