Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#2213 closed defect (fixed)

Windows startup broken

Reported by: jbrauner Owned by: grass-dev@…
Priority: major Milestone: 7.0.0
Component: Startup Version: svn-trunk
Keywords: Cc: jbrauner
CPU: Unspecified Platform: MSWindows 7

Description

Hi GRASS developers,

I downloaded and installed the weekly snapshot today (built on the revision 59215) and was provided with the following error message during startup:

"ERROR: GRASS GIS seems to be already running. Exiting."

I digged a little bit and found that since the very recent 59210 revision, the following statement:

if 'GISBASE' in os.environ:

sys.exit(_("ERROR: GRASS GIS seems to be already running. Exiting."))

(see http://trac.osgeo.org/grass/browser/grass/trunk/lib/init/grass.py?rev=59210#L1227)

breaks the successful start under Windows (both winGRASS weekly build and osgeo4w).

Possible reason:

For the winGRASS install, the GISBASE env variable is set by the grass70svn.bat (which I think is created here: http://trac.osgeo.org/grass/browser/grass/trunk/mswindows/GRASS-Installer.nsi.tmpl) which sets this variable for Windows before calling the Python startup script. Thus, startup always has to fail. Commenting the if clause out in the Python script did the trick for a successful start (I believe the if clause was introduced for a reason though ;-)).

For the osgeo4w install, the GISBASE env variable is set by the env.bat (which I think is created here: http://trac.osgeo.org/grass/browser/grass/trunk/mswindows/osgeo4w/env.bat.tmpl) which sets this variable for Windows before calling the Python startup script. Thus, startup always has to fail. Commenting the if clause out in the Python script did the trick for a successful start (I believe the if clause was introduced for a reason though ;-)).

Please let me know if I can help any further.

Cheers and keep up the good work,

Johannes

Change History (5)

comment:1 Changed 7 years ago by jbrauner

Cc: jbrauner added

comment:2 in reply to:  description Changed 7 years ago by martinl

Replying to jbrauner:

"ERROR: GRASS GIS seems to be already running. Exiting."

I digged a little bit and found that since the very recent 59210 revision, the following statement:

if 'GISBASE' in os.environ:

sys.exit(_("ERROR: GRASS GIS seems to be already running. Exiting."))

(see http://trac.osgeo.org/grass/browser/grass/trunk/lib/init/grass.py?rev=59210#L1227)

you are right, I commented-out this part in r59220. The next winGRASS build should be fixed, sorry for inconvenience.

comment:3 in reply to:  description Changed 7 years ago by martinl

Replying to jbrauner:

clause out in the Python script did the trick for a successful > start (I believe the if clause was introduced for a reason though ;-)).

the reason was to avoid starting GRASS from already running session

$ grass70

grass70

Martin

comment:4 Changed 7 years ago by martinl

Resolution: fixed
Status: newclosed

comment:5 Changed 7 years ago by jbrauner

Wow, unbelievable. That was more than instant in the middle of the night (at least for me it's past midnight). Thanks a lot, Martin.

I'm thinking about how to avoid starting GRASS from an already running session for Windows (need some sleep before). You're probably quicker with a solution but if I come up with an idea, I'll let you know (not much of a Python guy myself though).

Certainly no inconvenience caused.

Johannes

Note: See TracTickets for help on using tickets.