[GRASS-dev] [grass-code I][544] Map Display crashes when zooming (too much) in!

I just tried this with cvs compiled from an update of this morning and had
no problems.

In normal mode, if you zoom to less than 1 raster cell, a TclTk message box
pops up saying you've exceeded the maximum zoom.

In explore mode, you can zoom to much less than 1 raster cell.

In neither case did I get a TclTk error like the one below.

I did wait until a map was completely displayed before trying to zoom
again.

I tried this on a Mac PPC G5, with OS X 10.4.11.

Has anyone else had this problem?

Michael

On 11/28/07 5:01 PM, "grass-dev@lists.osgeo.org" <grass-dev@lists.osgeo.org>
wrote:

code I item #544, was opened at 2007-11-29 00:01
Status: Open
Priority: 3
Submitted By: Nikos Alexandris (nikosa)
Assigned to: Nobody (None)
Summary: Map Display crashes when zooming (too much) in!
Issue type: other bug
Issue status: None
GRASS version: CVS HEAD
GRASS component: display
Operating system: Linux
Operating system version: Ubuntu 7.10
GRASS CVS checkout date, if applies (YYMMDD):

Initial Comment:
.The Display Crashes when zooming in too much in a specific point (in a raster
map) displayed in Map Display.

.First error message is: Error setting region: child process exited abnormally

.Second error message (after pressing ok): Error: can't read
"parts(projection)"...

can't read "parts(projection)": no such variable
can't read "parts(projection)": no such variable
    while executing
"regexp -nocase {^.* (\(.*\))} $parts(projection) trash end"
    (procedure "MapCanvas::runprograms" line 46)
    invoked from within
"MapCanvas::runprograms $mon [expr {$mymodified != 0}]"
    (procedure "MapCanvas::drawmap" line 38)
    invoked from within
"MapCanvas::drawmap $mon"
    (procedure "MapCanvas::display_server" line 9)
    invoked from within
"MapCanvas::display_server"
    ("after" script)
---

.Don't know if g.region -p is necessary to report... (just for any case):

GRASS 6.3.cvs (Peloponnese_HGRS87):~/> g.region -p
projection: 99 (Transverse Mercator)
zone: 0
datum: towgs84=-199.87,74.79,246.62
ellipsoid: grs80
north: 4255230
south: 3994272
west: 226090
east: 468372
nsres: 249.95977011
ewres: 250.03302374
rows: 1044
cols: 969
cells: 1011636
[Raster MASK present]

----------------------------------------------------------------------

You can respond by visiting:
Wald: Exiting with error

__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
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

Yes, I can confirm this error as well. The trick to getting it to show up is to zoom in until you get the 'Max zoom in reached' tcl dialog box, then immediately after you dismiss this window, click on the 'Display Active Layers' button on the Map Display window.

Using 6.3.cvs from today on Ubuntu 7.10.

~ Eric.

-----Original Message-----
From: grass-dev-bounces@lists.osgeo.org on behalf of Michael Barton
Sent: Thu 11/29/2007 1:15 PM
To: grass-dev@lists.osgeo.org
Subject: Re: [GRASS-dev] [grass-code I][544] Map Display crashes whenzooming (too much) in!

I just tried this with cvs compiled from an update of this morning and had
no problems.

In normal mode, if you zoom to less than 1 raster cell, a TclTk message box
pops up saying you've exceeded the maximum zoom.

In explore mode, you can zoom to much less than 1 raster cell.

In neither case did I get a TclTk error like the one below.

I did wait until a map was completely displayed before trying to zoom
again.

I tried this on a Mac PPC G5, with OS X 10.4.11.

Has anyone else had this problem?

Michael

On 11/28/07 5:01 PM, "grass-dev@lists.osgeo.org" <grass-dev@lists.osgeo.org>
wrote:

code I item #544, was opened at 2007-11-29 00:01
Status: Open
Priority: 3
Submitted By: Nikos Alexandris (nikosa)
Assigned to: Nobody (None)
Summary: Map Display crashes when zooming (too much) in!
Issue type: other bug
Issue status: None
GRASS version: CVS HEAD
GRASS component: display
Operating system: Linux
Operating system version: Ubuntu 7.10
GRASS CVS checkout date, if applies (YYMMDD):

Initial Comment:
.The Display Crashes when zooming in too much in a specific point (in a raster
map) displayed in Map Display.

.First error message is: Error setting region: child process exited abnormally

.Second error message (after pressing ok): Error: can't read
"parts(projection)"...

can't read "parts(projection)": no such variable
can't read "parts(projection)": no such variable
    while executing
"regexp -nocase {^.* (\(.*\))} $parts(projection) trash end"
    (procedure "MapCanvas::runprograms" line 46)
    invoked from within
"MapCanvas::runprograms $mon [expr {$mymodified != 0}]"
    (procedure "MapCanvas::drawmap" line 38)
    invoked from within
"MapCanvas::drawmap $mon"
    (procedure "MapCanvas::display_server" line 9)
    invoked from within
"MapCanvas::display_server"
    ("after" script)
---

.Don't know if g.region -p is necessary to report... (just for any case):

GRASS 6.3.cvs (Peloponnese_HGRS87):~/> g.region -p
projection: 99 (Transverse Mercator)
zone: 0
datum: towgs84=-199.87,74.79,246.62
ellipsoid: grs80
north: 4255230
south: 3994272
west: 226090
east: 468372
nsres: 249.95977011
ewres: 250.03302374
rows: 1044
cols: 969
cells: 1011636
[Raster MASK present]

----------------------------------------------------------------------

You can respond by visiting:
http://wald.intevation.org/tracker/?func=detail&atid=204&aid=544&group_id=21

__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Hi Michael and others.

To reproduce this problem more easily than with Spearfish dataset just
create new location with parameters like in initial bug report.
For some reason at some point variables $mapwd or $mapht get values
like "1.8912764e-10" or similar and then are not catched by $mapwd==0
comparison. I attached small quick hack around problem that limits
zoom-in to half of cell size (resolution). It fixes this problem but
may cause problems for users without sane resolution like after
creating new location from vector data source. Still requiring sane
resolution for location is not worse case scenario. Or should we limit
zoom-in till mapwd is smaller than 2?

Maris.

2007/11/29, Michael Barton <michael.barton@asu.edu>:

I just tried this with cvs compiled from an update of this morning and had
no problems.

In normal mode, if you zoom to less than 1 raster cell, a TclTk message box
pops up saying you've exceeded the maximum zoom.

In explore mode, you can zoom to much less than 1 raster cell.

In neither case did I get a TclTk error like the one below.

I did wait until a map was completely displayed before trying to zoom
again.

I tried this on a Mac PPC G5, with OS X 10.4.11.

Has anyone else had this problem?

Michael

On 11/28/07 5:01 PM, "grass-dev@lists.osgeo.org" <grass-dev@lists.osgeo.org>
wrote:

> code I item #544, was opened at 2007-11-29 00:01
> Status: Open
> Priority: 3
> Submitted By: Nikos Alexandris (nikosa)
> Assigned to: Nobody (None)
> Summary: Map Display crashes when zooming (too much) in!
> Issue type: other bug
> Issue status: None
> GRASS version: CVS HEAD
> GRASS component: display
> Operating system: Linux
> Operating system version: Ubuntu 7.10
> GRASS CVS checkout date, if applies (YYMMDD):
>
>
> Initial Comment:
> .The Display Crashes when zooming in too much in a specific point (in a raster
> map) displayed in Map Display.
>
> .First error message is: Error setting region: child process exited abnormally
>
> .Second error message (after pressing ok): Error: can't read
> "parts(projection)"...
>
> can't read "parts(projection)": no such variable
> can't read "parts(projection)": no such variable
> while executing
> "regexp -nocase {^.* (\(.*\))} $parts(projection) trash end"
> (procedure "MapCanvas::runprograms" line 46)
> invoked from within
> "MapCanvas::runprograms $mon [expr {$mymodified != 0}]"
> (procedure "MapCanvas::drawmap" line 38)
> invoked from within
> "MapCanvas::drawmap $mon"
> (procedure "MapCanvas::display_server" line 9)
> invoked from within
> "MapCanvas::display_server"
> ("after" script)
> ---
>
> .Don't know if g.region -p is necessary to report... (just for any case):
>
> GRASS 6.3.cvs (Peloponnese_HGRS87):~/> g.region -p
> projection: 99 (Transverse Mercator)
> zone: 0
> datum: towgs84=-199.87,74.79,246.62
> ellipsoid: grs80
> north: 4255230
> south: 3994272
> west: 226090
> east: 468372
> nsres: 249.95977011
> ewres: 250.03302374
> rows: 1044
> cols: 969
> cells: 1011636
> [Raster MASK present]
>
>
>
> ----------------------------------------------------------------------
>
> You can respond by visiting:
> http://wald.intevation.org/tracker/?func=detail&atid=204&aid=544&group_id=21
>

__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

What I was thinking of doing was simply having the GUI do a return to
previous zoom + display after showing the message about zooming in too far.

Michael

On 11/29/07 12:54 PM, "Maris Nartiss" <maris.gis@gmail.com> wrote:

Hi Michael and others.

To reproduce this problem more easily than with Spearfish dataset just
create new location with parameters like in initial bug report.
For some reason at some point variables $mapwd or $mapht get values
like "1.8912764e-10" or similar and then are not catched by $mapwd==0
comparison. I attached small quick hack around problem that limits
zoom-in to half of cell size (resolution). It fixes this problem but
may cause problems for users without sane resolution like after
creating new location from vector data source. Still requiring sane
resolution for location is not worse case scenario. Or should we limit
zoom-in till mapwd is smaller than 2?

Maris.

2007/11/29, Michael Barton <michael.barton@asu.edu>:

I just tried this with cvs compiled from an update of this morning and had
no problems.

In normal mode, if you zoom to less than 1 raster cell, a TclTk message box
pops up saying you've exceeded the maximum zoom.

In explore mode, you can zoom to much less than 1 raster cell.

In neither case did I get a TclTk error like the one below.

I did wait until a map was completely displayed before trying to zoom
again.

I tried this on a Mac PPC G5, with OS X 10.4.11.

Has anyone else had this problem?

Michael

On 11/28/07 5:01 PM, "grass-dev@lists.osgeo.org" <grass-dev@lists.osgeo.org>
wrote:

code I item #544, was opened at 2007-11-29 00:01
Status: Open
Priority: 3
Submitted By: Nikos Alexandris (nikosa)
Assigned to: Nobody (None)
Summary: Map Display crashes when zooming (too much) in!
Issue type: other bug
Issue status: None
GRASS version: CVS HEAD
GRASS component: display
Operating system: Linux
Operating system version: Ubuntu 7.10
GRASS CVS checkout date, if applies (YYMMDD):

Initial Comment:
.The Display Crashes when zooming in too much in a specific point (in a
raster
map) displayed in Map Display.

.First error message is: Error setting region: child process exited
abnormally

.Second error message (after pressing ok): Error: can't read
"parts(projection)"...

can't read "parts(projection)": no such variable
can't read "parts(projection)": no such variable
    while executing
"regexp -nocase {^.* (\(.*\))} $parts(projection) trash end"
    (procedure "MapCanvas::runprograms" line 46)
    invoked from within
"MapCanvas::runprograms $mon [expr {$mymodified != 0}]"
    (procedure "MapCanvas::drawmap" line 38)
    invoked from within
"MapCanvas::drawmap $mon"
    (procedure "MapCanvas::display_server" line 9)
    invoked from within
"MapCanvas::display_server"
    ("after" script)
---

.Don't know if g.region -p is necessary to report... (just for any case):

GRASS 6.3.cvs (Peloponnese_HGRS87):~/> g.region -p
projection: 99 (Transverse Mercator)
zone: 0
datum: towgs84=-199.87,74.79,246.62
ellipsoid: grs80
north: 4255230
south: 3994272
west: 226090
east: 468372
nsres: 249.95977011
ewres: 250.03302374
rows: 1044
cols: 969
cells: 1011636
[Raster MASK present]

----------------------------------------------------------------------

You can respond by visiting:
Wald: Exiting with error

__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
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@lists.osgeo.org
grass-dev Info Page

__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
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

> code I item #544, was opened at 2007-11-29 00:01
> Summary: Map Display crashes when zooming (too much) in!

Michael Barton wrote:

Has anyone else had this problem?

ISTR this same issue was near the first gis.m bug report we ever had, and the
first of the "child returned an error" series. There'll be a long lost thread
somewhere in the archives....

Hamish

      ____________________________________________________________________________________
Get easy, one-click access to your favorites.
Make Yahoo! your homepage.
http://www.yahoo.com/r/hs

I just committed a fix so that after displaying the message box informing
the user that the max zoom limit has been exceeded, the display rolls back
to the previous zoom.

Michael

On 11/29/07 1:50 PM, "Hamish" <hamish_nospam@yahoo.com> wrote:

code I item #544, was opened at 2007-11-29 00:01
Summary: Map Display crashes when zooming (too much) in!

Michael Barton wrote:

Has anyone else had this problem?

ISTR this same issue was near the first gis.m bug report we ever had, and the
first of the "child returned an error" series. There'll be a long lost thread
somewhere in the archives....

Hamish

______________________________________________________________________________
______
Get easy, one-click access to your favorites.
Make Yahoo! your homepage.
http://www.yahoo.com/r/hs

__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
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

After Michael's fix Nikos asked a question in the tracker.
Maybe someone would like to address it. Please read below.

Comment By: Nikos Alexandris (nikosa)
Date: 2007-11-30 01:50

Message:
I just tested and the "Max zoom in reached" message does the job :wink: -- Thank you!

Yet, I would like to share my skepsis about this:

a. "Maximum zoom-in reached." would be too long for a message (instead of "Max")?
b. Is it difficult to make it go back automatically to the last visible zoom-in status instead of having to do it manually?

Maciek

On 12/1/07 4:12 AM, "Maciej Sieczka" <tutey@o2.pl> wrote:

After Michael's fix Nikos asked a question in the tracker.
Maybe someone would like to address it. Please read below.

Comment By: Nikos Alexandris (nikosa)
Date: 2007-11-30 01:50

Message:
I just tested and the "Max zoom in reached" message does the job :wink: --
Thank you!

Yet, I would like to share my skepsis about this:

a. "Maximum zoom-in reached." would be too long for a message (instead of
"Max")?

I'm not quite clear here. Do you want to use the word "maximum" instead of
"max"?

b. Is it difficult to make it go back automatically to the last visible
zoom-in status instead of having to do it manually?

That's what it does on my system now. What does it do on your system?

Maciek

__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
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

I've changed the message box to say "Maximum zoom-in reached" and gotten rid of the redundant title that could not be read anyway.

Michael

On Dec 1, 2007, at 8:45 AM, Nikos Alexandris wrote:

On Sat, 2007-12-01 at 08:39 -0700, Michael Barton wrote:

On 12/1/07 4:12 AM, "Maciej Sieczka" <tutey@o2.pl> wrote:

After Michael's fix Nikos asked a question in the tracker.
Maybe someone would like to address it. Please read below.

Comment By: Nikos Alexandris (nikosa)
Date: 2007-11-30 01:50

Message:
I just tested and the "Max zoom in reached" message does the job :wink: --
Thank you!

Yet, I would like to share my skepsis about this:

a. "Maximum zoom-in reached." would be too long for a message (instead of
"Max")?

I'm not quite clear here. Do you want to use the word "maximum" instead of
"max"?

Yes.

b. Is it difficult to make it go back automatically to the last visible
zoom-in status instead of having to do it manually?

That's what it does on my system now. What does it do on your system?

After I press ok it doesn't reload to the previous status. I need to
either zoom-back or zoom to layer.

Maciek

__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
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

--
Nikos Alexandris
.
Department of Remote Sensing & Landscape Information Systems
Faculty of Forestry & Environmental Sciences, Albert-Ludwigs-University Freiburg
.
Tel. +49 (0) 761 203 3697 / Fax. +49 (0) 761 203 3701 / Skype: Nikos.Alexandris
.
Address: Tennenbacher str. 4, D-79106 Freiburg i. Br., Germany

____________________
C. Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

Phone: 480-965-6262
Fax: 480-965-7671
www: <www.public.asu.edu/~cmbarton>