[GRASS-dev] trying to test error trapping for invalid gisdbase, location, and mapset

William,

I’m trying to test error trapping code for the GRASS startup that will gracefully deal with invalid .grassrc6 settings for gisdbase, location, or mapset.

When I try to test this (i.e., with a bad setting), I get a shell error before I even hit the gis_set.tcl file.

ERROR: LOCATION << /Users/Shared/grassdata/nothing >> not available
/Users/Shared/grassdata/nothing/PERMANENT/.gislock: No such file or directory
ERROR: /Applications/Grass/GRASS-6.3.app/Contents/Resources/etc/lock:
cmbarton is currently running GRASS in selected mapset (file /Users/Shared/grassdata/nothing/PERMANENT/.gislock found). Concurrent use not allowed.
logout

I can find this the code for this in init.sh and am wondering if it is in the script that launches the Mac app? I need to disable it to test the TclTk (and wxPython) code. If not Mac specific, can someone tell me where this code is?

Rather than simply raising an error, which would be meaningless to someone who doesn’t know what a .grassrc6 file is, it would be better if an invalid setting branched the GRASS startup to the prompt that comes up when gisdbase, location, or mapset is not set—allowing a user to choose a valid value.

Michael


Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

On May 29, 2007, at 11:17 AM, Michael Barton wrote:

William,

I’m trying to test error trapping code for the GRASS startup that will gracefully deal with invalid .grassrc6 settings for gisdbase, location, or mapset.

When I try to test this (i.e., with a bad setting), I get a shell error before I even hit the gis_set.tcl file.

ERROR: LOCATION << /Users/Shared/grassdata/nothing >> not available
/Users/Shared/grassdata/nothing/PERMANENT/.gislock: No such file or directory
ERROR: /Applications/Grass/GRASS-6.3.app/Contents/Resources/etc/lock:
cmbarton is currently running GRASS in selected mapset (file /Users/Shared/grassdata/nothing/PERMANENT/.gislock found). Concurrent use not allowed.
logout

I can find this the code for this in init.sh and am wondering if it is in the script that launches the Mac app? I need to disable it to test the TclTk (and wxPython) code. If not Mac specific, can someone tell me where this code is?

lib/gis/location.c/G_location_path(void)

called from a couple places in libgis and g.mapsets, but I don't know how it fits into init.sh.

Rather than simply raising an error, which would be meaningless to someone who doesn’t know what a .grassrc6 file is, it would be better if an invalid setting branched the GRASS startup to the prompt that comes up when gisdbase, location, or mapset is not set—allowing a user to choose a valid value.

I'm not sure how it's broken. For me, an invalid mapset works as it should - it shows an error and brings up the select mapset (GUI or text) dialog. I tried it for when the whole database path is invalid, when the location is invalid, and when just the mapset is invalid. The only errors I get are "LOCATION << ... >> not available" or "MAPSET ... not found".

The only things that are run in the OSX startup (and for the .app startup only, not with a basic unix build) are a couple scripts to build the addon help index and menu files, and they don't need a GRASS session or run any GRASS commands.

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"History is an illusion caused by the passage of time, and time is an illusion caused by the passage of history."

- Hitchhiker's Guide to the Galaxy

Hi William,

I've always had a problem error message with an invalid database or
location, and not be shunted to the GUI (or text) entry for new values.

I tried to check this this morning by entering an invalid file name into the
gisdbase field in .grassrc6 and only got the error message I sent. Nothing
else.

Michael

On 5/29/07 10:16 AM, "William Kyngesburye" <woklist@kyngchaos.com> wrote:

lib/gis/location.c/G_location_path(void)

called from a couple places in libgis and g.mapsets, but I don't know
how it fits into init.sh.

Rather than simply raising an error, which would be meaningless to
someone who doesn¹t know what a .grassrc6 file is, it would be
better if an invalid setting branched the GRASS startup to the
prompt that comes up when gisdbase, location, or mapset is not set‹
allowing a user to choose a valid value.

I'm not sure how it's broken. For me, an invalid mapset works as it
should - it shows an error and brings up the select mapset (GUI or
text) dialog. I tried it for when the whole database path is
invalid, when the location is invalid, and when just the mapset is
invalid. The only errors I get are "LOCATION << ... >> not
available" or "MAPSET ... not found".

The only things that are run in the OSX startup (and for the .app
startup only, not with a basic unix build) are a couple scripts to
build the addon help index and menu files, and they don't need a
GRASS session or run any GRASS commands.

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

On May 29, 2007, at 12:26 PM, Michael Barton wrote:

Hi William,

I've always had a problem error message with an invalid database or
location, and not be shunted to the GUI (or text) entry for new values.

Always, as in forever and ever? Or since the .app was available? Or since some other change in GRASS?

I tried to check this this morning by entering an invalid file name into the
gisdbase field in .grassrc6 and only got the error message I sent. Nothing
else.

Fishing for ideas: are there old dot files in your home that might being getting in the way, like maybe old tcsh init files (.profile, .login, .tcshrc and others), or something in .grass.bashrc (maybe something you want set)? I've heard of bash (on OSX at least) reading tcsh init files.

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

First Pogril: Why is life like sticking your head in a bucket filled with hyena offal?
Second Pogril: I don't know. Why IS life like sticking your head in a bucket filled with hyena offal?
First Pogril: I don't know either. Wretched, isn't it?

-HitchHiker's Guide to the Galaxy

On 5/29/07 11:44 AM, "William Kyngesburye" <woklist@kyngchaos.com> wrote:

On May 29, 2007, at 12:26 PM, Michael Barton wrote:

Hi William,

I've always had a problem error message with an invalid database or
location, and not be shunted to the GUI (or text) entry for new
values.

Always, as in forever and ever? Or since the .app was available? Or
since some other change in GRASS?

Always as far as I remember. Change the name of your location or move it,
for example, and you get an error at startup. The only way to fix it is to
edit your .grassrc6

I tried to check this this morning by entering an invalid file name
into the
gisdbase field in .grassrc6 and only got the error message I sent.
Nothing
else.

Fishing for ideas: are there old dot files in your home that might
being getting in the way, like maybe old tcsh init files
(.profile, .login, .tcshrc and others), or something in .grass.bashrc
(maybe something you want set)? I've heard of bash (on OSX at least)
reading tcsh init files.

Maybe, but I've got the same result on different Mac's (PPC and Intel). My
Intel at least has never had an old version of the OS on it. I always
assumed that this was normal, and have been planning to add an error trap
into gis_set.tcl for a long time, but hadn't gotten around to it.

Note that we just had a report on the GRASS list of someone who had a
similar error on the Mac. Kind of strange.

What happens on Linux? Windows?

Michael

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

First Pogril: Why is life like sticking your head in a bucket filled
with hyena offal?
Second Pogril: I don't know. Why IS life like sticking your head in
a bucket filled with hyena offal?
First Pogril: I don't know either. Wretched, isn't it?

-HitchHiker's Guide to the Galaxy

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

On May 29, 2007, at 1:54 PM, Michael Barton wrote:

Always as far as I remember. Change the name of your location or move it,
for example, and you get an error at startup. The only way to fix it is to
edit your .grassrc6

Likewise here the other way - that is, as long as I can remember it's always given the error, then gone into the mapset selection anyways.

Though there is another problem I DO have - if the location or mapset is invalid, I can't create a new location by values in the GUI - clicking Define new location with projection values button in the GUI gives me (the good db name is 'grassdb'):

access: No such file or directory
ERROR: LOCATION << /Users/kyngchaos/Documents/gis/grassdbz/spearfish60 >>
        not available
     while executing

[previous error message repeated a few times]

"exec -- $env(GISBASE)/etc/grass-xterm-wrapper -name xterm-grass -e $env(GISBASE)/etc/grass-run.sh $env(GISBASE)/etc/set_data"
     invoked from within
".frame0.frameNMS.seventh.button invoke"
     ("uplevel" body line 1)
     invoked from within
"uplevel #0 [list $w invoke]"
     (procedure "tk::ButtonUp" line 22)
     invoked from within
"tk::ButtonUp .frame0.frameNMS.seventh.button"
     (command bound to event)

It doesn't even try to run grass-xterm-wrapper. Even if I correct the DB location in the GUI, I get this error. So it could be related to the problem you're having. It works normally in the text startup.

Maybe, but I've got the same result on different Mac's (PPC and Intel). My
Intel at least has never had an old version of the OS on it. I always
assumed that this was normal, and have been planning to add an error trap
into gis_set.tcl for a long time, but hadn't gotten around to it.

How about my binary? I recently added a 5/20 CVS build for download on my site.

Note that we just had a report on the GRASS list of someone who had a
similar error on the Mac. Kind of strange.

Yeah, saw it, figured that's why you started on the error trapping. It sounded like they were using the old unix build, not a .app build. The only difference is pre-init.sh - where the .app sets some GRASS env var defaults appropriate for the .app.

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

Theory of the Universe

There is a theory which states that if ever anyone discovers exactly what the universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarrely inexplicable. There is another theory which states that this has already happened.

-Hitchhiker's Guide to the Galaxy 2nd season intro

So it seems that you hit the same error that I do, but don't hit it until a
bit later in the process. That's also weird.

Michael

On 5/29/07 12:30 PM, "William Kyngesburye" <woklist@kyngchaos.com> wrote:

On May 29, 2007, at 1:54 PM, Michael Barton wrote:

Always as far as I remember. Change the name of your location or
move it,
for example, and you get an error at startup. The only way to fix
it is to
edit your .grassrc6

Likewise here the other way - that is, as long as I can remember it's
always given the error, then gone into the mapset selection anyways.

Though there is another problem I DO have - if the location or mapset
is invalid, I can't create a new location by values in the GUI -
clicking Define new location with projection values button in the GUI
gives me (the good db name is 'grassdb'):

access: No such file or directory
ERROR: LOCATION << /Users/kyngchaos/Documents/gis/grassdbz/
spearfish60 >>
        not available
     while executing

[previous error message repeated a few times]

"exec -- $env(GISBASE)/etc/grass-xterm-wrapper -name xterm-grass -e
$env(GISBASE)/etc/grass-run.sh $env(GISBASE)/etc/set_data"
     invoked from within
".frame0.frameNMS.seventh.button invoke"
     ("uplevel" body line 1)
     invoked from within
"uplevel #0 [list $w invoke]"
     (procedure "tk::ButtonUp" line 22)
     invoked from within
"tk::ButtonUp .frame0.frameNMS.seventh.button"
     (command bound to event)

It doesn't even try to run grass-xterm-wrapper. Even if I correct
the DB location in the GUI, I get this error. So it could be related
to the problem you're having. It works normally in the text startup.

Maybe, but I've got the same result on different Mac's (PPC and
Intel). My
Intel at least has never had an old version of the OS on it. I always
assumed that this was normal, and have been planning to add an
error trap
into gis_set.tcl for a long time, but hadn't gotten around to it.

How about my binary? I recently added a 5/20 CVS build for download
on my site.

Note that we just had a report on the GRASS list of someone who had a
similar error on the Mac. Kind of strange.

Yeah, saw it, figured that's why you started on the error trapping.
It sounded like they were using the old unix build, not a .app
build. The only difference is pre-init.sh - where the .app sets some
GRASS env var defaults appropriate for the .app.

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

Theory of the Universe

There is a theory which states that if ever anyone discovers exactly
what the universe is for and why it is here, it will instantly
disappear and be replaced by something even more bizarrely
inexplicable. There is another theory which states that this has
already happened.

-Hitchhiker's Guide to the Galaxy 2nd season intro

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

William,

Just saw this part of your email (It's been a busy day).

On 5/29/07 12:30 PM, "William Kyngesburye" <woklist@kyngchaos.com> wrote:

How about my binary? I recently added a 5/20 CVS build for download
on my site.

I can try it out and let you know.

Note that we just had a report on the GRASS list of someone who had a
similar error on the Mac. Kind of strange.

Yeah, saw it, figured that's why you started on the error trapping.
It sounded like they were using the old unix build, not a .app
build. The only difference is pre-init.sh - where the .app sets some
GRASS env var defaults appropriate for the .app.

Nope. I'm doing your standard app build (and like it a lot).

Michael

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

OK,

So here is further weirdness.

Michael

===========

I get an error message and no GUI for gisdbase selection on my old G4 in the
lab.

I get an error message and no GUI for gisdbase selection on my relatively
new Intel Mac laptop

I get an error message, but ALSO GET A GUI for gisdbase selection on my G5
desktop (ca. 2 years old). All are uptodate with software and running
current versions of GRASS 6.3.

Here is what I get on the G5--which is what everyone ought to get.

============

Set an invalid gisdbase in .grassrc6

Start with tcltk interface

Terminal:
ERROR: LOCATION << /Users/Shared/grassdata9/spearfish60_test >> not
       available

TclTk warning box:
"WARNING: Invalid Database
Warning Invalid database. Finding first valid directory in parent tree"

Click OK

TclTk warning box
"WARNING: invalid location
Warning: location <locname> at GISDBASE <gisdbase> is not a directory or
does not exist.

Click OK

Choose valid gisdbase, location, and mapset from TclTk GUI

Start GRASS OK.

=========

Start with wx (wxgrass) and there is a long terminal error, so this is not
being checked there.

Michael

On 5/29/07 12:30 PM, "William Kyngesburye" <woklist@kyngchaos.com> wrote:

On May 29, 2007, at 1:54 PM, Michael Barton wrote:

Always as far as I remember. Change the name of your location or
move it,
for example, and you get an error at startup. The only way to fix
it is to
edit your .grassrc6

Likewise here the other way - that is, as long as I can remember it's
always given the error, then gone into the mapset selection anyways.

Though there is another problem I DO have - if the location or mapset
is invalid, I can't create a new location by values in the GUI -
clicking Define new location with projection values button in the GUI
gives me (the good db name is 'grassdb'):

access: No such file or directory
ERROR: LOCATION << /Users/kyngchaos/Documents/gis/grassdbz/
spearfish60 >>
        not available
     while executing

[previous error message repeated a few times]

"exec -- $env(GISBASE)/etc/grass-xterm-wrapper -name xterm-grass -e
$env(GISBASE)/etc/grass-run.sh $env(GISBASE)/etc/set_data"
     invoked from within
".frame0.frameNMS.seventh.button invoke"
     ("uplevel" body line 1)
     invoked from within
"uplevel #0 [list $w invoke]"
     (procedure "tk::ButtonUp" line 22)
     invoked from within
"tk::ButtonUp .frame0.frameNMS.seventh.button"
     (command bound to event)

It doesn't even try to run grass-xterm-wrapper. Even if I correct
the DB location in the GUI, I get this error. So it could be related
to the problem you're having. It works normally in the text startup.

Maybe, but I've got the same result on different Mac's (PPC and
Intel). My
Intel at least has never had an old version of the OS on it. I always
assumed that this was normal, and have been planning to add an
error trap
into gis_set.tcl for a long time, but hadn't gotten around to it.

How about my binary? I recently added a 5/20 CVS build for download
on my site.

Note that we just had a report on the GRASS list of someone who had a
similar error on the Mac. Kind of strange.

Yeah, saw it, figured that's why you started on the error trapping.
It sounded like they were using the old unix build, not a .app
build. The only difference is pre-init.sh - where the .app sets some
GRASS env var defaults appropriate for the .app.

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

Theory of the Universe

There is a theory which states that if ever anyone discovers exactly
what the universe is for and why it is here, it will instantly
disappear and be replaced by something even more bizarrely
inexplicable. There is another theory which states that this has
already happened.

-Hitchhiker's Guide to the Galaxy 2nd season intro

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

William,

Here is the latest twist.

The error checking works fine on my build and on your binary, on my PPC G5.

It also works fine on your universal binary when run on my Intel PowerBook.

However, the Intel-only (not universal) app build that I've done on my
PowerBook, it does not work.

Michael

On 5/29/07 12:30 PM, "William Kyngesburye" <woklist@kyngchaos.com> wrote:

On May 29, 2007, at 1:54 PM, Michael Barton wrote:

Always as far as I remember. Change the name of your location or
move it,
for example, and you get an error at startup. The only way to fix
it is to
edit your .grassrc6

Likewise here the other way - that is, as long as I can remember it's
always given the error, then gone into the mapset selection anyways.

Though there is another problem I DO have - if the location or mapset
is invalid, I can't create a new location by values in the GUI -
clicking Define new location with projection values button in the GUI
gives me (the good db name is 'grassdb'):

access: No such file or directory
ERROR: LOCATION << /Users/kyngchaos/Documents/gis/grassdbz/
spearfish60 >>
        not available
     while executing

[previous error message repeated a few times]

"exec -- $env(GISBASE)/etc/grass-xterm-wrapper -name xterm-grass -e
$env(GISBASE)/etc/grass-run.sh $env(GISBASE)/etc/set_data"
     invoked from within
".frame0.frameNMS.seventh.button invoke"
     ("uplevel" body line 1)
     invoked from within
"uplevel #0 [list $w invoke]"
     (procedure "tk::ButtonUp" line 22)
     invoked from within
"tk::ButtonUp .frame0.frameNMS.seventh.button"
     (command bound to event)

It doesn't even try to run grass-xterm-wrapper. Even if I correct
the DB location in the GUI, I get this error. So it could be related
to the problem you're having. It works normally in the text startup.

Maybe, but I've got the same result on different Mac's (PPC and
Intel). My
Intel at least has never had an old version of the OS on it. I always
assumed that this was normal, and have been planning to add an
error trap
into gis_set.tcl for a long time, but hadn't gotten around to it.

How about my binary? I recently added a 5/20 CVS build for download
on my site.

Note that we just had a report on the GRASS list of someone who had a
similar error on the Mac. Kind of strange.

Yeah, saw it, figured that's why you started on the error trapping.
It sounded like they were using the old unix build, not a .app
build. The only difference is pre-init.sh - where the .app sets some
GRASS env var defaults appropriate for the .app.

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

Theory of the Universe

There is a theory which states that if ever anyone discovers exactly
what the universe is for and why it is here, it will instantly
disappear and be replaced by something even more bizarrely
inexplicable. There is another theory which states that this has
already happened.

-Hitchhiker's Guide to the Galaxy 2nd season intro

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

On May 29, 2007, at 6:26 PM, Michael Barton wrote:

I get an error message and no GUI for gisdbase selection on my old G4 in the
lab.

I get an error message and no GUI for gisdbase selection on my relatively
new Intel Mac laptop

I get an error message, but ALSO GET A GUI for gisdbase selection on my G5
desktop (ca. 2 years old). All are uptodate with software and running
current versions of GRASS 6.3.

Which version of OSX (for the G4 and G5)? All 10.4.9?

Here is what I get on the G5--which is what everyone ought to get.

============

Set an invalid gisdbase in .grassrc6

Start with tcltk interface

Terminal:
ERROR: LOCATION << /Users/Shared/grassdata9/spearfish60_test >> not
       available

TclTk warning box:
"WARNING: Invalid Database
Warning Invalid database. Finding first valid directory in parent tree"

Click OK

TclTk warning box
"WARNING: invalid location
Warning: location <locname> at GISDBASE <gisdbase> is not a directory or
does not exist.

Click OK

Choose valid gisdbase, location, and mapset from TclTk GUI

Start GRASS OK.

Yep, that's what I get.

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

First Pogril: Why is life like sticking your head in a bucket filled with hyena offal?
Second Pogril: I don't know. Why IS life like sticking your head in a bucket filled with hyena offal?
First Pogril: I don't know either. Wretched, isn't it?

-HitchHiker's Guide to the Galaxy

All the same at the most current 10.4.9

On 5/29/07 4:42 PM, "William Kyngesburye" <woklist@kyngchaos.com> wrote:

Which version of OSX (for the G4 and G5)? All 10.4.9?

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

On May 29, 2007, at 6:39 PM, Michael Barton wrote:

William,

Here is the latest twist.

The error checking works fine on my build and on your binary, on my PPC G5.

It also works fine on your universal binary when run on my Intel PowerBook.

However, the Intel-only (not universal) app build that I've done on my
PowerBook, it does not work.

An Intel-only build will not run on PPC OSX. Rosetta only works PPC- >Intel.

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"Time is an illusion - lunchtime doubly so."

- Ford Prefect

What I meant was that running the Intel-only build on my Intel is when I get
an error in the startup with an invalid gisdbase, location, or mapset, but
do NOT get a chance to set it (i.e., no GUI).

Running your universal build, I DO get a chance to correct an invalid
setting.

Michael

On 5/29/07 5:21 PM, "William Kyngesburye" <woklist@kyngchaos.com> wrote:

However, the Intel-only (not universal) app build that I've done on my
PowerBook, it does not work.

An Intel-only build will not run on PPC OSX. Rosetta only works PPC-

Intel.

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

With two days ago cvs universal installer (built with William's
instructions on iMac macintel) on iMac G5 ppc.
I got
access: No such file or directory
ERROR: LOCATION << //Users/Shared/grassdata/prueba_usuario >> not
available
GRASS GUI should be tcltk

But the gui is showing up, so I can choose the correct option.
If I recall right, this didn't happen before and the only way I was
able to start grass was changing the gui to text.
If I point to an inexistent gisdbase I got a warning on both the
terminal and the gui, but grass starts
ERROR: LOCATION << //Users/Shared/grassdata9/prueba_usuario_Gore >> not
       available
Starting GRASS ...
After accepting the warning it goes up to /Users/Shared
I will check the same in a macintel later.

OK,

So here is further weirdness.

Michael

===========

I get an error message and no GUI for gisdbase selection on my old

G4 in the

lab.

I get an error message and no GUI for gisdbase selection on my

relatively

new Intel Mac laptop

I get an error message, but ALSO GET A GUI for gisdbase selection on

my G5

desktop (ca. 2 years old). All are uptodate with software and running
current versions of GRASS 6.3.

Here is what I get on the G5--which is what everyone ought to get.

============

Set an invalid gisdbase in .grassrc6

Start with tcltk interface

Terminal:
ERROR: LOCATION << /Users/Shared/grassdata9/spearfish60_test >> not
       available

TclTk warning box:
"WARNING: Invalid Database
Warning Invalid database. Finding first valid directory in parent tree"

Click OK

TclTk warning box
"WARNING: invalid location
Warning: location <locname> at GISDBASE <gisdbase> is not a directory or
does not exist.

Click OK

Choose valid gisdbase, location, and mapset from TclTk GUI

Start GRASS OK.

=========

Start with wx (wxgrass) and there is a long terminal error, so this

is not

being checked there.

Michael

On 5/29/07 12:30 PM, "William Kyngesburye" <woklist@kyngchaos.com>

wrote:

> On May 29, 2007, at 1:54 PM, Michael Barton wrote:
>
>> Always as far as I remember. Change the name of your location or
>> move it,
>> for example, and you get an error at startup. The only way to fix
>> it is to
>> edit your .grassrc6
>>
> Likewise here the other way - that is, as long as I can remember it's
> always given the error, then gone into the mapset selection anyways.
>
> Though there is another problem I DO have - if the location or mapset
> is invalid, I can't create a new location by values in the GUI -
> clicking Define new location with projection values button in the GUI
> gives me (the good db name is 'grassdb'):
>
> access: No such file or directory
> ERROR: LOCATION << /Users/kyngchaos/Documents/gis/grassdbz/
> spearfish60 >>
> not available
> while executing
>
> [previous error message repeated a few times]
>
> "exec -- $env(GISBASE)/etc/grass-xterm-wrapper -name xterm-grass -e
> $env(GISBASE)/etc/grass-run.sh $env(GISBASE)/etc/set_data"
> invoked from within
> ".frame0.frameNMS.seventh.button invoke"
> ("uplevel" body line 1)
> invoked from within
> "uplevel #0 [list $w invoke]"
> (procedure "tk::ButtonUp" line 22)
> invoked from within
> "tk::ButtonUp .frame0.frameNMS.seventh.button"
> (command bound to event)
>
>
> It doesn't even try to run grass-xterm-wrapper. Even if I correct
> the DB location in the GUI, I get this error. So it could be related
> to the problem you're having. It works normally in the text startup.
>
>> Maybe, but I've got the same result on different Mac's (PPC and
>> Intel). My
>> Intel at least has never had an old version of the OS on it. I always
>> assumed that this was normal, and have been planning to add an
>> error trap
>> into gis_set.tcl for a long time, but hadn't gotten around to it.
>>
> How about my binary? I recently added a 5/20 CVS build for download
> on my site.
>
>> Note that we just had a report on the GRASS list of someone who had a
>> similar error on the Mac. Kind of strange.
>>
> Yeah, saw it, figured that's why you started on the error trapping.
> It sounded like they were using the old unix build, not a .app
> build. The only difference is pre-init.sh - where the .app sets some
> GRASS env var defaults appropriate for the .app.
>
> -----
> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
> http://www.kyngchaos.com/
>
> Theory of the Universe
>
> There is a theory which states that if ever anyone discovers exactly
> what the universe is for and why it is here, it will instantly
> disappear and be replaced by something even more bizarrely
> inexplicable. There is another theory which states that this has
> already happened.
>
> -Hitchhiker's Guide to the Galaxy 2nd season intro
>
>

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev

--
******************************************************
Dr. Agustín Diez Castillo
Departament de Prehistòria i Arqueologia
Universitat de València Phone: +34 963 86 42 42
Avda. Blasco Ibañez, 28 Fax: +34 963 86 42 34
València 46010
******************************************************

works fine for me on Debian/Linux.

* edit ~/.grassrc6
* change GISDBASE, LOCATION_NAME, or MAPSET to something which doesn't
exist.
* start grass.

$ grass63 -gui
Cleaning up temporary files.....
Starting GRASS ...
ERROR: MAPSET user3 not found

[GUI starts, pick something real, Enter GRASS, ...]

That error comes from G_gisinit() or G_mapset().

with a broken LOCATION_NAME:

$ grass63 -gui
Cleaning up temporary files.....
Starting GRASS ...
access: No such file or directory
ERROR: LOCATION << /home/hamish/grassdata/spearfish601 >> not available

[friendly tcl GUI window pops up saying the location couldn't be found,
try another]

that error is from G_location_path().

with a broken GISDBASE, same
  ERROR: LOCATION << /... >> not available
but now tcl GUI has two nice error popups, drops to parent dir.

Michael: does it work (ie not crash out) for you with "grass63 -text"?

maybe lib/init/lock.c should call
    G_set_program_name(argv[0]);
    G_no_gisinit();
or lib/init/set_data.c should call
    G_set_program_name(argv[0]);
??

as they use G_fatal_error() and things.

Hamish

My problem is that with some systems, the GUI doesn't pick it up. I'm not
sure how it does pick up the error and go to the message box (some other
kind soul wrote this). I'll dig into it. I wonder if I get a different kind
of error string to trigger things on my Powerbook and G5?

Michael

On 5/30/07 4:52 AM, "Hamish" <hamish_nospam@yahoo.com> wrote:

works fine for me on Debian/Linux.

* edit ~/.grassrc6
* change GISDBASE, LOCATION_NAME, or MAPSET to something which doesn't
exist.
* start grass.

$ grass63 -gui
Cleaning up temporary files.....
Starting GRASS ...
ERROR: MAPSET user3 not found

[GUI starts, pick something real, Enter GRASS, ...]

That error comes from G_gisinit() or G_mapset().

with a broken LOCATION_NAME:

$ grass63 -gui
Cleaning up temporary files.....
Starting GRASS ...
access: No such file or directory
ERROR: LOCATION << /home/hamish/grassdata/spearfish601 >> not available

[friendly tcl GUI window pops up saying the location couldn't be found,
try another]

that error is from G_location_path().

with a broken GISDBASE, same
  ERROR: LOCATION << /... >> not available
but now tcl GUI has two nice error popups, drops to parent dir.

Michael: does it work (ie not crash out) for you with "grass63 -text"?

maybe lib/init/lock.c should call
    G_set_program_name(argv[0]);
    G_no_gisinit();
or lib/init/set_data.c should call
    G_set_program_name(argv[0]);
??

as they use G_fatal_error() and things.

Hamish

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton