Opened 10 years ago

Closed 10 years ago

Last modified 10 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 by jbrauner, 10 years ago

Cc: jbrauner added

in reply to:  description comment:2 by martinl, 10 years ago

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.

in reply to:  description comment:3 by martinl, 10 years ago

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 by martinl, 10 years ago

Resolution: fixed
Status: newclosed

comment:5 by jbrauner, 10 years ago

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.