Opened 14 years ago

Closed 13 years ago

Last modified 10 years ago

#1262 closed defect (fixed)

r.proj broken in all dev versions

Reported by: cmbarton Owned by: grass-dev@…
Priority: critical Milestone: 6.4.1
Component: Raster Version: unspecified
Keywords: r.proj, reprojection Cc:
CPU: OSX/Intel Platform: MacOSX

Description

I just tried to reproject a raster from a UTM location into a latlon location. After a silent failure in the GUI, I made a vector area in the UTM location that matched the raster extents and reprojected it (v.proj) into the latlon location. This worked. Then I set the region to match the vector extents and tried to reproject the raster. I set the resolution to match the source raster that I was trying to reproject. r.proj fails immediately with the following seg fault error:

GRASS 7.0.svn (polengrass13):~ > r.proj input=h92_N-33-131-D location=PolenUTM mapset=PERMANENT output=h92 resolution=0.000039682539683
Input Projection Parameters:  +proj=tmerc +lat_0=0 +lon_0=19 +k=0.9993 +x_0=500000 +y_0=-5300000 +no_defs +a=6378137 +rf=298.257222101 +towgs84=0.000,0.000,0.000
Input Unit Factor: 1
Output Projection Parameters:  +proj=longlat +a=6378137 +rf=298.257223563 +no_defs
Output Unit Factor: 1
Segmentation fault

I have not yet tried this in other dev versions, but I guess I'd better do so.

Michael

Change History (35)

comment:1 by cmbarton, 14 years ago

Same thing happens in GRASS 6.4.1. It also doesn't matter if I set the resolution or not.

source location projection information (not a UTM, but a mercator):

zone: 0 datum: etrs89 ellipsoid: grs80 north: 516344.80163701 south: 497432.30163701 west: 380800.49568881 east: 398208.49568881 nsres: 4.25 ewres: 4.25 rows: 4450 cols: 4096 cells: 1822720

target location projection information:

projection: 3 (Latitude-Longitude) zone: 0 datum: unknown (default: WGS84) ellipsoid: wgs84 north: 52:30:12N south: 52:19:48N west: 17:14:36E east: 17:30:21E nsres: 0:00:03 ewres: 0:00:03 rows: 208 cols: 315 cells: 65520

comment:2 by cmbarton, 14 years ago

Milestone: 7.0.06.4.1
Priority: majorblocker
Summary: r.proj failing in GRASS 7r.proj broken in all dev versions

I've tested this and on the Mac at least r.proj is broken in all development versions: 7.0, 6.5, and 6.4.1. Here is the result from testing it on the North Carolina demo data set, trying to reproject from State Plane into Latlon (same thing happens going the other way).

There is a segmentation fault and no map is reprojected.

r.proj input=aspect location=nc_spm_07 mapset=PERMANENT
Input Projection Parameters:  +proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +no_defs +a=6378137 +rf=298.257222101 +towgs84=0.000,0.000,0.000
Input Unit Factor: 1
Output Projection Parameters:  +proj=longlat +a=6378137 +rf=298.257223563 +no_defs
Output Unit Factor: 1
Segmentation fault

Michael

in reply to:  2 comment:3 by mlennert, 14 years ago

Replying to cmbarton:

I've tested this and on the Mac at least r.proj is broken in all development versions: 7.0, 6.5, and 6.4.1. Here is the result from testing it on the North Carolina demo data set, trying to reproject from State Plane into Latlon (same thing happens going the other way).

There is a segmentation fault and no map is reprojected.

r.proj input=aspect location=nc_spm_07 mapset=PERMANENT
Input Projection Parameters:  +proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +no_defs +a=6378137 +rf=298.257222101 +towgs84=0.000,0.000,0.000
Input Unit Factor: 1
Output Projection Parameters:  +proj=longlat +a=6378137 +rf=298.257223563 +no_defs
Output Unit Factor: 1
Segmentation fault

I've just tried to reproduce on Debian GNU/Linux using fairly recent grass7 and grass65, but I don't get any segmentation fault and reprojection works well.

Moritz

comment:4 by martinl, 14 years ago

Keywords: r.proj added

in reply to:  2 ; comment:5 by neteler, 14 years ago

Replying to cmbarton:

There is a segmentation fault and no map is reprojected.

r.proj input=aspect location=nc_spm_07 mapset=PERMANENT
Input Projection Parameters:  +proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +no_defs +a=6378137 +rf=298.257222101 +towgs84=0.000,0.000,0.000
Input Unit Factor: 1
Output Projection Parameters:  +proj=longlat +a=6378137 +rf=298.257223563 +no_defs
Output Unit Factor: 1
Segmentation fault

Michael, please use a debugger and add the backtrace to the ticket.

in reply to:  5 comment:6 by martinl, 14 years ago

Replying to neteler:

Michael, please use a debugger and add the backtrace to the ticket.

I can confirm that it's working on Linux. Some debug info is needed.

comment:7 by cmbarton, 14 years ago

Here is the gdb results for r.proj

GRASS 6.4.1svn (nc_ll):~ > gdb `which r.proj`
GNU gdb 6.3.50-20050815 (Apple version gdb-1510) (Wed Sep 22 02:45:02 UTC 2010)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ......
warning: Could not find object file "/Users/Shared/src/gdal/gdal-1.7.1/frmts/o/.libs/wktrasterdataset.o" - no debug information available for "wktrasterdataset.cpp".


warning: Could not find object file "/Users/Shared/src/gdal/gdal-1.7.1/frmts/o/.libs/wktrasterrasterband.o" - no debug information available for "wktrasterrasterband.cpp".


warning: Could not find object file "/Users/Shared/src/gdal/gdal-1.7.1/frmts/o/.libs/wktrasterwrapper.o" - no debug information available for "wktrasterwrapper.cpp".

.. done

(gdb) run input=aspect location=nc_spm_07 mapset=PERMANENT
Starting program: /Users/Shared/grass_dev/grass64_rb/macosx/dist/GRASS-6.4.app/Contents/MacOS/bin/r.proj input=aspect location=nc_spm_07 mapset=PERMANENT
Reading symbols for shared libraries .+++++++..................................................................................................... done
Input Projection Parameters:  +proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +no_defs +a=6378137 +rf=298.257222101 +towgs84=0.000,0.000,0.000
Input Unit Factor: 1
Output Projection Parameters:  +proj=longlat +a=6378137 +rf=298.257223563 +no_defs
Output Unit Factor: 1

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
0x00007fff80f94f2f in __vfprintf ()
(gdb) bt full
#0  0x00007fff80f94f2f in __vfprintf ()
No symbol table info available.
#1  0x00007fff80fc9b17 in vsnprintf ()
No symbol table info available.
#2  0x00007fff8100a4da in __vsprintf_chk ()
No symbol table info available.
#3  0x0000000100020f7d in print_error [inlined] () at /Users/Shared/grass_dev/grass64_rb/lib/gis/error.c:61
	buffer = "\020\035?\001\001\000\000\000@? p?\000\000?¿_?\000\000&\022???\000\000\000\000\000\000l??\000\000\000\000\000\000\000?¿_?\000\000@u???\000\000\000Ŀ_?\000\000\000Ŀ_?\000\000\000Ŀ_?\000\000\000Ŀ_?\000\000?Ŀ_?\000\000@? p?\000\000?Ŀ_?\000\000?U\037p?\000\000?Ŀ_?\000\000h?\003\000\001\000\000\000?$?HZ\f?????=\032??ā???\000\000\000\000\000\000\000\000??\bN???,??0j\037p?\000\000??\036O??P?"...
#4  0x0000000100020f7d in vfprint_error (type=0, template=<value temporarily unavailable, due to optimizations>, ap=<value temporarily unavailable, due to optimizations>) at error.c:64
	format = 1606392479
	type = Cannot access memory at address 0x0

(gdb) l
67	    {p_nearest, "nearest", "nearest neighbor"},
68	    {p_bilinear, "bilinear", "bilinear"},
69	    {p_cubic, "cubic", "cubic convolution"},
70	    {NULL, NULL, NULL}
71	};
72	
73	static char *make_ipol_list(void);
74	
75	int main(int argc, char **argv)
76	{
(gdb) frame 2
#2  0x00007fff8100a4da in __vsprintf_chk ()
(gdb) l
77	    char *mapname,		/* ptr to name of output layer  */
78	     *setname,			/* ptr to name of input mapset  */
79	     *ipolname;			/* name of interpolation method */
80	
81	    int fdi,			/* input map file descriptor    */
82	      fdo,			/* output map file descriptor   */
83	      method,			/* position of method in table  */
84	      permissions,		/* mapset permissions           */
85	      cell_type,		/* output celltype              */
86	      cell_size,		/* size of a cell in bytes      */
(gdb) 

comment:8 by cmbarton, 14 years ago

Note that I am running this on the same system where I compiled it with no errors, using William Kyngesburye's Mac frameworks.

Michael

in reply to:  7 comment:9 by martinl, 14 years ago

Replying to cmbarton:

> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
> 0x00007fff80f94f2f in __vfprintf ()
> (gdb) bt full
> #0  0x00007fff80f94f2f in __vfprintf ()
> No symbol table info available.
> #1  0x00007fff80fc9b17 in vsnprintf ()
> No symbol table info available.
> #2  0x00007fff8100a4da in __vsprintf_chk ()
> No symbol table info available.
> #3  0x0000000100020f7d in print_error [inlined] () at /Users/Shared/grass_dev/grass64_rb/lib/gis/error.c:61
> 	buffer = "\020\035?\001\001\000\000\000@? p?\000\000?¿_?\000\000&\022???\000\000\000\000\000\000l??\000\000\000\000\000\000\000?¿_?\000\000@u???\000\000\000Ŀ_?\000\000\000Ŀ_?\000\000\000Ŀ_?\000\000\000Ŀ_?\000\000?Ŀ_?\000\000@? p?\000\000?Ŀ_?\000\000?U\037p?\000\000?Ŀ_?\000\000h?\003\000\001\000\000\000?$?HZ\f?????=\032??ā???\000\000\000\000\000\000\000\000??\bN???,??0j\037p?\000\000??\036O??P?"...
> #4  0x0000000100020f7d in vfprint_error (type=0, template=<value temporarily unavailable, due to optimizations>, ap=<value temporarily unavailable, due to optimizations>) at error.c:64
> 	format = 1606392479
> 	type = Cannot access memory at address 0x0

Any idea? This bug is marked as a blocker for 6.4.1...

comment:10 by cmbarton, 14 years ago

All I know is that this is relatively new, affects all dev versions, and shows up on other computers beyond mine. It may not affect Linux versions. I don't know about Windows. r.proj is a key, core module. I don't think we should release a new version of GRASS where this is non-functional. I'm afraid that I don't know what the problem is. I'd hoped that the debug code would help someone with with knowledge of C. I'm happy to test potential fixes.

Michael

comment:11 by marisn, 14 years ago

If backtraces involve suspicious memory addresses (0x0 etc.), it's necessary to run program under valrgind to look for possible memory corruption or pointer abuse.

in reply to:  11 ; comment:12 by mmetz, 14 years ago

Replying to marisn:

If backtraces involve suspicious memory addresses (0x0 etc.), it's necessary to run program under valrgind to look for possible memory corruption or pointer abuse.

Good hint. The segfault happened when printing a message, also on Windows, not on Linux.

Should be fixed in r45195, r45196, r45197 (6.4, 6.5, 7.0).

Markus M

in reply to:  12 comment:13 by cmbarton, 14 years ago

Replying to mmetz:

Replying to marisn:

If backtraces involve suspicious memory addresses (0x0 etc.), it's necessary to run program under valrgind to look for possible memory corruption or pointer abuse.

Good hint. The segfault happened when printing a message, also on Windows, not on Linux.

Should be fixed in r45195, r45196, r45197 (6.4, 6.5, 7.0).

Markus M

Thanks much. I'll test in the next day or so.

Michael

comment:14 by cmbarton, 14 years ago

I just did an updated from the svn trunk (after a make distclean). This has changed the results and error, but has not corrected the problem. Just to be sure that there is nothing weird with the map, here is what I did. I opened the NC_spm_07 dataset and set the region to match the elev_state_500m dem. Then I tried to reproject into the state plane region the 1 arc second dem from the nc_ll location. I set debug=5 and here is the result.

GRASS 7.0.svn (nc_spm_07):~ > g.gisenv set="DEBUG=5"
GRASS 7.0.svn (nc_spm_07):~ > r.proj input=elev_ned_1arcsec location=nc_ll mapset=PERMANENT output=elev_ned_1arcsec
D1/5: G_find_raster(): name=elev_ned_1arcsec mapset=user1
D2/5: G__read_Cell_head
D2/5: G__read_Cell_head_array
D3/5: region item: proj:       99
D3/5: region item: zone:       0
D3/5: region item: north:      318500
D3/5: region item: south:      -16000
D3/5: region item: east:       963000
D3/5: region item: west:       124000
D3/5: region item: cols:       1678
D3/5: region item: rows:       669
D3/5: region item: e-w resol:  500
D3/5: region item: n-s resol:  500
D3/5: region item: top:        1
D3/5: region item: bottom:     0
D3/5: region item: cols3:      1678
D3/5: region item: rows3:      669
D3/5: region item: depths:     1
D3/5: region item: e-w resol3: 500
D3/5: region item: n-s resol3: 500
D3/5: region item: t-b resol:  1
D1/5: G_find_raster(): name=elev_ned_1arcsec mapset=PERMANENT
D1/5: G_find_raster2(): name=elev_ned_1arcsec mapset=PERMANENT
D1/5: G_find_raster(): name=elev_ned_1arcsec mapset=PERMANENT
D1/5: G_find_raster2(): name=elev_ned_1arcsec mapset=PERMANENT
D1/5: G_find_raster2(): name=elev_ned_1arcsec mapset=PERMANENT
D5/5: color buf = [0% yellow]
D5/5: color buf = [20% green]
D5/5: color buf = [40% cyan]
D5/5: color buf = [60% blue]
D5/5: color buf = [80% magenta]
D5/5: color buf = [100% red]
Input Projection Parameters:  +proj=longlat +a=6378137 +rf=298.257223563 +no_defs
Input Unit Factor: 1
Output Projection Parameters:  +proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +no_defs +a=6378137 +rf=298.257222101 +towgs84=0.000,0.000,0.000
Output Unit Factor: 1
D2/5: G__read_Cell_head
D2/5: G__read_Cell_head_array
D3/5: region item: proj:       3
D3/5: region item: zone:       0
D3/5: region item: north:      35:54:41.000547N
D3/5: region item: south:      35:35:17.001098N
D3/5: region item: east:       78:27:08.000616W
D3/5: region item: west:       78:49:17.999987W
D3/5: region item: cols:       1330
D3/5: region item: rows:       1164
D3/5: region item: e-w resol:  0:00:01
D3/5: region item: n-s resol:  0:00:01
D3/5: region item: format:     -1
D3/5: region item: compressed: 1
D3/5: G_adjust_Cell_head: epsilon_ns: 8.59107e-07, epsilon_ew: 1e-06
D3/5: G_adjust_Cell_head: epsilon_ns: 8.59107e-07, epsilon_ew: 1e-06
D1/5: G_find_raster(): name=MASK mapset=user1
D3/5: Top: xmin: -78.452221; xmax: -78.821668; ymin: 35.911390; ymax: 35.588055
D3/5: Right: xmin: -78.452221; xmax: -78.821668; ymin: 35.911390; ymax: 35.588055
D3/5: Bottom: xmin: -78.452221; xmax: -78.821668; ymin: 35.911390; ymax: 35.588055
D3/5: Left: xmin: -78.452221; xmax: -78.821668; ymin: 35.911390; ymax: 35.588055
D3/5: Extra check: xmin: -78.821528; xmax: -78.452361; ymin: 35.588195; ymax: 35.911250
D3/5: Final check: xmin: -78.821667; xmax: -78.452222; ymin: 35.588056; ymax: 35.911389
D3/5: G_adjust_Cell_head: epsilon_ns: 8.59107e-07, epsilon_ew: 1e-06
D1/5: G_find_raster(): name=MASK mapset=user1
D3/5: Top: xmin: 625709.948811; xmax: 659030.331786; ymin: 239768.184363; ymax: 239890.045778
D3/5: Right: xmin: 625709.948811; xmax: 659228.054367; ymin: 204049.351740; ymax: 239890.045778
D3/5: Bottom: xmin: 625709.948811; xmax: 659228.054367; ymin: 203927.002865; ymax: 239890.045778
D3/5: Left: xmin: 625709.948811; xmax: 659228.054367; ymin: 203927.002865; ymax: 239890.045778
D3/5: Extra check: xmin: 625709.948811; xmax: 659228.054367; ymin: 203927.002865; ymax: 239890.045778
D3/5: Final check: xmin: 625500.000000; xmax: 659500.000000; ymin: 203500.000000; ymax: 240000.000000
Segmentation fault 

I can run a shell debugger on this again if needed.

Michael

in reply to:  14 ; comment:15 by marisn, 14 years ago

Replying to cmbarton:

I can run a shell debugger on this again if needed.

tl;dr valgrind!

Works just fine on my AMD64 Linux.

in reply to:  15 ; comment:17 by cmbarton, 14 years ago

Replying to marisn:

Replying to cmbarton:

I can run a shell debugger on this again if needed.

tl;dr valgrind!

Are these shell commands? The don't work as typed in my terminal.

Works just fine on my AMD64 Linux.

We know that it works on Linux. It is broken for Mac and Windows.

comment:18 by cmbarton, 14 years ago

Looks like valgrind does not come on my Mac by default. I'll have to find instructions and time to compile this. If anyone using a Mac already has it, it might be faster if they tried to run this. I can post a GRASS binary to try.

Michael

comment:19 by neteler, 14 years ago

Here are instructions to compile it which may be helpful: http://stackoverflow.com/questions/2285964/how-can-i-compile-valgrind-on-snow-leopard

comment:20 by kyngchaos, 14 years ago

I just tried it this morning. They only added support for 64bit OS X last October in valgrind 3.6. But it bombs for me. Maybe it's my core i5 processor which is new in Macs, though has been around since 2009, so not fully tested.

That stackoverflow thread is a bit old, referring to v3.5. For 3.6 it's a simple configure/make/install. Or should be. No patches.

comment:21 by cmbarton, 14 years ago

William,

Does this mean valgrind does not work on new Macs? I have a pretty new i5 Mac with osx 10.6.6.

Michael

comment:22 by kyngchaos, 14 years ago

I'm only guessing at the i5 connection. I have a core 2 duo Mini, but no dev tools to compile it there (and no desire to install them). I think valgrind is optimized per processor during compilation, so copying it there probably won't work (I could be wrong). I could try later tonight. I can also try SVN valgrind later to see if it works.

in reply to:  17 comment:23 by hellik, 14 years ago

Replying to cmbarton:

We know that it works on Linux. It is broken for Mac and Windows.

I've tried it with the windows-nightly-build WinGRASS-6.4.SVN-r45209-1-Setup.exe from today

source: +proj=tmerc target: +proj=longlat

r.proj works.

Helmut

comment:24 by cmbarton, 14 years ago

Thanks. I'll need to try 6.4.1 for Mac. I only tried trunk.

Michael

comment:25 by cmbarton, 14 years ago

r.proj now works fine in 6.4.1 svn updated an hour ago.

I'll test 6.5 and retest 7.0

Michael

comment:26 by cmbarton, 14 years ago

Priority: blockercritical

This now works on 6.4.1 and 6.5, but is still broken on 7.0 (trunk svn updated a couple hours ago). I'm changing priority from blocker to critical because of the report that it now works on Windows for 6.4.1.

It still is very important to fix for 7.0. Since it is broken on the Mac, I'm betting it's still broken for Windows in 7.0 too, but this needs testing.

Michael

in reply to:  26 comment:27 by hellik, 14 years ago

Replying to cmbarton:

It still is very important to fix for 7.0. Since it is broken on the Mac, I'm betting it's still broken for Windows in 7.0 too, but this needs testing.

tested with WinGRASS-7.0.SVN-r45224-1-Setup.exe (nightly build of today).

again with source: +proj=tmerc target: +proj=longlat

it's very interesting, something is crashing during reprojecting, but the raster itself is reprojected.

r.proj input=DemEuropeFPp100nn location=ak_noe3 mapset=data output=test3debug   
D1/3: G_find_raster(): name=test3debug mapset=user1
D2/3: G__read_Cell_head
D2/3: G__read_Cell_head_array
D3/3: region item: proj:       3
D3/3: region item: zone:       0
D3/3: region item: north:      60N
D3/3: region item: south:      30N
D3/3: region item: east:       30E
D3/3: region item: west:       0
D3/3: region item: cols:       3600
D3/3: region item: rows:       3600
D3/3: region item: e-w resol:  0:00:30
D3/3: region item: n-s resol:  0:00:30
D3/3: region item: top:        1
D3/3: region item: bottom:     0
D3/3: region item: cols3:      3600
D3/3: region item: rows3:      3600
D3/3: region item: depths:     1
D3/3: region item: e-w resol3: 0:00:30
D3/3: region item: n-s resol3: 0:00:30
D3/3: region item: t-b resol:  1
D3/3: G_adjust_Cell_head: epsilon_ns: 2.77778e-007,
epsilon_ew: 1e-006
D1/3: G_find_raster(): name=DemEuropeFPp100nn mapset=data
D1/3: G_find_raster2(): name=DemEuropeFPp100nn mapset=data
D1/3: G_find_raster(): name=DemEuropeFPp100nn mapset=data
D3/3: adding rule 79=79.00 0 191 191  498=498.20 0 255 0
D3/3: adding rule 498=498.20 0 255 0  917=917.40 255 255 0
D3/3: adding rule 917=917.40 255 255 0  1336=1336.60 255 127
0
D3/3: adding rule 1336=1336.60 255 127 0  1755=1755.80 191
127 63
D3/3: adding rule 1755=1755.80 191 127 63  2175=2175.00 20
20 20
D2/3: G__read_Cell_head
D2/3: G__read_Cell_head_array
D3/3: region item: proj:       99
D3/3: region item: zone:       0
D3/3: region item: north:      432254.46875
D3/3: region item: south:      253707.0625
D3/3: region item: east:       804844.1875
D3/3: region item: west:       610026.4375
D3/3: region item: cols:       1948
D3/3: region item: rows:       1785
D3/3: region item: e-w resol:  100.00911191
D3/3: region item: n-s resol:  100.02655812
D3/3: region item: format:     -1
D3/3: region item: compressed: 1
D1/3: G_find_raster(): name=MASK mapset=user1
D3/3: Top: xmin: 804844.187501; xmax: 610026.437499; ymin:
432254.468751; ymax: 253707.062499
D3/3: Right: xmin: 804844.187501; xmax: 610026.437499; ymin:
432254.468751; ymax: 253707.062499
D3/3: Bottom: xmin: 804844.187501; xmax: 610026.437499;
ymin: 432254.468751; ymax: 253707.062499
D3/3: Left: xmin: 804844.187501; xmax: 610026.437499; ymin:
432254.468751; ymax: 253707.062499
D3/3: Extra check: xmin: 610076.442056; xmax: 804794.182944;
ymin: 253757.075779; ymax: 432204.455471
D3/3: Final check: xmin: 610026.437500; xmax: 804844.187500;
ymin: 253707.062500; ymax: 432254.468750
D1/3: G_find_raster(): name=MASK mapset=user1
D3/3: Top: xmin: 14.419322; xmax: 17.081289; ymin:
49.011643; ymax: 49.027566
D3/3: Right: xmin: 14.419322; xmax: 17.081289; ymin:
47.420479; ymax: 49.027566
D3/3: Bottom: xmin: 14.419322; xmax: 17.081289; ymin:
47.407697; ymax: 49.027566
D3/3: Left: xmin: 14.419322; xmax: 17.081289; ymin:
47.407697; ymax: 49.027566
D3/3: Extra check: xmin: 14.419322; xmax: 17.081289; ymin:
47.407697; ymax: 49.027566
D3/3: Final check: xmin: 14.416667; xmax: 17.083333; ymin:
47.400000; ymax: 49.033333
D3/3: G_adjust_Cell_head: epsilon_ns: 2.77778e-007,
epsilon_ew: 1e-006
D3/3: G_adjust_Cell_head: epsilon_ns: 5.10204e-006,
epsilon_ew: 1e-006
D3/3: G_adjust_Cell_head: epsilon_ns: 5.10204e-006,
epsilon_ew: 1e-006

Eingabe:
Spalten: 1948 (1948)
Zeilen: 1785 (1785)
Norden: 432254.468750 (432254.468750)
Süden: 253707.062500 (253707.062500)
Westen: 610026.437500 (610026.437500)
Osten: 804844.187500 (804844.187500)
EW-res: 100.009112
NS-res: 100.026558

Ausgabe:
Spalten: 320 (3600)
Zeilen: 196 (3600)
Norden: 49.033333 (60.000000)
Süden: 47.400000 (30.000000)
Westen: 14.416667 (0.000000)
Osten: 17.083333 (30.000000)
EW-res: 0.008333
NS-res: 0.008333

D1/3: G_find_raster(): name=MASK mapset=user1
D1/3: G_find_raster2(): name=DemEuropeFPp100nn mapset=data
D2/3: G__read_Cell_head
D2/3: G__read_Cell_head_array
D3/3: region item: proj:       99
D3/3: region item: zone:       0
D3/3: region item: north:      432254.46875
D3/3: region item: south:      253707.0625
D3/3: region item: east:       804844.1875
D3/3: region item: west:       610026.4375
D3/3: region item: cols:       1948
D3/3: region item: rows:       1785
D3/3: region item: e-w resol:  100.00911191
D3/3: region item: n-s resol:  100.02655812
D3/3: region item: format:     -1
D3/3: region item: compressed: 1
D1/3: G_find_raster2(): name=DemEuropeFPp100nn mapset=data
D1/3: G_find_raster2(): name=DemEuropeFPp100nn mapset=data
D1/3: G_find_raster2(): name=DemEuropeFPp100nn mapset=data
D1/3: G_find_raster2(): name=DemEuropeFPp100nn mapset=data
D1/3: G_find_raster2(): name=DemEuropeFPp100nn mapset=data
D3/3: create window mapping (1948 columns)
D1/3: G_find_raster2(): name=DemEuropeFPp100nn mapset=data
D1/3: G_find_raster2(): name=DemEuropeFPp100nn mapset=data
D1/3: G_find_raster(): name=MASK mapset=user1
Allokiere Speicher und lese die Eingabekarte...
D3/3: G_adjust_Cell_head: epsilon_ns: 5.10204e-006,
epsilon_ew: 1e-006
D3/3: G_adjust_Cell_head: epsilon_ns: 5.10204e-006,
epsilon_ew: 1e-006
Projeziere...
D1/3: close test3debug compressed
D1/3: G_find_raster2(): name=test3debug mapset=user1
D1/3: G_find_raster2(): name=test3debug mapset=user1
D1/3: G_find_raster2(): name=test3debug mapset=user1
D3/3: G_recreate_command()
(Sat Jan 29 02:14:39 2011) Command finished (10 sec) 

somewhere around here

D1/3: close test3debug compressed
D1/3: G_find_raster2(): name=test3debug mapset=user1
D1/3: G_find_raster2(): name=test3debug mapset=user1
D1/3: G_find_raster2(): name=test3debug mapset=user1
D3/3: G_recreate_command()

there seems to be a crash (a windows-warning-messages pops up)

Helmut

comment:28 by cmbarton, 14 years ago

On the Mac, the raster is not reprojected.

Michael

in reply to:  28 ; comment:29 by hamish, 14 years ago

Replying to cmbarton:

On the Mac, the raster is not reprojected.

Is that only in 7 now, or still in 6.x too?

Is it now only broken in 7 on WinGrass?

(aka is it now ok for 6.x on all platforms?)

Hamish

comment:30 by cmbarton, 14 years ago

It was in all versions: 6.4.1 through 7

I haven't had a chance to test it with current builds. Leaving for your neck of the woods (or Pacific) tomorrow--Melbourne. (well, at least a lot closer to you than to Phoenix).

Michael

in reply to:  29 comment:31 by hellik, 14 years ago

Replying to hamish:

Replying to cmbarton:

On the Mac, the raster is not reprojected.

Is that only in 7 now, or still in 6.x too?

Is it now only broken in 7 on WinGrass? (aka is it now ok for 6.x on all platforms?)

tested in windows with

source srs

+proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 
+no_defs +a=6378137 +rf=298.257222101 +towgs84=0.000,0.000,0.000 +to_meter=1

destination srs

+proj=longlat +no_defs +a=6378137 +rf=298.257223563 +towgs84=0.000,0.000,0.000

WinGRASS-6.4.SVN-r45864-1-Setup.exe => r.proj finishes without any problem

r.proj --verbose input=elev_state_500m location=nc_spm_08 mapset=PERMANENT output=elev_state_500m_wingrass641 method=bilinear
Eingabeparameter der Projektion:  +proj=lcc
+lat_1=36.16666666666666 +lat_2=34.33333333333334
+lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +no_defs
+a=6378137 +rf=298.257222101 +towgs84=0.000,0.000,0.000
Einheitenfaktor der Eingabe: 1
Ausgabeparameter der Projektion:  +proj=longlat +no_defs
+a=6378137 +rf=298.257223563 +towgs84=0.000,0.000,0.000
Einheitenfaktor der Ausgabe: 1

Eingabe:
Spalten: 1580 (1678)
Zeilen: 564 (669)
Norden: 266000.000000 (318500.000000)
Süden: -16000.000000 (-16000.000000)
Westen: 173000.000000 (124000.000000)
Osten: 963000.000000 (963000.000000)
EW-res: 500.000000
NS-res: 500.000000

Ausgabe:
Spalten: 9 (9)
Zeilen: 3 (3)
Norden: 36.557555 (36.557555)
Süden: 33.490551 (33.490551)
Westen: -84.225943 (-84.225943)
Osten: -75.051985 (-75.051985)
EW-res: 1.019329
NS-res: 1.022335

Allokiere Speicher und lese die Eingabekarte...
Projeziere...
r.proj komplett.
(Sat Apr 09 21:56:33 2011) Command finished (1 sec)   

WinGRASS-6.5.SVN-r45872-1-Setup.exe => r.proj finishes without any problem

r.proj --verbose input=elev_state_500m location=nc_spm_08 mapset=PERMANENT output=elev_state_500m_wingrass65 method=bilinear_f
Eingabeparameter der Projektion:  +proj=lcc
+lat_1=36.16666666666666 +lat_2=34.33333333333334
+lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +no_defs
+a=6378137 +rf=298.257222101 +towgs84=0.000,0.000,0.000
Einheitenfaktor der Eingabe: 1
Ausgabeparameter der Projektion:  +proj=longlat +no_defs
+a=6378137 +rf=298.257223563 +towgs84=0.000,0.000,0.000
Einheitenfaktor der Ausgabe: 1

Eingabe:
Spalten: 1580 (1678)
Zeilen: 564 (669)
Norden: 266000.000000 (318500.000000)
Süden: -16000.000000 (-16000.000000)
Westen: 173000.000000 (124000.000000)
Osten: 963000.000000 (963000.000000)
EW-res: 500.000000
NS-res: 500.000000

Ausgabe:
Spalten: 9 (9)
Zeilen: 3 (3)
Norden: 36.557555 (36.557555)
Süden: 33.490551 (33.490551)
Westen: -84.225943 (-84.225943)
Osten: -75.051985 (-75.051985)
EW-res: 1.019329
NS-res: 1.022335

Allokiere Speicher und lese die Eingabekarte...
Projeziere...
r.proj komplett.
(Sat Apr 09 22:02:14 2011) Command finished (1 sec)     

WinGRASS-7.0.SVN-r45874-1-Setup.exe => there seems still to be some crash nearby G_recreate_command(), but the raster is reprojected (see https://trac.osgeo.org/grass/ticket/1262?replyto=29#comment:27)

GRASS 7.0.svn> g.gisenv set=DEBUG=5
GRASS 7.0.svn> r.proj --verbose input=elev_state_500m location=nc_spm_08 mapset=PERMANENT output=elevstate500mwingrass70debug method=bilinear_f
D1/5: G_find_raster(): name=elevstate500mwingrass70debug mapset=testreproject
D2/5: G__read_Cell_head
D2/5: G__read_Cell_head_array
D3/5: region item: proj:       3
D3/5: region item: zone:       0
D3/5: region item: north:      36:33:27.198541N
D3/5: region item: south:      33:29:25.982362N
D3/5: region item: east:       75:03:07.144363W
D3/5: region item: west:       84:13:33.393728W
D3/5: region item: cols:       9
D3/5: region item: rows:       3
D3/5: region item: e-w resol:  1:01:09.583263
D3/5: region item: n-s resol:  1:01:20.405393
D3/5: region item: top:        1
D3/5: region item: bottom:     0
D3/5: region item: cols3:      9
D3/5: region item: rows3:      3
D3/5: region item: depths:     1
D3/5: region item: e-w resol3: 1:01:09.583263
D3/5: region item: n-s resol3: 1:01:20.405393
D3/5: region item: t-b resol:  1
D3/5: G_adjust_Cell_head: epsilon_ns: 0.000333333, epsilon_ew: 1e-006
D1/5: G_find_raster(): name=elev_state_500m mapset=PERMANENT
D1/5: G_find_raster2(): name=elev_state_500m mapset=PERMANENT
D1/5: G_find_raster(): name=elev_state_500m mapset=PERMANENT
D3/5: adding rule -10=-10.00 0 0 255  0=2000.00 0 191 191
D3/5: adding rule 0=-10.00 0 191 191  10=2000.00 0 255 255
D3/5: adding rule 10=-10.00 0 255 255  30=2000.00 0 255 0
D3/5: adding rule 30=-10.00 0 255 0  120=2000.00 255 255 0
D3/5: adding rule 120=-10.00 255 255 0  350=2000.00 255 127 0
D3/5: adding rule 350=-10.00 255 127 0  700=2000.00 191 127 63
D3/5: adding rule 700=-10.00 191 127 63  2000=2000.00 255 255 255
Eingabeparameter der Projektion:  +proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +no_defs +a=6378137
 +rf=298.257222101 +towgs84=0.000,0.000,0.000
Einheitenfaktor der Eingabe: 1
Ausgabeparameter der Projektion:  +proj=longlat +no_defs +a=6378137 +rf=298.257223563 +towgs84=0.000,0.000,0.000
Einheitenfaktor der Ausgabe: 1
D2/5: G__read_Cell_head
D2/5: G__read_Cell_head_array
D3/5: region item: proj:       99
D3/5: region item: zone:       0
D3/5: region item: north:      318500
D3/5: region item: south:      -16000
D3/5: region item: east:       963000
D3/5: region item: west:       124000
D3/5: region item: cols:       1678
D3/5: region item: rows:       669
D3/5: region item: e-w resol:  500
D3/5: region item: n-s resol:  500
D3/5: region item: format:     -1
D3/5: region item: compressed: 1
D1/5: G_find_raster(): name=MASK mapset=testreproject
D3/5: Top: xmin: 184786.522595; xmax: 919362.320937; ymin: 254813.342689; ymax: 264840.952469
D3/5: Right: xmin: 184786.522595; xmax: 927217.047945; ymin: 33426.108872; ymax: 264840.952469
D3/5: Bottom: xmin: 174014.338912; xmax: 927217.047945; ymin: 27992.367084; ymax: 264840.952469
D3/5: Left: xmin: 174014.338912; xmax: 927217.047945; ymin: 27992.367084; ymax: 264840.952469
D3/5: Extra check: xmin: 174014.338912; xmax: 962750.000000; ymin: -15750.000000; ymax: 264840.952469
D3/5: Final check: xmin: 174000.000000; xmax: 963000.000000; ymin: -16000.000000; ymax: 265000.000000
D1/5: G_find_raster(): name=MASK mapset=testreproject
D3/5: Top: xmin: -83.844648; xmax: -75.078044; ymin: 36.049566; ymax: 36.145545
D3/5: Right: xmin: -83.844648; xmax: -75.078044; ymin: 33.547070; ymax: 36.145545
D3/5: Bottom: xmin: -83.844648; xmax: -75.078044; ymin: 33.514977; ymax: 36.145545
D3/5: Left: xmin: -83.844648; xmax: -75.078044; ymin: 33.514977; ymax: 36.145545
D3/5: Extra check: xmin: -83.716278; xmax: -75.561649; ymin: 34.001718; ymax: 36.046388
D3/5: Final check: xmin: -84.225943; xmax: -75.051985; ymin: 33.490551; ymax: 36.557555
D3/5: G_adjust_Cell_head: epsilon_ns: 0.000333333, epsilon_ew: 1e-006
D3/5: G_adjust_Cell_head: epsilon_ns: 0.000333333, epsilon_ew: 1e-006
D3/5: G_adjust_Cell_head: epsilon_ns: 0.000333333, epsilon_ew: 1e-006

Eingabe:
Spalten: 1580 (1678)
Zeilen: 564 (669)
Norden: 266000.000000 (318500.000000)
S³den: -16000.000000 (-16000.000000)
Westen: 173000.000000 (124000.000000)
Osten: 963000.000000 (963000.000000)
EW-res: 500.000000
NS-res: 500.000000

Ausgabe:
Spalten: 9 (9)
Zeilen: 3 (3)
Norden: 36.557555 (36.557555)
S³den: 33.490551 (33.490551)
Westen: -84.225943 (-84.225943)
Osten: -75.051985 (-75.051985)
EW-res: 1.019329
NS-res: 1.022335

D1/5: G_find_raster(): name=MASK mapset=testreproject
D1/5: G_find_raster2(): name=elev_state_500m mapset=PERMANENT
D2/5: G__read_Cell_head
D2/5: G__read_Cell_head_array
D3/5: region item: proj:       99
D3/5: region item: zone:       0
D3/5: region item: north:      318500
D3/5: region item: south:      -16000
D3/5: region item: east:       963000
D3/5: region item: west:       124000
D3/5: region item: cols:       1678
D3/5: region item: rows:       669
D3/5: region item: e-w resol:  500
D3/5: region item: n-s resol:  500
D3/5: region item: format:     -1
D3/5: region item: compressed: 1
D1/5: G_find_raster2(): name=elev_state_500m mapset=PERMANENT
D1/5: G_find_raster2(): name=elev_state_500m mapset=PERMANENT
D1/5: G_find_raster2(): name=elev_state_500m mapset=PERMANENT
D1/5: G_find_raster2(): name=elev_state_500m mapset=PERMANENT
D1/5: G_find_raster2(): name=elev_state_500m mapset=PERMANENT
D3/5: create window mapping (1580 columns)
D1/5: G_find_raster2(): name=elev_state_500m mapset=PERMANENT
D1/5: G_find_raster2(): name=elev_state_500m mapset=PERMANENT
D1/5: G_find_raster(): name=MASK mapset=testreproject
Allokiere Speicher und lese die Eingabekarte...
 100%
D3/5: G_adjust_Cell_head: epsilon_ns: 0.000333333, epsilon_ew: 1e-006
D3/5: G_adjust_Cell_head: epsilon_ns: 0.000333333, epsilon_ew: 1e-006
Projeziere...
 100%
D1/5: close elevstate500mwingrass70debug compressed
D1/5: G_find_raster2(): name=elevstate500mwingrass70debug mapset=testreproject
D1/5: G_find_raster2(): name=elevstate500mwingrass70debug mapset=testreproject
D1/5: G_find_raster2(): name=elevstate500mwingrass70debug mapset=testreproject
D3/5: G_recreate_command()
GRASS 7.0.svn>

Helmut

comment:32 by martinl, 13 years ago

What's status of this ticket? Thanks.

comment:33 by cmbarton, 13 years ago

r.proj seems to be working fine now in both 6.4 svn and 7.

Michael

comment:34 by martinl, 13 years ago

Resolution: fixed
Status: newclosed

comment:35 by annakrat, 10 years ago

r.proj was still crashing on Windows in GRASS7, fortunately just after the raster was reprojected. Fixed in r61327, r61328.

Note: See TracTickets for help on using tickets.